Skip to content

Commit

Permalink
docs: DOC-263: Flexible labeling config for Prompts (#6639)
Browse files Browse the repository at this point in the history
Co-authored-by: caitlinwheeless <[email protected]>
  • Loading branch information
caitlinwheeless and caitlinwheeless authored Nov 14, 2024
1 parent 7e2dc79 commit eb6cf2b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
24 changes: 15 additions & 9 deletions docs/source/guide/prompts_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,18 @@ From the Prompts page, click **Create Prompt** in the upper right and then compl
| --- | --- |
| Name | Enter a name for the Prompt. |
| Description | Enter a description for the Prompt. |
| Type | Select the Prompt model type: [Text Classification](#Text-classification) or [Named Entity Recognition](#Named-entity-recognition-NER) |
| Target Project| Select the project you want to use. If you don't have any eligible projects, you will see an error message. <br><br>See the note below. |
| Classes | This list is automatically generated from the labeling configuration of the target project. |
| Target Project| Select the project you want to use. If you don't have any eligible projects, you will see an error message. <br>See the note below. <br><br>When you select a project, additional information about the labeling config appears. This includes the classes that will be used when applying the prompt. |

</div>

!!! note Eligible projects
Target projects must meet the following criteria:
* The labeling configuration for the project must be compatible with the **Type** you selected above:
* For text classification, this means that the labeling configuration for the project must use `Choice` tags.
* For NER, this means that the labeling configuration for the project must use `Label` tags.
* The project must have one output type (`Choice` or `Label`) and not a mix of both.
* The project cannot include multiple `Choices` or `Labels` blocks in its labeling configuration.
* The project must include text data. While it can include other data types such as images or video, it must include `<Text>`.
* You must have access to the project. If you are in the Manager role, you need to be added to the project to have access.
* The project cannot be located in your Personal Sandbox workspace.
* While projects connected to an ML backend will still appear in the list of eligible projects, we do not recommend using Prompts with an ML backend as this can interfere with how accuracy and score are calculated when evaluating the prompt.

## Types
## Example project types

### Text classification

Expand Down Expand Up @@ -154,3 +147,16 @@ Some examples include:
* **Intelligence and Risk Analysis**: By extracting entities such as personal names, organizations, IP addresses, and financial transactions from suspicious activity reports or communications, organizations can better assess risks and detect fraud or criminal activity.
* **Specialized Document Review**: Once trained, NER can help extract industry-specific key entities for better document review, searching, and classification.
* **Customer Feedback and Product Review**: Extract named entities like product names, companies, or services from customer feedback or reviews. This allows businesses to categorize and analyze feedback based on specific products, people, or regions, helping them make data-driven improvements.

### Text summarization

Text summarization involves condensing large amounts of information into concise, meaningful summaries.

Models can be trained or fine-tuned to recognize essential information within a document and generate summaries that retain the core ideas while omitting less critical details. This capability is especially valuable in today’s information-heavy landscape, where professionals across various fields are often overwhelmed by the sheer volume of text data.

Some examples include:

* **Customer Support and Feedback Analysis**: Companies receive vast volumes of customer support tickets, reviews, and feedback that are often repetitive or lengthy. Auto-labeling can help summarize these inputs, focusing on core issues or themes, such as “billing issues” or “technical support.”
* **News Aggregation and Media Monitoring**: News organizations and media monitoring platforms need to process and distribute news stories efficiently. Auto-labeling can summarize articles while tagging them with labels like “politics,” “economy,” or “health,” making it easier for users to find relevant stories.
* **Document Summarization**: Professionals often need to quickly understand the key points in lengthy contracts, research papers, and files.
* **Educational Content Summarization**: EEducators and e-learning platforms need to distill complex material into accessible summaries for students. Auto-labeling can summarize key topics and categorize them under labels like “concept,” “example,” or “important fact.”
20 changes: 6 additions & 14 deletions docs/source/guide/prompts_draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ When you evaluate a prompt, you will see the following metrics:
<tr>
<th>Metric</th>
<th>Tasks</th>
<th>Type</th>
<th>Config</th>
<th>Description</th>
</tr>
</thead>
Expand All @@ -76,9 +76,7 @@ Ground Truths
</td>
<td>

Text classification

NER
All labeling configs

</td>
<td>
Expand All @@ -101,9 +99,7 @@ All task types
</td>
<td>

Text classification

NER
All labeling configs

</td>
<td>
Expand All @@ -124,9 +120,9 @@ Ground Truths
</td>
<td>

Text classification
Single `<Choices>`

NER
Single `<Labels>`

</td>
<td>
Expand Down Expand Up @@ -159,9 +155,7 @@ All task types
</td>
<td>

Text classification

NER
All labeling configs

</td>
<td>
Expand Down Expand Up @@ -195,8 +189,6 @@ Auto-refinement applies your initial prompt and the Teacher Model to generate pr
Your Teacher Model evaluates the initial prompt’s predictions against the ground truth (or sample task output) and identifies areas for improvement. It then suggests a refined prompt, aimed at achieving closer alignment with the desired outcomes.




## Drafting effective prompts

For a comprehensive guide to drafting prompts, see [The Prompt Report: A Systematic Survey of Prompting Techniques](https://arxiv.org/abs/2406.06608) or OpenAI's guide to [Prompt Engineering](https://platform.openai.com/docs/guides/prompt-engineering).
Expand Down
6 changes: 3 additions & 3 deletions docs/source/guide/prompts_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ With Prompts, you can:

## Use cases


### Auto-labeling with Prompts

Prompts allows you to leverage LLMs to swiftly generate accurate predictions, enabling instant labeling of thousands of tasks.
Expand Down Expand Up @@ -133,9 +132,10 @@ This feedback loop allows you to iteratively fine-tune your prompts, optimizing
| Feature | Support |
| --- | --- |
| **Supported data types** | Text |
| **Supported model types** | Text Classification <br>Named Entity Recognition (NER) |
| **Supported object tags** | `Text` <br>`HyperText` |
| **Supported control tags** | `Choices` <br>`Labels` <br>`TextArea` <br>`Pairwise` |
| **Class selection** | Multi-selection (the LLM can apply multiple labels per task)|
| **Supported base models** | OpenAI gpt-3.5-turbo-16k <br>OpenAI gpt-3.5-turbo-instruct* <br>OpenAI gpt-4-turbo <br>OpenAI gpt-3.5-turbo <br>OpenAI gpt-4o <br>OpenAI gpt-4<br>[Azure OpenAI chat-based models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)<br>[Custom LLM](prompts_create#Add-OpenAI-Azure-OpenAI-or-a-custom-model) |
| **Supported base models** | OpenAI gpt-3.5-turbo-16k* <br>OpenAI gpt-3.5-turbo* <br>OpenAI gpt-4 <br>OpenAI gpt-4-turbo <br>OpenAI gpt-4o <br>OpenAI gpt-4o-mini<br>[Azure OpenAI chat-based models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)<br>[Custom LLM](prompts_create#Add-OpenAI-Azure-OpenAI-or-a-custom-model)<br><br>**Note:** We recommend against using GPT 3.5 models, as these can sometimes be prone to rate limit errors. |
| **Text compatibility** | Task text must be utf-8 compatible |
| **Task size** | Total size of each task can be no more than 1MB (approximately 200-500 pages of text) |
| **Network access** | If you are using a firewall or restricting network access to your OpenAI models, you will need to allow the following IPs: <br>3.219.3.197 <br>34.237.73.3 <br>4.216.17.242 |
Expand Down

0 comments on commit eb6cf2b

Please sign in to comment.