# Introduction

### Welcome to Entry Point AI

Entry Point AI is the modern platform for optimizing language models. You can write and test prompts, import existing datasets or build them from scratch, train custom models, and compare prompts against custom models directly—for both *proprietary and open-source language models.*

### How the Platform Works

Entry Point acts as a layer on top of language [model providers](/key-concepts/model-providers) (e.g. OpenAI, Replicate, Google AI), enabling you to focus on high-level business concerns for how to develop the best AI solution and iterate quickly.&#x20;

We integrate with multiple providers so that you can access as many models as possible, compare them against each other, and switch easily. As a result, you are never locked into a single provider simply because you built your product using their API or SDK.

On our platform, you can train a custom model on OpenAI, train another one on Mistral 7B, compare them directly, and choose the one that performs the best—without ever needing to understand the implementation details of each underlying API.&#x20;

{% hint style="success" %}
Any models you train are sandboxed to your account and private by default.
{% endhint %}

### Freedom with Models

Entry Point is built as a layer on top to give you freedom, not to limit your options. We are committed to providing the full power of underlying platforms.

You can access your models directly from a provider's API at any point in time. They are linked to your account through the API key you provide to Entry Point and we do not act as a gatekeeper in any way.

It's also easy to download your dataset from Entry Point in common formats like CSV and JSON.

### Passthrough Costs

We don't want to be a middleman, so we don't charge you for token and training—you handle any costs associated for these directly for each model provider that you connect. There is no surcharge on top of any of these costs.

{% hint style="success" %}
Entry Point helps estimate costs to avoid surprises.
{% endhint %}

### Who It's Built For

If you are an AI engineer with prior experience fine-tuning language models but you are ready to step out of low-level code and become more productive, Entry Point AI is a great choice. All the little things that were slowing you down, like token counts and formatting strings, become a breeze.

Entry Point is also accessible to product team leaders, entrepreneurs, and AI consultants to dive in and start directly working with AI models. You no longer need a developer to create a proof-of-concept for your idea—you can validate it for yourself.

We've built Entry Point as a power tool, so there are a few things to learn—but once you get the hang of it, you'll be able to amaze people with your optimized prompts and custom AI models.


# Quickstart

### Initialize a Demo Project

On the projects page, you can create a new project from scratch with the + button or choose a demo dataset from the list of options:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FSMGHRDreHuPU0XfxIZ4g%2Fdemo%20datasets.jpg?alt=media&amp;token=54c8bf52-6d67-48d2-a337-ea506c577313" alt=""><figcaption></figcaption></figure>

When you choose a demo dataset, the project will import the sample data and populate relevant fields and examples. This is an easy way to explore the features that Entry Point AI has to offer without needing to bring any custom data.

Demo projects are meant to showcase the diverse types of projects you can build with Entry Point. They are suitable for exploration and even provide [enough data to fine-tune a model.](/guides/build-a-dataset/quantity-and-quality-of-data#how-much-data-do-i-need-for-fine-tuning)&#x20;

### Next Steps

Next, you may want to connect at least one [model provider](/key-concepts/model-providers), explore background information about other key concepts like [templates](/key-concepts/templates) or [fields](/key-concepts/fields), or jump straight into our guide on [how to evaluate a prompt.](/guides/evaluate-a-prompt)


# Model Providers

Entry Point AI allows you to connect one or more [model providers](/key-concepts/model-providers) to run prompts, fine-tune models, and host models for inference. Our software acts as an abstraction layer that makes it easy to switch between or compare models from different providers.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FNbq9BzXGXskRFYkcEsPA%2Fmodel%20providers.jpg?alt=media&amp;token=636a5782-83c4-487f-84da-41dbb80a5fc7" alt=""><figcaption></figcaption></figure>

We support both proprietary model providers (OpenAI, Anthropic, Google AI), and open-source model providers (Replicate, Groq).

Model providers can be connected to Entry Point from the [Integrations](https://app.entrypointai.com/integrations) page found in the top nav bar. While the process of setting up these integrations can vary slightly from provider to provider, most of them simply require that you input an API key to get going.&#x20;

{% hint style="danger" %}
If you disconnect a model provider, the associated models will become inaccessible through Entry Point.&#x20;
{% endhint %}

Here are some of our top model providers:

### Replicate

Replicate is a leading provider of open-source models.

| Models for Inference                                                                          | Models for Fine-tuning                                                                     |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| <p>Mistral 7B (chat and pretrained versions)</p><p>Llama 2 (chat and pretrained versions)</p> | <p>Mistral 7B (chat and pretrained versions)<br>Llama 2 (chat and pretrained versions)</p> |

### OpenAI

OpenAI offers the GPT family of models for inference and fine-tuning. If you have early access to other models that you'd like to use inside of Entry Point, shoot us an email at <support@entrypointai.com>

| Models for Inference                                                   | Models for Fine-tuning                         |
| ---------------------------------------------------------------------- | ---------------------------------------------- |
| <p>GPT-4o<br>GPT-4 Turbo<br>GPT-4 (Original, 32k)<br>GPT-3.5 Turbo</p> | <p>GPT-3.5 Turbo<br>Davinci 2<br>Babbage 2</p> |

### Groq Cloud

Groq is the fast inference engine for AI.

| Models for Inference                                          | Models for Fine-tuning |
| ------------------------------------------------------------- | ---------------------- |
| <p>Mixtral 8x7b</p><p>Llama 3 (8B and 70B)</p><p>Gemma 7B</p> | N/A                    |

### AI21

AI21 provides the Jurassic-2 family of models.

| Models for Inference                                          | Models for Fine-tuning |
| ------------------------------------------------------------- | ---------------------- |
| <p>Jurassic-2 Light<br>Jurassic-2 Mid<br>Jurassic-2 Ultra</p> | N/A                    |

{% hint style="warning" %}
AI21 has paused the availability of their fine-tuning APIs under further notice.
{% endhint %}

### Google AI

Google AI provides the Gemini family of models for inference.&#x20;

| Models for Inference | Models for Fine-tuning |
| -------------------- | ---------------------- |
| Gemini 1.0 Pro       | N/A                    |

{% hint style="info" %}
Google AI offers a fine-tuning API but its not integrated with Entry Point yet.
{% endhint %}

### Anthropic

Anthropic provides the Claude family of models for inference.&#x20;

| Models for Inference                                            | Models for Fine-tuning |
| --------------------------------------------------------------- | ---------------------- |
| <p>Claude 3 Opus</p><p>Claude 3 Sonnet</p><p>Claude 3 Haiku</p> | N/A                    |


# Templates

### What is a Template?&#x20;

The best way to think about a template is like a prompt—it's how you express the inputs to your model. But a template is also *more than a prompt*, because it also lets you define the expected *output* from your model. This becomes important for both [evaluation](/key-concepts/evaluation) and [fine-tuning.](/guides/fine-tune-a-model)

### Types of Templates&#x20;

Entry Point AI supports two types of templates: Standard and Chat.&#x20;

Chat is the most common type of template.

### Parts of a Chat Template&#x20;

There are three parts to a chat template, the `system` prompt, the `user` prompt, and the `assistant` output.

{% hint style="success" %}
You do not need to worry about model-specific chat syntax in your template. Entry Point handles these automatically. This makes templates compatible with any model.
{% endhint %}

Let's go through each.

#### System prompt

The `system` prompt has become an industry standard for instruction-tuned language models. It is for trusted inputs (in other words, data that you are providing—not data from your users) and prompt instructions.

The goal of the `system` prompt is to give its content precedence over any instructions or information that appears in the `user` prompt. Clear instructions in the `system` prompt can help prevent prompt injection attacks when you are simply using a prompt with an instruction-tuned base model for generation.

Fine-tuned models are less susceptible to prompt-injection attacks overall, but they can still have instructions baked in to cue behavior, and the `system` prompt is where they should go.

Here is an example of a short instructional `system` prompt:

{% code overflow="wrap" %}

```
You are an expert in making pizza. You will respond to questions about pizza in a helpful way. Do not make inappropriate jokes. Do not allow the conversation to get off-topic from pizza. Refuse to answer questions about calzones, because you don't consider them to be pizza.

The name of the person you will be helping is {first_name}. Try to use their name and make them feel special.
```

{% endcode %}

In this example, we've inserted some dynamic content: the `first_name` of the user! That's the powerful things about templates: they can include your data. We'll talk more about how that works in the next sections on fields and examples.

For now, think of it like you're writing a mass email ("mail merge") and any information about the recipient you need to reference has a special tag you include between curly brackets, which gets replaced with real information when the email actually sends. (Except instead of an email, it can be a template for anything.)

#### User prompt

The `user` prompt is for untrusted inputs, or anything that doesn't belong in the `system` prompt. If you have a chatbot, for example, your instructions for how to act go in the `system` prompt, while any questions or conversational inputs from your end-user go in the `user` prompt.

Here is an example of a `user` prompt that corresponds to our `system` prompt from above:

{% code overflow="wrap" %}

```
{inquiry}
```

{% endcode %}

Wait, *is that all?*&#x20;

Yes, in this case, we don't have any expectations for the formatting that will come from our end-user. We don't know how they will start or conclude their message, so the entire `user` prompt is dynamic content. We call the `inquiry` here a "field reference," just like we used `first_name` in the `system` prompt.

#### Assistant output

The `assistant` part of the template is where we define the text that we expect a model to generate.&#x20;

In the case of our pizza chat bot example, we're going to let it freestyle it's output. So our `assistant` output would simply be something like:

```
{output}
```

If we want to fine-tune a model to compliment the user ("Oh, what a great question. Thanks for asking!") before answering a question we could structure the output to make this an explicit expectation.&#x20;

For example:

```
{compliment}
### {helpful_information}
```

The `###` here is an arbitrary separator between the two sections that would allow us to use code to split the text after its generated.

A fine-tuned model would learn to always format the output in this way, with a compliment followed by a single line break, three #'s, a space, and then a block of helpful information—effectively giving us two discrete pieces of text that we could use: the compliment and the helpful information.&#x20;

Being able to reference multiple data points in the prompt and receive back a structured output with a predictable pattern opens up a lot of possibilities for both evaluating our templates and how we can use the generated outputs to build features. For this example, it's simple, but we could italicize the compliment for the user interface, if we wanted.


# Fields

In the last section, we learned about the parts of a template and how they can include references to your data using curly brackets, like `{first_name}`.  Now we're going to learn how to create those references with "fields."

## What is a Field?

A field is how you define a type of data that you want to store and use in Entry Point AI. Fields can be used in multiple places, including [templates](/key-concepts/templates) and [transforms](/key-concepts/transforms).

If you have a spreadsheet of data, the field name is equivalent to your column header. Fields also consist of a reference and a *type*.

There are four types of Fields in Entry Point:

* Text (default)
* URL
* Predefined Option: a list of possible values (like a dropdown)
* Number

### Field References and Values

The field reference is a lowercase word or series of words, separated by underscores instead of spaces (camel case). It's how to refer to your field in a [template](/key-concepts/templates), like a variable.

Examples of field references:

* `input`
* `output`
* `user_inquiry`
* `first_name`
* `list_of_recommendations`

When you use a reference in a template, the actual *values* for a field are get inserted to replace the field *reference* for prompts and training. It's like a placeholder.

For example, if you reference a field using `{first_name`}, then the value might be Bob or Linda. Any field you create will end up having many different possible values.

Going back to our spreadsheet analogy, the field *value* is what we'd see for each cell in a column.


# Examples

In the last section we learned the difference between a [field](/key-concepts/fields), its reference, and its value.&#x20;

Now let's talk about "examples."

Intuitively, examples are what you use to evaluate prompts. They are also what you use to fine-tune a model.

If you picture a typical spreadsheet where you have multiple columns and rows of data, each row of data is one example. Each cell in the row is a field value in Entry Point terminology.

An example includes values for both inputs and outputs.

Templates are used to format examples. That makes it very easy to test different formatting on your data *without modifying the actual data itself.* This is important because formatting can have an outsize impact on model performance. At Entry Point, we think of formatting as important as any other [fine-tuning hyperparameter](/guides/fine-tune-a-model/fine-tuning-hyperparameters).

Now let's put templates, fields, and examples together.

### Opposite Generator

Let's say we need a model that will generate a word that is the opposite of whatever word we enter.

We would create two fields of type `text`:

1. Input Word (reference: `input_word`)
2. Output Word (reference: `output_word`)

Then, we would write a template:

| Template Part    | Content                                                                                                        |
| ---------------- | -------------------------------------------------------------------------------------------------------------- |
| System Prompt    | Based on the following word, come up with a word that is most opposite to it. Only respond with a single word. |
| User Prompt      | {input\_word}                                                                                                  |
| Assistant Output | {output\_word}                                                                                                 |

Finally, we need examples, which contain the concrete datapoints to replace the references above.

We would write a few examples:

| Input Word | Output Word |
| ---------- | ----------- |
| hot        | cold        |
| near       | far         |
| wet        | dry         |
| high       | low         |

Each row above is one example.


# Models

Models are what we came here to work with in the first place! And now, you should have enough background knowledge to customize one.

But first, let's define a few types of models, starting with what a "base model" is.

### Base Models

Base models are what come off-the-shelf through our [model providers.](/key-concepts/model-providers) There are two types of base models:

#### Pre-trained Models

Pre-trained models have learned how to predict text, but not how to follow instructions. They will naturally try to auto-complete your prompt and are unpredictable in nature. Not very many providers release models in this state anymore.

#### Instruction-tuned Models

These models have been fine-tuned to follow instructions, which is pretty amazing when you think about it. The pre-trained model is fed examples of prompt/completion pairs (actually, system/prompt/completion trios) and learns to use its foundational understanding of language to follow instructions. We can steer it with words!

### Templated Models

Templated models let you run a prompt (in the form of a [template](/key-concepts/templates)) on the base model of your choice. This is simply a way to do inference with a particular template and model (and evaluate it).&#x20;

{% hint style="info" %}
In Entry Point AI, creating a templated model is called "applying a template."
{% endhint %}

### Fine-tuned Models

Fine-tuning a model starts a process that can take some time, and usually incurs cost from the [model provider.](/key-concepts/model-providers) Not all base models are available for fine-tuning.

When you start a fine-tune, Entry Point packages up your training examples (typically into a JSONL) with your template and sends them to the model provider via their API, which makes a copy of the base model you selected, and then starts to train it in batches on your [examples](/key-concepts/examples). In the end, you have a customized version of the original model, trained specifically for your use case.

Fine-tuning is a very powerful technique, and Entry Point is unique because you can compare instructional prompts directly against fine-tunes, using both templated and fine-tuned models.


# Evaluation

In order to be confident that you're making progress toward a better model, you need to test its outputs at each step of the prompt engineering or fine-tuning process. To help with this, Entry Point AI runs an evaluation (known as "evals") each time you [apply a template to a model](/guides/evaluate-a-prompt/create-a-templated-model) or [fine-tune a model.](/guides/fine-tune-a-model)

There are two key steps in an evaluation:

1. Feed your validation examples through the model to get their outputs
2. Score the outputs relative to your examples

Step 1 happens automatically. Step 2 can be handleded in a few different ways depending on your preferences.&#x20;

Entry Point provides (3) different scoring methods you can select from.&#x20;

{% hint style="info" %}
You can select your desired scoring method by navigating to settings and setting the dropdown under the Evaluations section.
{% endhint %}

### Exact Match

Exact match is a simple comparison to see if the model's output matches the example's output. This scoring method is best suited for classifiers with objective outputs that can be considered each "right" or "wrong."

For example, if you are fine-tuning a model to accurately classify incoming support requests, exact match scoring would be a good choice. This method would allow you to score the outputs based on whether or not the model correctly identified the category.&#x20;

### Manual

The manual scoring method allows humans to review and score each output. While it is the most time-consuming method, it can be a good choice for highly subjective evaluations.&#x20;

For example, if you are fine-tuning a model to write marketing copy in your specific brand voice, manual evaluation may be the best choice as it allows to you to rank your outputs based on your own intuition.&#x20;

### Predictive

Predictive scoring (often referred to as "LLM-as-a-judge") leverages a large language model of your choice to score outputs. Using an LLM for this purpose allows you to approximate the human intuition of manual scoring in far less time. &#x20;

When using this method, the model that you have selected as your judge will display both its score as well as its reasoning for arriving at this score.&#x20;

Entry Point provides several ways to customize predictive scoring:

* **Model** - select the platform and model to use for scoring
* **Criteria** - choose which aspects of the output the score should be based upon
* **Additional Instructions** - write your own advanced instructions for the model to consider when scoring

Predictive scoring on Entry Point also has a unique capability to indicate if there are issues with your example data.

{% hint style="warning" %}
The underlying assumption behind evals is that you have good validation examples with which to test your model.  However, this is not always true; every dataset has room for improvement.&#x20;

The evaluation process can help you uncover and resolve larger issues with your dataset leading to far better results overall.&#x20;
{% endhint %}


# Transforms

### Overview

Entry Point's transform feature allows you to generate new [fields](/key-concepts/fields) in your dataset by running a prompt en masse against an existing field. For example, the real-world training data you have access to may consist of hundreds of example user inputs but no corresponding outputs, or vice versa.

Remember that the process of [fine-tuning an LLM](/guides/fine-tune-a-model) distills down to showing the model *pairs* of inputs and outputs; in a case where you only have one or the other, transforms allow you to synthesize the missing or complementary data quickly and easily.&#x20;

Let's look at a couple of different use cases to help illustrate this.  &#x20;

### Use Cases

#### Generating Inputs

First, consider a situation where your dataset consists of outputs only. For example, you may have dozens, hundreds, or even thousands of example social media posts representing the style, tone, and format of those that you'd like your fine-tuned model to create.&#x20;

While having these example outputs is a good start, a model is not typically fine-tuned on outputs alone. Instead, each example output needs to be paired with an example user *input* for which you would expect the desired output to be produced by the model.&#x20;

The table below illustrates a dataset containing outputs only. Transforms allow you to easily create the missing inputs that you need to complete your dataset.&#x20;

| Input (User Prompt) | Output (Social media post)                                                                                                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| \_\_                | Leadership means embracing vulnerability and fostering a safe space for ideas and concerns. Show you're human, build trust, and drive innovation. #Leadership #Vulnerability #TrustBuilding            |
| \_\_                | Active listening is key. Give your team full attention, acknowledge their views, and respond thoughtfully. This boosts morale and fosters mutual respect. #Leadership #ActiveListening #TeamEngagement |
| \_\_                | Lead by example. Your actions set the tone for your team. Show integrity, accountability, and dedication to inspire the same standards in others. #Leadership #LeadByExample #Integrity                |

#### Generating Outputs

Conversely, your training data may consist entirely of inputs for which you need to generate example outputs. For example, let's say your goal is to fine-tune a model to categorize inbound support requests. You may have access to plenty of example customer inquiries but not their corresponding categorizations.&#x20;

| Input (Customer Inquiry)                                 | Output (Categorization) |
| -------------------------------------------------------- | ----------------------- |
| I received the wrong item in my order, can you help?     | \_\_                    |
| My package says delivered, but I haven't received it.    | \_\_                    |
| The item I ordered arrived damaged, what are my options? | \_\_                    |
|                                                          |                         |

Whether your training dataset is missing inputs or outputs, Entry Points transform function can help. Instead of manually filling in the missing data, transforms allow you to leverage the power of LLMs to quickly and easily synthesize the data you need.&#x20;

#### Other Use Cases

Transforms can also be used to generate meta data about your data. For instance, you could use a transform to populate a field that tells you if your inputs and outputs have issues.

See the [Transform Data](/guides/build-a-dataset/transform-data) section of our [Build a Dataset](/guides/build-a-dataset) guide for more information on how to use transforms.&#x20;


# Evaluate a Prompt

Imagine that you're developing an AI feature for a SaaS product and you wrote a prompt for it. You have done "vibe checks" and found that it seems to do a pretty good job. But thousands of people will use it once it's out in the wild, so you need to actually *prove* that it will perform consistently.

That's called Evaluation, or Evals for short—and Entry Point AI can help.

The first thing you need to do is take your prompt and turn it into a Template.


# Turn a Prompt into a Template

Here is a sample prompt that we will turn into a [template](/key-concepts/templates) for [evaluation](/key-concepts/evaluation):

{% code overflow="wrap" %}

```
You are a professional email marketer. Review the following email description and write a creative email subject line idea for it that is likely to grab attention. Do not return anything except the subject line.
```

{% endcode %}

### Create a New Project

Go to the home screen and press + to create a new Project.

For the Project description, you can put the following:

> Write email subject lines from email descriptions.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FZvI4R4EmN8VlqGRNTqoo%2Fpage_2.jpeg?alt=media&amp;token=5e01213f-bcf5-494a-8b54-3f8f50a3ff5e" alt=""><figcaption><p>Create a new project</p></figcaption></figure>

Press "Create" and you will land in a new Project called "Subject Line Writer" or similar.

### Create a Chat Template

Navigate to templates in the sidebar, then press + to create a new template.

Leave the type as `Chat` by default.

In the `system` prompt box, enter our instructions.

{% code overflow="wrap" %}

```
You are a professional email marketer. Review the following article and write a creative email subject line idea for it that is likely to grab attention. Do not return anything except the subject line.
```

{% endcode %}

With the `user` prompt text box selected, press the "New field" button.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FfpeMUjKhqEhQDRBrgAjd%2Fpage_4.jpeg?alt=media&amp;token=71664f2f-0acd-48d4-bad5-bc16a35c6a29" alt=""><figcaption><p>Create a new field while editing the template</p></figcaption></figure>

For the name, enter "Content Description".  The reference will be populated automatically and the helper text can be left blank.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FaSj4YVLNR5UWUrWjn1WF%2Fpage_5.jpeg?alt=media&amp;token=83bc1cb9-65dd-45c2-9ebb-6f53db7c137a" alt=""><figcaption><p>All you need to do is name the field</p></figcaption></figure>

Press "Save & close".

Now press the button to insert the new Content Description field into your `user` prompt.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FXiblokZcOuorVGudtxNn%2Fannotely_image%20(5).jpeg?alt=media&amp;token=41813903-a724-4a6b-a129-c64bce5cac63" alt=""><figcaption></figcaption></figure>

The entire prompt section should look like this:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FKuW7x0jSklSSZhmMgCjc%2Fpage_6.jpeg?alt=media&amp;token=f5f2f267-d2dd-4805-bee0-6642318367f9" alt=""><figcaption></figcaption></figure>

Repeat the same process to create and insert a field into the `assistant` output box called "Subject Line."

This should be what you have at the end:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FYJTTJO92mOCEX0UkYMxs%2Fpage_7.jpeg?alt=media&amp;token=614249b2-ffa7-4953-ae5b-599dd4083a06" alt=""><figcaption><p>Save the new template</p></figcaption></figure>

Press "Save."

We now have a Template based on our prompt that can handle different pairs of data for the `article` and the `subject_line` that we need the model to generate.


# Prepare Validation Examples

Now we have a [template](/key-concepts/templates) for our prompt, but we need data to use in it.

Navigate to the Examples page and press +.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FQfZvlLAp0o3vTibUdzo9%2Fexamples%20page.jpg?alt=media&amp;token=5ffd991a-631d-46a5-99da-f0a12a7da48f" alt=""><figcaption></figcaption></figure>

For the dataset, choose *Validation*.

Then, enter the Content Description and Email Subject from the first row in the table below.

| Content Description                                                                                                         | Email Subject                                                           |
| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| The email promotes a buy one get one free offer on socks.                                                                   | Double the Comfort: Buy One, Get One Free on All Socks 🧦🧦             |
| The email discusses the importance of nutrition and weight training to improve health and body composition.                 | Transform Your Health: Unlock the Power of Nutrition & Weight Training! |
| The email asks the user if they will complete a short survey in order to provide feedback to the business on their service. | Your Opinion Matters: Take Our Quick Survey & Help Us Improve           |

It should look like this:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FYiDv65tDaWlKkxLnXKGf%2Fpage_9.jpeg?alt=media&amp;token=538ed7b6-78f2-4ffc-bc4a-2eb07e667952" alt=""><figcaption><p>Creating a validation example</p></figcaption></figure>

Press "Save & next." Repeat with the next row until all three examples from the table have been entered.

Close the example editing screen and you should see our three new examples, each with an orange line at the bottom to indicate they are validation examples:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F5hMViZAdt1677jWCYhvd%2Fpage_10.jpeg?alt=media&amp;token=3aa366d1-fe8d-443e-8137-af7349018a90" alt=""><figcaption></figcaption></figure>

Three examples isn't very many, but it's enough to try evaluating our prompt. It's also enough to use the [Synthesis tool to start building our dataset.](/guides/build-a-dataset/synthesize-examples)

Next, we'll create a [templated model.](/key-concepts/models#templated-models)


# Create a Templated Model

Now that you have a handful of validation examples and a template, it's time to create a [templated model](/key-concepts/models#templated-models) for evaluation.

{% hint style="info" %}
Make sure you have set up your OpenAI integration (or another [Model Provider](/key-concepts/model-providers)).
{% endhint %}

Navigate to the models tab and press +. In the dropdown that appears, choose "Apple a template."

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FMM0MgOsjLcUUiyep3OwS%2Fmodels%20page.jpg?alt=media&amp;token=da82dc70-4f7e-4106-933f-1a6cf341da87" alt=""><figcaption></figcaption></figure>

In the dialog that appears, the template you created should be selected automatically.

For the platform, choose OpenAI (or the [model provider](/key-concepts/model-providers) of your choice).

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FTBDH3SGJi8az8Qngfsl3%2Fapply%20a%20template%20choose%20platform.jpg?alt=media&amp;token=d259b7ed-13cb-42f7-8451-16c62d48d8a1" alt=""><figcaption></figcaption></figure>

You can choose any model. We'll go with GPT-4 Omni.

Leave the default name and press "Add to project."

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FRK1vNW5SR1EtnYnrsPm2%2Fapply%20a%20template%20finish.jpg?alt=media&amp;token=31130110-3af6-4552-85ee-58765c30779f" alt=""><figcaption></figcaption></figure>

Immediately, Entry Point will start [evaluating](/key-concepts/evaluation) your model against your validation examples.

Open the new templated model from its name in the table.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FMsjPrnqOS8Sg748VRnDz%2Fpage_4.jpeg?alt=media&amp;token=c913e3da-c883-4fe1-a8fc-cba0e67dd38c" alt=""><figcaption></figcaption></figure>

At the bottom of this detail view, you will see the Evaluation section.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FUYvKndVjgmDeBsEOIU3E%2Fevaluation%20in%20progress.jpg?alt=media&amp;token=82cb7c95-ea11-4dc2-8b9a-4c3c23e13545" alt=""><figcaption></figcaption></figure>

After a moment, you should see the results appear.

In the next part, we will review the results and see how our model performed.


# Review & Rate Outputs

Our output results are ready in the Evaluation section:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FnJYXgCY9vpyPuBpwCFu4%2Freview%20and%20rate%20outputs.jpg?alt=media&amp;token=913e89ce-e6d0-49df-b981-41a356d845a8" alt=""><figcaption></figcaption></figure>

Now, we need to rate each one.

We need to think about what makes a good email subject line for our use case.

On the one hand, they *are* email subject lines (that's a start), and the content seems relevant to the input. On the other hand, they have double quotes around them, which is not what we want. We'll subtract 2 stars for improper formatting, and rank each one from 1 to 3 stars based on how much we like the result.

{% hint style="danger" %}
You might notice that these results from GPT-4 Omni are eerily similar to the ones in our validation examples. That's because when writing this guide, we used GPT-4 Omni to come up with those email subject lines in the first place! If you selected a different model, you would get more diverse outputs.
{% endhint %}

To fix the formatting, we need to update our prompt.


# Iterating on the Prompt

### Update the Prompt

Navigate to templates and press the "..." next to our existing template. Choose "Make a copy."

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FZzebJhuHgcDQjycgqgqa%2Fpage_1.jpeg?alt=media&amp;token=9a11b555-63ef-47fe-bcb3-d430cdb9d573" alt=""><figcaption><p>Make a copy of the current template</p></figcaption></figure>

Open the copy at the top of the templates list. Then press the "..." by the title and choose Rename.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FT77DFCQV1oeOYNxEmv4x%2Fpage_3.jpeg?alt=media&amp;token=1862049e-cd41-4f94-9100-5c2003bf57dd" alt=""><figcaption></figcaption></figure>

Name it "Prompt v2".

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FEO82f1fqFBRmfdRu9XRa%2Fpage_4.jpeg?alt=media&amp;token=ebd2ffd5-7d07-415d-ab7d-388a81b25a7d" alt=""><figcaption></figcaption></figure>

Next, edit the `system` prompt and replace it with this:

{% code overflow="wrap" %}

```
You are a professional email marketer. Review the following article and write a creative email subject line idea for it that is likely to grab attention. Do not return anything except the subject line. Do not include quotes around the email subject.
```

{% endcode %}

Your template should look like this:

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FyfAuTcqq5UYczXTn8WHD%2Fpage_5.jpeg?alt=media&amp;token=4369b109-0b24-4257-9c4f-6bdfa75f0749" alt=""><figcaption><p>Template with modified prompt</p></figcaption></figure>

Press "Save."

### Try the New Template with a Model

Go back to our Models list and choose to apply a template to a model again.

This time, select our Prompt v2 template from the dropdown.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2Fp14deTJP1nEOebBI6cIt%2Fpage_6.jpeg?alt=media&amp;token=faa978d9-8bff-483a-b112-5c33addd8921" alt=""><figcaption></figcaption></figure>

Use the same model again (GPT-4 Omni) so we know the only thing that changed was our prompt.

Open the new templated model, wait for the evaluation to finish, and check the results.

It looks like the change to our prompt worked and the email subject line is no longer wrapped in double quotation marks.

Let's rate them all 4 or 5 stars.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FPJLnqTzhH1TZS4PLpw3C%2Fv2%20review%20and%20rate.jpg?alt=media&amp;token=81c456c5-20f1-4b6b-860b-826a56148631" alt=""><figcaption></figcaption></figure>

### Compare Models

Back on our models list, we can now compare the score for these two models.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FW4QbWcX8OSQ3wW3vDUig%2Fpage_9.jpeg?alt=media&amp;token=7d81f792-9d5d-43d0-b7b5-d5282f8587be" alt=""><figcaption></figcaption></figure>

We can also rename them to v1 and v2 to make our table easier to read.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F1uUKcYsXxAhXy7r4LzV4%2Fpage_10.jpeg?alt=media&amp;token=65ce8c9f-2c6e-4f1a-82e8-7e4568db4e1f" alt=""><figcaption></figcaption></figure>

With more validation examples, and by reviewing and rating the outputs from your templated models, you can get a clear picture of which model/template combinations are performing best.

### Where to Go From Here

Next, we would need to expand our validation dataset and try the prompt on other models (including models from other [model providers](/key-concepts/model-providers)) to see which give us the best outputs, at the right price and speed for our project.

In the next guide, we'll learn how to build and grow a dataset.


# Build a Dataset

Data is the DNA of AI models. With a quality dataset, you can train different models and test variations with ease. In this guide, we will show you how to import your data, work with it, and expand it.

A dataset for fine-tuning typically consists of both inputs and outputs. When designing a dataset for a particular use case, ask yourself these questions:

* What do I want to get out of my model? What format should it be in?&#x20;
* Which data is actually relevant to the task?
* If I wanted a human to do the job, what data would I provide them? How would they filter it before doing the task—can I pre-filter the data at all to make sure there is nothing extraneous?
* Am I asking the model to do more than one thing at the same time? How can I make the job easier for the model?

If you are hoping to get more than one output back from your model, consider using separate models, each dedicated to its own task. In programming, this is called "separation of concerns," and it applies to designing AI models too.

In general, the simpler you make the task upfront, the better your chances are of creating a high-performing model.

To see how datasets work in Entry Point, we'll start by importing a CSV.&#x20;


# Import a CSV

The first step in this process is to upload a CSV containing the data you would like to use to fine-tune the model.&#x20;

If you have access to training data you'd like to use, you can use your own CSV.&#x20;

If you'd like to follow along using a pre-built example, you can download the CSV below:&#x20;

{% file src="/files/Glm3W7GsC70ffuivVVz9" %}

This example CSV contains two columns:&#x20;

* **Inbound Request:** An inbound chat message from a client seeking support with an enterprise SaaS product.&#x20;
* **Support Agent Response:** A response from a customer support agent designed to gather a few pieces of information during the intake of the support event. &#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FiiYdHas4SJxx3PnTK9oG%2FCleanShot%202024-06-06%20at%2006.08.13%402x.png?alt=media&amp;token=ef0ca707-1f02-4538-aeca-5f50a5470065" alt=""><figcaption></figcaption></figure>

### Create a New Project

Go to the home screen and press + to create a new project.

For the Project description, you can put the following:

> Respond to inbound chat support requests

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FlPwi02GJPQenPE7hvSGO%2FCleanShot%202024-06-05%20at%2006.50.58%402x.png?alt=media&amp;token=45d020a9-9c10-4a5a-b5e3-7b709d79005d" alt=""><figcaption></figcaption></figure>

Press "Create" and you will land in a new project called "Chat Support Agent" or similar.

### Import CSV

Press "Import" in the lower left-hand corner of the main project page.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FQK4CCywhqdfWQKiP6tPh%2FCleanShot%202024-06-05%20at%2006.53.01%402x.png?alt=media&amp;token=28841390-1ebb-463b-8314-47e9566fbd43" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F1bdqXtSWRAN2mQnV5TKW%2FCleanShot%202024-06-05%20at%2006.55.46%402x.png?alt=media&amp;token=d9a1db65-b604-4220-94eb-517a12ad7b14" alt=""><figcaption></figcaption></figure>

### Review Columns

Once you've uploaded your CSV, you'll be asked to review your columns.&#x20;

Each column in your CSV will be mapped to a [field](/key-concepts/fields) in Entry Point.&#x20;

* Selecting "New" vs "Skip" will determine if the given column gets included or removed from the import.&#x20;
  * This is helpful because in some cases your CSV will contain columns that are not relevant to your fine-tuning project. Selecting "Skip" will leave them out of the import.&#x20;
* You can choose to enter a new field name. By default, this will inherit from the header column of your CSV.&#x20;
* Type will allow you to select between text, number, or pre-defined options.&#x20;

{% hint style="info" %}
If you were to import a CSV after your Fields are created, you would see an additional choice for "Existing" which would map your columns to existing fields.
{% endhint %}

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FJ7mFs7kA8qyK5Tgo7S1B%2FCleanShot%202024-06-05%20at%2007.00.06%402x.png?alt=media&amp;token=8d1f1cf3-5827-40f0-bffc-e47fc83cf9fa" alt=""><figcaption></figcaption></figure>

In this example, we will leave all the values at their defaults.&#x20;

Press "Continue" in the top-right corner.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FZzkRupCNCfsCWbjQVyPd%2FCleanShot%202024-06-06%20at%2006.12.51%402x.png?alt=media&amp;token=eebbc509-28af-47a9-83fa-f88a9fc2d3dc" alt=""><figcaption></figcaption></figure>

### Start Import

Leave the "For Validation" field empty and press "Finish". &#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F9keC2tAlOjfnrXgI6eLu%2FCleanShot%202024-06-06%20at%2006.14.50%402x.png?alt=media&amp;token=9324e544-33db-42fe-ba2d-7494c4f6d86e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FWxXX6NtBsjVghPtHYs2D%2FCleanShot%202024-06-05%20at%2007.12.49%402x.png?alt=media&amp;token=7489643b-f5b2-44a2-a49d-8b831740346e" alt=""><figcaption></figcaption></figure>

Once complete, you'll see your data in the [examples](/key-concepts/examples) page of the app.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FoIuPzaLaAoAdur5snJVd%2FCleanShot%202024-06-06%20at%2006.21.12%402x.png?alt=media&amp;token=d5ff2554-8dba-4360-935c-12afed6c8417" alt=""><figcaption></figcaption></figure>


# Transform Data

Next, let's imagine that you only had access to initial customer inquiries, but not the support agent responses. In this scenario, you would have only imported a single column in the previous step. In order to fine-tune a model, you need to pair the inquiries with high-quality responses.

The Entry Point [transforms](/key-concepts/transforms) feature lets you apply prompts to your data to produce missing or complimentary [fields](/key-concepts/fields).

In this section, we'll use Entry Point's transform functionality to:

* Craft a prompt that gives us a desired AI agent response to a customer inquiry
* Run that prompt against every inbound request in our data set
* Save the responses as a new field so they can be used to fine-tune a model

### Create a New Transform

Select Transforms from the left-hand sidebar. Then press "+" in the top-right corner.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FWb94ccjzPqh114KW62oT%2FCleanShot%202024-06-06%20at%2006.36.54%402x.png?alt=media&amp;token=c1225f23-ea47-4442-ae92-64cb77a7ba12" alt=""><figcaption></figcaption></figure>

Enter your desired `system` message. In this example, we used the prompt below.

```
You are a friendly and helpful support agent. Your job is to do the initial intake of support events. You will gather additional information from the customer before we connect them with a human agent. 

Please start the conversation with the customer by: 
- Greet them warmly - thank them for reaching out, apologize for the inconvenience they are experiencing, assure them that we'll get them taken care
- Tell them you're an AI agent and that you'll get them connected with the support team after they answer a few very brief questions

Then, ask the customer the questions below: 

- How long have they been experiencing the issue? 
- Have they taken any steps to try to resolve it already? If so, ask them to explain briefly. 
- Are they able to replicate the issue? Does it happen all the time, or only intermittently? 

Format the list of questions as bullet points to make it easier to read. Also, if the initial client outreach already contains an answer to any of the three questions, please do not ask them to provide that information again.

Stick to the basics and keep things concise. Use a casual tone; there's no need to be super formal. Do not use emojis.
```

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2Fd0MQffEGfxJYfoxkwV3U%2FCleanShot%202024-06-07%20at%2005.53.06%402x.png?alt=media&amp;token=913131fc-9912-4813-a50f-07b0aa6318e2" alt=""><figcaption></figcaption></figure>

In the `user` message field, select "Inbound Request".&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FdopeKFeBR6U7EExsBCZo%2FRewatch%20GIF%20Recording%20-%202024-06-06%20at%206.48.15%20AM.gif?alt=media&amp;token=4effb262-44c3-4831-812c-c0882450df89" alt=""><figcaption></figcaption></figure>

Press "Save" in the lower left. Your transform will automatically be given a name.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FWo80jyXaenMDKcWONQFi%2FCleanShot%202024-06-06%20at%2006.52.02%402x.png?alt=media&amp;token=a1025a9a-abd9-44b3-878b-d58d8cc98ae3" alt=""><figcaption></figcaption></figure>

### Test Transform

Next, we can test the prompt we wrote in the previous section against an example from our dataset to see how it performs.&#x20;

Scroll down until you see the Preview section. Here, you'll see a preview prompt containing your System and User messages. Note that you can click on the icon with two arrows in the top-right to randomly select a different customer inquiry to test with.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FiZ4vbc7qGKOqf4XzLB2n%2FRewatch%20GIF%20Recording%20-%202024-06-07%20at%205.57.36%20AM.gif?alt=media&amp;token=5a338430-4c80-49de-9bdb-e8fecd61f0bc" alt=""><figcaption></figcaption></figure>

Click on the settings icon in the Test Transform section. In this example, we're going to

* Leave the Model as Open AI
* Set the Model to GPT-4 Omni&#x20;
* Set Temperature to 0.2

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F6QQ5wHdpxC35cewAgNw6%2FRewatch%20GIF%20Recording%20-%202024-06-07%20at%206.04.11%20AM.gif?alt=media&amp;token=8761cfab-3bde-4d74-88b0-b79747b99d70" alt=""><figcaption></figcaption></figure>

Press "Generate". Review the response. Adjust your `system` and `user` messages as needed and repeat the process until you are happy with the results.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2Fdkh17eOPR21YVfc6g6U4%2FRewatch%20GIF%20Recording%20-%202024-06-07%20at%206.09.35%20AM.gif?alt=media&amp;token=e90a7f3d-c7c0-4371-9f60-88411d7b5867" alt=""><figcaption></figcaption></figure>

### Create a Transform Job

Now that we like the results we're getting, we're ready to start our transform job. In this step, we'll take the prompt that we crafted in the previous steps and run it against all of the examples in our dataset.&#x20;

Start by scrolling down and click the "+" button in the Jobs section.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FffXvaA2EraH7ZoXhRykl%2FCleanShot%202024-06-07%20at%2006.14.32%402x.png?alt=media&amp;token=390f2fcf-a7c9-4a1d-881d-e9a123abf6be" alt=""><figcaption></figcaption></figure>

Next, we need to name the "New Destination Field". This is the Field in which the responses will be stored.&#x20;

In this example, we've entered "AI Agent Response" for the Name. The Reference will automatically generate.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FsNPlSEPLuoyUmLfxU6em%2FCleanShot%202024-06-07%20at%2006.22.12%402x.png?alt=media&amp;token=a67ff273-9e30-4813-b509-43d4d5504522" alt=""><figcaption></figcaption></figure>

Press "Next".&#x20;

You'll now be asked to select your Platform and Model. We suggest using the same settings you used in the Test Transform section above.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FGAKY6H7MLxhWki7fVzyy%2FCleanShot%202024-06-07%20at%2006.30.39%402x.png?alt=media&amp;token=b58d5da3-8c43-45cd-bc5e-61e04e852e4c" alt=""><figcaption></figcaption></figure>

Press "Next".&#x20;

Enter your desired temperature setting. Again, we recommend using the same setting you used to test the prompt in the section above.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FFQQL7ammh6edujxXeamb%2FCleanShot%202024-06-07%20at%2006.31.28%402x.png?alt=media&amp;token=12aa8318-8178-4281-acc1-a3b91326ea59" alt=""><figcaption></figcaption></figure>

Entry Point will provide an estimated cost to run the transform job. If this looks high, set a reasonable limit on max tokens for a better estimate. Once you're ready, press "Start". Depending on the size of the job, it may take a few minutes to run.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FYbTIiEVJCSpXl29ebd21%2FCleanShot%202024-06-07%20at%2006.34.32%402x.png?alt=media&amp;token=b844136a-209e-43b5-88e0-424ff4aa2d50" alt=""><figcaption></figcaption></figure>

Once the job is complete, you'll see the new field has been created and responses have been added to all of your examples!&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FmHxA4GN8gN65bb2hMxUZ%2FRewatch%20GIF%20Recording%20-%202024-06-07%20at%206.37.52%20AM.gif?alt=media&amp;token=ef227db0-9ef9-4e38-be0b-65cfcb52164a" alt=""><figcaption></figcaption></figure>

Next, we'll use Entry Point's Synthesis function to easily add more examples to our fine-tuning dataset.&#x20;


# Synthesize Examples

In this section, we'll use Entry Point's Synthesis feature to create new [examples](/key-concepts/examples) for our training dataset. This can be useful when you only have a limited amount of data and want to use AI to generate more.

{% hint style="info" %}
The Synthesis feature requires you have at least 3 examples already, since it works by using an internal prompt with few-shot learning.
{% endhint %}

### Create a Template

Navigate to the [templates](/key-concepts/templates) section on the left-hand sidebar and press + in the top-right.&#x20;

Leave the Type set to "Chat". For the System Prompt, we'll enter the same message we used during the previous [Transform Data step](/guides/build-a-dataset/transform-data#create-a-new-transform) in this guide.&#x20;

```
You are a friendly and helpful support agent. Your job is to do the initial intake of support events. You will gather additional information from the customer before we connect them with a human agent. 

Please start the conversation with the customer by: 
- Greet them warmly - thank them for reaching out, apologize for the inconvenience they are experiencing, assure them that we'll get them taken care
- Tell them you're an AI agent and that you'll get them connected with the support team after they answer a few very brief questions

Then, ask the customer the questions below: 

- How long have they been experiencing the issue? 
- Have they taken any steps to try to resolve it already? If so, ask them to explain briefly. 
- Are they able to replicate the issue? Does it happen all the time, or only intermittently? 

Format the list of questions as bullet points to make it easier to read. Also, if the initial client outreach already contains an answer to any of the three questions, please do not ask them to provide that information again.

Stick to the basics and keep things concise. Use a casual tone; there's no need to be super formal. Do not use emojis.
```

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FLa3q7OJMtd5N8JZ5Ywof%2FCleanShot%202024-06-10%20at%2006.49.40%402x.png?alt=media&amp;token=948bc9b9-c363-423c-80b8-899e00024cf3" alt=""><figcaption></figcaption></figure>

Set the `user` message to the "Inbound Request" Field and the `assistant` message to the "AI Agent Response" Field. Then, press "Save".&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FveBeZBOLb7Lwf17vgtOS%2FCleanShot%202024-06-10%20at%2006.57.10%402x.png?alt=media&amp;token=4539716f-ec92-4f73-a3a2-15330faffe65" alt=""><figcaption></figcaption></figure>

Your template will be named automatically. Press the "..." menu and select "Rename" to give it a different name.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F5acbNg2I9tUG6jwDZ6wt%2FCleanShot%202024-06-10%20at%2007.02.35%402x.png?alt=media&amp;token=8410d0a9-6245-43ef-bef1-40cbd36385c6" alt=""><figcaption></figcaption></figure>

### Synthesize Examples

Navigate to the synthesis page using the sidebar menu and press "Settings".&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2Fsg5sP4gw372tKFcCSZTl%2FCleanShot%202024-06-10%20at%2007.08.01%402x.png?alt=media&amp;token=48d82ccc-1701-46c6-8a54-34405d61f115" alt=""><figcaption></figcaption></figure>

In this example, we'll use the following settings. For the template dropdown, be sure to select the template that we created in the previous step. &#x20;

* Platform: OpenAI
* Model: GPT-4 Omni
* Template: *Select the Template we created in the previous step*
* Alignment Text: *Leave blank*
* Total # of examples to create: 12
* Batch size: 3
* Validation examples: 20%
* Automatically save examples: *Leave unchecked*

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FYdKYME91Q9pHLAkU9Y0U%2FCleanShot%202024-06-10%20at%2007.16.01%402x.png?alt=media&amp;token=243922bb-66aa-4495-8950-e731ac649cc6" alt=""><figcaption></figcaption></figure>

Press "Save & close" and then "Start" in the top-right.&#x20;

### Add Synthesized Examples to Dataset

Entry Point will synthesize new examples for your dataset. You can review the examples and add them manually to your dataset.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FqWhHlZPVPty9eb1BG8Pv%2FRewatch%20GIF%20Recording%20-%202024-06-11%20at%206.46.54%20AM.gif?alt=media&amp;token=e2c7812e-a4f8-44c2-98b3-dec385f1602a" alt=""><figcaption></figcaption></figure>

Once you are comfortable with the quality of the results, you can choose to run a new batch with the box checked next to "Automatically save examples".&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FMncJe1AwplLF08LV6Jqg%2FCleanShot%202024-06-11%20at%2006.51.47%402x.png?alt=media&amp;token=ca7ebb15-28e9-43f0-a142-72046b64e624" alt=""><figcaption></figcaption></figure>

This allows you to easily synthesize as many training examples as you'd like and automatically add them to your training dataset!&#x20;

Note that Entry Point provides an estimate allowing you to see how your model provider costs scale as you increase the size of your batch.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FeQzYVMp7s5mz5BIFPlBK%2FRewatch%20GIF%20Recording%20-%202024-06-11%20at%206.56.05%20AM.gif?alt=media&amp;token=7224d92a-f090-450b-9f45-b10de05fb179" alt=""><figcaption></figcaption></figure>


# Quantity & Quality of Data

In this section, we'll provide insight into how much data you need, and what it means to have a high-quality dataset.

The first step to answer these questions is to define the purpose of your dataset.

### The Purpose of a Dataset

There are three primary use cases for a dataset in Entry Point:&#x20;

1. Evaluating a prompt (see [Templated Models](/key-concepts/models#templated-models))
2. Running [Transforms](/key-concepts/transforms) to generate new data
3. Fine-tuning a model

Let's consider the data requirements for each of these use cases in turn.&#x20;

When evaluating a prompt, the amount of data you need depends on the nature of your use case. More specifically, your data requirements will be driven by the level of assurance you need to put that prompt into production. For example, 25-100 examples might be sufficient for an internal use case that won't cause any issues if the data is wrong. Conversely, you might need thousands of validation examples to gain confidence in a customer-facing support agent, where a bad outcome could damage the reputation of your business or put it on the hook for promises made.

When it comes to our next use case—running [transforms](/key-concepts/transforms) to generate new data—there are no hard requirements concerning the size of your dataset. Transforms work for any amount of data, so the number of examples in your dataset is entirely driven by what you're trying to accomplish.&#x20;

This brings us to our third and final use case. Let's look at how much data you need to fine-tune a model.

### How Much Data Do I Need for Fine-tuning?

As in our other use cases, the amount of data you need for fine-tuning a model depends on the specifics of your project, especially how complex it is. However, there are some principles we can apply to any scenario to help us determine an appropriate dataset size.&#x20;

Generally speaking, we recommend starting with at least 25 [examples](/key-concepts/examples) to see your model's behavior change resulting from the fine-tuning. If you have more training data available to you, then using anywhere from 100-500 examples may be a better starting point.&#x20;

{% hint style="info" %}
If you are new to fine-tuning, start with a dataset size that won't overwhelm you, particularly if you need to manually re-label some data. We recommend starting with a manageable number of examples because, as we discuss in the next section, quality is key.
{% endhint %}

The general rule is that every time you double your data, you should expect a linear improvement in output quality. That means if you increase your dataset from 25 examples to 50, you might see a 20% improvement in quality. If you double it again from 50 to 100 examples, you could see another 20% improvement, and so on.

### Quality of Data

The best way to think about data is in terms of quality. That means your outputs need to be *really* good—even when your inputs are a mess. This teaches the model to do a good job and to do it consistently.

Ask yourself this question: if you were to teach a human how to do a task, what would you need to provide them?  The goal is to make it as easy as possible for the AI model to learn. The relationship between the input data and the output should be clear and consistent between examples, otherwise, the model will have a hard time learning, and will not converge on a specific behavior. Inconsistent or inaccurate outputs provide mixed signals to the model and detract from its ability to learn a task.

{% hint style="warning" %}
Don't expect an AI model to learn special insights that a human wouldn't be able to detect.
{% endhint %}

### Diversity of Inputs

In addition to output quality, diverse inputs are critical. Today's large language models contain billions of parameters. Ideally, when fine-tuning, you want to align as many of these parameters as possible to your use case. Using a wider variety of inputs for training helps ensure that more parameters get activated during your fine-tuning job.&#x20;

Here are some ways to think about input data diversity:

* Length of input (use a mix of long, medium, and short inputs)
* Mix of various tokens including words, characters, numbers, line breaks, formatting, and symbols.
* Use examples with spelling mistakes and bad grammar
* Mix in different tones, styles, and emotions
* Use adversarial prompts (prompts designed to mislead or trick the model)
* Cover edge cases
* Provide nonsensical inputs and how you want to handle them (could be a blank response)

Having more diverse inputs results in a more "robust" model that can handle anything you throw at it, and is ultimately more important than the quantity of data.

For more information on data quality, see the paper [Less is More for Alignment.](https://arxiv.org/abs/2305.11206)


# Fine-tune a Model

Fine-tuning trains a model to be a specialist at your specific task. The result is a new model with updated weights based on your [training examples](/key-concepts/examples). Typically, fine-tuning a model yields better results than prompting alone.

Entry Point AI makes it easy to test different combinations of models, templates, and hyperparameters to see what works best.


# Start a Fine-tune

Once you have a dataset with enough examples (see [Quantity & Quality of Data](/guides/build-a-dataset/quantity-and-quality-of-data)) and have connected a [model provider](/key-concepts/model-providers) that supports fine-tuning, you are ready to fine-tune a model.

To start a fine-tune, go to Models, press the + button, and choose "Start a fine-tune."

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FLFwKjN3tJOPQxy12Rwqo%2Fannotely_image%20(10).jpeg?alt=media&amp;token=b1739c57-5fd1-4a7e-9f82-0e645e86f24b" alt=""><figcaption></figcaption></figure>

On the next screen, you can select your [template](/key-concepts/templates) and [model provider](/key-concepts/model-providers). You can also see the token counts and estimated time and/or cost if available.

{% hint style="info" %}
For most fine-tuning jobs, the template should be very minimal. You do not need to include a lengthy instructional prompt, although in small datasets a very short prompt or semantic labels for your field references can help cue desired behavior.
{% endhint %}

In the next section, we'll discuss common fine-tuning hyperparameters and how to set them.


# Fine-tuning Hyperparameters

Hyperparameters are what fine-tuning settings are called in machine learning.

To configure fine-tuning hyperparameters, press "Show advanced."

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FnKFzpDX1FPXcBVI42Aiv%2Fstart%20a%20fine-tune%20show%20advanced%20button.jpg?alt=media&amp;token=67389feb-2900-4d7e-bb76-602bf0f7c290" alt=""><figcaption></figcaption></figure>

These settings vary depending on what platform and base model you select. Generally speaking, Entry Point sets reasonable defaults for hyperparameters, so modifying them further is optional.

Below is some information on the most common hyperparameters.

### Epochs

The number of epochs describes how many times your entire dataset will be used to train the model. Usually, the best value is in the range of 2-5. Using too many epochs introduces the risk of "overfitting" your data, which degrades the model's ability to generalize and perform well on data that was not present at training time.

{% hint style="info" %}
You can determine if you had too many epochs by comparing the training loss and validation loss after training. If training loss keeps decreasing but validation loss starts to increase from a local minimum on the chart, you are likely overfitting. The model is not trained on validation examples, which makes them useful for testing it against "unseen" data.
{% endhint %}

As a general rule, you can get better results with fewer epochs and a larger training dataset.

### Learning Rate

Learning rate determines much a model's weights should be updated after each batch of examples that it tries to predict. The best learning rate often depends on the model and how it was trained originally.

Common values for learning rate when fine-tuning range from 0.0001 to 0.0002.

{% hint style="info" %}
Learning rate is often expressed in scientific notation, but Entry Point presents it in decimal form which is more familiar outside of mathematics.&#x20;
{% endhint %}

If the learning rate is exposed directly, the presumption is that it will be used to train all of the linear layers of the model (the neural networks that are the "brain" of the model). However, in some cases, it makes sense to train certain layers more than others. In such cases, the *learning rate multiplier* is an attractive alternative to a fixed learning rate.

#### Learning rate multiplier

The learning rate multiplier is a hyperparameter that allows you to relatively increase or decrease the learning rate. As implied by the name, it directly multiplies the internal learning rate.

Common values are 0.5 to 2. The default is usually 1 which leaves the learning rate unchanged.

### Batch Size

The batch size is how many examples to process at a time. It's used to optimize memory and performance of fine-tuning.

Batch size should vary with the size of the dataset.&#x20;

After each batch, the model's weights get updated. For example, if you had a dataset of 50 examples and set your batch size to 50, then your model's weights would only get updated once. That's not ideal because we want a model to learn in small increments over time as it processes our data. Conversely, a batch size of 50 might be entirely appropriate for a dataset of 10,000 examples.

For very small datasets, we often set it to 1.

### LORA & QLORA Hyperparameters

#### Rank

Rank determines the size of the decomposed weight matrices (A and B) used in LoRA and QLoRA fine-tuning. A higher Rank value provides more precision when fine-tuning. Common values for Rank range from 8 to 64, but can go much higher. Higher rank uses more memory when fine-tuning.&#x20;

{% hint style="info" %}
The highest possible rank is determined by the original size of the linear layers of the model being trained. Also, rank does not need to be a multiple of 2, even though it commonly is.
{% endhint %}

#### Scale Factor

Scale Factor multiplies your fine-tuned weight matrices before they are added to the original weights of the model. This increases or decreases their impact on the original weights. You can think of Scale Factor roughly as an alternative to adjusting the learning rate, although it is a much more blunt approach.

The original LoRA paper does not use the term Scale Factor, but it effectively calculates it as Alpha divided by Rank. At Entry Point AI, you can set Alpha or Scale Factor. We believe Scale Factor is a more intuitive hyperparameter than Alpha, even though the end result is the same.

#### Dropout

Dropout randomly sets some parameters to zero when training. The theory is that by "turning off" some of the parameters during each weight update, it can prevent overfitting and encourage the training of more parameters. Common values are 0, 0.05, or 0.10, which represent percentages (eg 0%, 5%, and 10% respectively).


# Compare Fine-tunes

When your model finishes fine-tuning, Entry Point AI will automatically start evaluating it against your validation examples.&#x20;

{% hint style="info" %}
Validation examples are processed using 0 for the temperature. This ensures you get the same output every time.
{% endhint %}

Entry Point AI will also score the resulting outputs using the [Scoring Method](/key-concepts/evaluation) selected under the project's Evaluation settings.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FHO8Qjlgtry1Hj3QR3vf3%2Fannotely_image%20(11).jpeg?alt=media&amp;token=3de9dd99-6ede-4648-a3af-9e2c12d49ba3" alt=""><figcaption></figcaption></figure>

For classifiers, [Exact Match](/key-concepts/evaluation#exact-match) is typically a good choice and will automatically determine if the correct classification was chosen.

For generative outputs, choose [Manual](/key-concepts/evaluation#manual) or [Predictive](/key-concepts/evaluation#predictive).

To review the outputs and scores, open the fine-tuned model from the Models page.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FE4cAqhhF9Oy20XHuwznJ%2Fpage_1.jpeg?alt=media&amp;token=9c9ef211-a098-47a8-b79d-e99f785debf8" alt=""><figcaption></figcaption></figure>

Then, scroll down to the Evaluation section.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FQep8Js6Fm9uiKnN7xTB1%2Fevaluation%20section.jpg?alt=media&amp;token=a3bf2f8d-254e-4d5a-b65a-4aef912af7e3" alt=""><figcaption></figcaption></figure>

With manual scoring, you can go through each output and choose the most appropriate rating for its quality. At the end, you will be presented with an overall percentage score that can be compared to other templated or fine-tuned models.

Predictive scoring uses an LLM to automate the scoring process, making this much faster. It's still a good idea to do a human review of predicted output scores.


# Next Steps

Now that you have a fine-tuned model and have an evaluation score, you may be asking what to do next. Here are a few ideas.

### Test Different Models

Experiment with smaller and larger models. Usually it's best to choose the smallest model that gets you the desired quality of output, because it will be cheaper and faster to run.

### Try Different Templates

You may want to try templates that include instructions, basic labels, or no content besides your field references. These can all have an impact on how the model performs.

### Expand Your Dataset

Use the [Synthesis](/guides/build-a-dataset/synthesize-examples) tool to increase the size of your training and validation datasets. Use the alignment text to instruct the model on edge cases to generate data for.

### Share the Model

Want to get a better idea of how other people will use your model in the wild? You can easily generate a shareable link under the model details. All completions from the shared model will be tracked on the Completions page.

### Deploy It

Your model is hosted by the [model provider](/key-concepts/model-providers) you selected and can be used for inference through the various APIs that model providers offer. In some cases, depending on the model provider, you can download the weights and take your model anywhere you like for inference.


# Generate Completions

Entry Point AI offers several ways to generate completions with your models, also known as "inference."


# Playground

The playground offers a convenient way to perform "vibe checks" and test structured data across different models and templates.

You can manually enter information for each field under the "Prompt" heading, or simply press "Synthesize" to fill it in for you, along with a synthesized completion.&#x20;

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2F7sLolHS6Mi4yq8LVEUJV%2Fpage_1.jpeg?alt=media&amp;token=93d109f3-13f2-4d4b-a4e8-de97c93fb7c3" alt=""><figcaption></figcaption></figure>

When you have a prompt and a model selected, press Generate.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FhWvnRvKiwy8J1GSgoIA9%2Fpage_2.jpeg?alt=media&amp;token=bfa6cfa4-2b77-4fd8-94ff-93ae55952fe5" alt=""><figcaption></figcaption></figure>

For any completion, you can press the info icon (i) to see the exact HTTP endpoint, request, and response. This information is helpful when it's time to move a model into production and makes it straightforward to show developers how to perform the same request in code.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FQso27N5yBog0oCoazdyY%2FScreenshot%202024-06-27%20at%202.46.00%20PM.png?alt=media&amp;token=0a23f137-bb7b-48ec-92b4-70f58c6d102c" alt=""><figcaption></figcaption></figure>

Next, we'll talk about inference parameters.


# Inference Parameters

### Inference Parameters

Although they vary from provider to provider, here are the most common settings you can adjust when generating completions.

#### Temperature

Language models typically produce a list of possible next tokens before selecting one. A higher temperature makes it more likely than the model will select a less-likely token. That results in more randomness and variety as temperature increases. This is often thought of as a proxy for creativity. At a temperature of 0, the model will always select the most likely token.

{% hint style="info" %}
There are sources of non-determinism that originate from the way GPUs perform matrix multiplication that could result in different outputs at a temperature of 0, but these are negligible compared to the impact of temperature.
{% endhint %}

#### Top P

Top P is the top percentile of tokens you want to consider when selecting the next token (before temperature is considered). A value of 0.9 corresponds to considering 90% of possibilities, while 0.10  only considers the top 10% of token possibilities. You can use Top P and temperature together for interesting results.

#### Max Tokens

LLMs keep generating text until they generate an "End of Sequence" token, also called a "stop" token. You can also stop them early by setting Max Tokens. It's always a good idea to set a reasonable max limit for token output to prevent excessive token usage, especially with models capable of long outputs.

#### Number of Completions

Some [model providers](/key-concepts/model-providers) allow you to generate multiple completions in a single request. This is only useful if you have a temperature greater than 0.


# Shareable Link

After you have a working model in Entry Point AI, you may want to see how it performs in the wild to collect more diverse, real-world user inputs. We provide a shareable link that allows external users to try your model, while capturing completions for you to review and add to your dataset.

To enable a shareable link, go to the Models page, open the detail page for your Model, and press "Enable" in the Share section.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FMdyAhDLYIaRq0CB3N4Ev%2Fpage_1.jpeg?alt=media&amp;token=9ab0cb99-ff93-4baf-9c9a-82ba8fc18855" alt=""><figcaption></figcaption></figure>

From here, you can open the unique link to see what it looks like or copy it to share with others.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FtQOR0hwHsWINtuyHNACV%2Fpage_2.jpeg?alt=media&amp;token=8f9bd053-ef15-48ae-9113-5c727d78ed06" alt=""><figcaption></figcaption></figure>

The shared link will display a form that resembles a simplified version of the playground.

<figure><img src="https://3106255375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F03h3SC78wyaaTZz7oUet%2Fuploads%2FiPx59k9DC2sr4SVXf5Rk%2Fpage_3.jpeg?alt=media&amp;token=2a86ffea-80be-4d00-9654-a7608fc4cb9b" alt=""><figcaption></figcaption></figure>

All the Completions generated through the shared link are tracked under the Completions tab for the project.


# Deploy a Model

When it comes time to put your model into production, you'll need to use the tools provided by the [model provider](/key-concepts/model-providers) of your top-performing model.

On Replicate, for example, you can download your model weights and host them anywhere.

For OpenAI, on the other hand, you'll need to integrate with their API.

Deployment will vary from provider to provider, so make sure to check their documentation for specific instructions and assistance.

{% hint style="success" %}
Many customers have requested an API endpoint to use Entry Point AI for models production, so this is on our roadmap.
{% endhint %}


