From eb6cf2bc3ac4427211e7b81b1ac841196188e4d8 Mon Sep 17 00:00:00 2001 From: C L W Date: Thu, 14 Nov 2024 12:09:05 -0600 Subject: [PATCH] docs: DOC-263: Flexible labeling config for Prompts (#6639) Co-authored-by: caitlinwheeless --- docs/source/guide/prompts_create.md | 24 +++++++++++++++--------- docs/source/guide/prompts_draft.md | 20 ++++++-------------- docs/source/guide/prompts_overview.md | 6 +++--- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/docs/source/guide/prompts_create.md b/docs/source/guide/prompts_create.md index 2502ae867804..9f2fbef04fc9 100644 --- a/docs/source/guide/prompts_create.md +++ b/docs/source/guide/prompts_create.md @@ -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.

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.
See the note below.

When you select a project, additional information about the labeling config appears. This includes the classes that will be used when applying the prompt. | !!! 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 ``. * 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 @@ -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.” \ No newline at end of file diff --git a/docs/source/guide/prompts_draft.md b/docs/source/guide/prompts_draft.md index 2254e0376be2..afd6f65217aa 100644 --- a/docs/source/guide/prompts_draft.md +++ b/docs/source/guide/prompts_draft.md @@ -60,7 +60,7 @@ When you evaluate a prompt, you will see the following metrics: Metric Tasks - Type + Config Description @@ -76,9 +76,7 @@ Ground Truths -Text classification - -NER +All labeling configs @@ -101,9 +99,7 @@ All task types -Text classification - -NER +All labeling configs @@ -124,9 +120,9 @@ Ground Truths -Text classification +Single `` -NER +Single `` @@ -159,9 +155,7 @@ All task types -Text classification - -NER +All labeling configs @@ -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). diff --git a/docs/source/guide/prompts_overview.md b/docs/source/guide/prompts_overview.md index fa261246316b..712dc926e742 100644 --- a/docs/source/guide/prompts_overview.md +++ b/docs/source/guide/prompts_overview.md @@ -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. @@ -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
Named Entity Recognition (NER) | +| **Supported object tags** | `Text`
`HyperText` | +| **Supported control tags** | `Choices`
`Labels`
`TextArea`
`Pairwise` | | **Class selection** | Multi-selection (the LLM can apply multiple labels per task)| -| **Supported base models** | OpenAI gpt-3.5-turbo-16k
OpenAI gpt-3.5-turbo-instruct*
OpenAI gpt-4-turbo
OpenAI gpt-3.5-turbo
OpenAI gpt-4o
OpenAI gpt-4
[Azure OpenAI chat-based models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)
[Custom LLM](prompts_create#Add-OpenAI-Azure-OpenAI-or-a-custom-model) | +| **Supported base models** | OpenAI gpt-3.5-turbo-16k*
OpenAI gpt-3.5-turbo*
OpenAI gpt-4
OpenAI gpt-4-turbo
OpenAI gpt-4o
OpenAI gpt-4o-mini
[Azure OpenAI chat-based models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)
[Custom LLM](prompts_create#Add-OpenAI-Azure-OpenAI-or-a-custom-model)

**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:
3.219.3.197
34.237.73.3
4.216.17.242 |