Skip to content

Commit 16f6163

Browse files
authored
Merge pull request #259383 from paulth1/prompt-flow-batch1
[AQ] edit pass: Prompt flow batch1
2 parents 9ed83a6 + 02db092 commit 16f6163

File tree

8 files changed

+180
-173
lines changed

8 files changed

+180
-173
lines changed

articles/machine-learning/prompt-flow/concept-connections.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Prompt flow provides various prebuilt connections, including Azure Open AI, Open
3333
| [Azure Content Safety](https://aka.ms/acs-doc) | Content Safety (Text) or Python |
3434
| [Azure AI Search](https://azure.microsoft.com/products/search) (formerly Cognitive Search) | Vector DB Lookup or Python |
3535
| [Serp](https://serpapi.com/) | Serp API or Python |
36-
| [Custom](./tools-reference/python-tool.md#how-to-consume-custom-connection-in-python-tool) | Python |
36+
| [Custom](./tools-reference/python-tool.md#use-a-custom-connection-in-python) | Python |
3737

3838
By leveraging connections in prompt flow, users can easily establish and manage connections to external APIs and data sources, facilitating efficient data exchange and interaction within their AI applications.
3939

4040
## Next steps
4141

4242
- [Get started with prompt flow](get-started-prompt-flow.md)
43-
- [Consume custom connection in Python Tool](./tools-reference/python-tool.md#how-to-consume-custom-connection-in-python-tool)
43+
- [Consume custom connection in Python Tool](./tools-reference/python-tool.md#use-a-custom-connection-in-python)

articles/machine-learning/prompt-flow/tools-reference/embedding-tool.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Embedding tool in Azure Machine Learning prompt flow
33
titleSuffix: Azure Machine Learning
4-
description: Prompt flow embedding tool uses OpenAI's embedding models to convert text into dense vector representations for various NLP tasks.
4+
description: The prompt flow embedding tool uses OpenAI's embedding models to convert text into dense vector representations for various natural language processing tasks.
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: prompt-flow
@@ -15,47 +15,46 @@ ms.date: 11/02/2023
1515
---
1616

1717
# Embedding tool
18-
OpenAI's embedding models convert text into dense vector representations for various NLP tasks. See the [OpenAI Embeddings API](https://platform.openai.com/docs/api-reference/embeddings) for more information.
18+
19+
OpenAI's embedding models convert text into dense vector representations for various natural language processing tasks. For more information, see the [OpenAI Embeddings API](https://platform.openai.com/docs/api-reference/embeddings).
1920

2021
## Prerequisites
22+
2123
Create OpenAI resources:
2224

23-
- **OpenAI**
25+
- **OpenAI**:
2426

25-
Sign up account [OpenAI website](https://openai.com/)
26-
Login and [Find personal API key](https://platform.openai.com/account/api-keys)
27+
- Sign up your account on the [OpenAI website](https://openai.com/).
28+
- Sign in and [find your personal API key](https://platform.openai.com/account/api-keys).
2729

28-
- **Azure OpenAI (AOAI)**
30+
- **Azure OpenAI Service**:
2931

30-
Create Azure OpenAI resources with [instruction](../../../ai-services/openai/how-to/create-resource.md)
32+
Create Azure OpenAI resources with [these instructions](../../../ai-services/openai/how-to/create-resource.md).
3133

32-
## **Connections**
34+
## Connections
3335

34-
Set up connections to provide resources in embedding tool.
36+
Set up connections to provide resources in the embedding tool.
3537

36-
| Type | Name | API KEY | API Type | API Version |
38+
| Type | Name | API key | API type | API version |
3739
|-------------|----------|----------|----------|-------------|
3840
| OpenAI | Required | Required | - | - |
3941
| AzureOpenAI | Required | Required | Required | Required |
4042

41-
4243
## Inputs
4344

4445
| Name | Type | Description | Required |
4546
|------------------------|-------------|-----------------------------------------------------------------------|----------|
46-
| input | string | the input text to embed | Yes |
47-
| connection | string | the connection for the embedding tool use to provide resources | Yes |
48-
| model/deployment_name | string | instance of the text-embedding engine to use. Fill in model name if you use OpenAI connection, or deployment name if use Azure OpenAI connection. | Yes |
49-
50-
47+
| input | string | Input text to embed. | Yes |
48+
| connection | string | Connection for the embedding tool used to provide resources. | Yes |
49+
| model/deployment_name | string | Instance of the text-embedding engine to use. Fill in the model name if you use an OpenAI connection. Insert the deployment name if you use an Azure OpenAI connection. | Yes |
5150

5251
## Outputs
5352

54-
| Return Type | Description |
53+
| Return type | Description |
5554
|-------------|------------------------------------------|
56-
| list | The vector representations for inputs |
55+
| list | Vector representations for inputs |
5756

58-
There is an example response returned by the embedding tool:
57+
Here's an example response that the embedding tool returns:
5958

6059
<details>
6160
<summary>Output</summary>
Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: LLM tool in Azure Machine Learning prompt flow
33
titleSuffix: Azure Machine Learning
4-
description: Prompt flow LLM tool enables you to leverage widely used large language models like OpenAI or Azure OpenAI (AOAI) for natural language processing.
4+
description: The prompt flow LLM tool enables you to take advantage of widely used large language models like OpenAI or Azure OpenAI for natural language processing.
55
services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: prompt-flow
@@ -16,81 +16,83 @@ ms.date: 11/02/2023
1616

1717
# LLM tool
1818

19-
Prompt flow LLM tool enables you to leverage widely used large language models like [OpenAI](https://platform.openai.com/) or [Azure OpenAI (AOAI)](../../../cognitive-services/openai/overview.md) for natural language processing.
19+
The large language model (LLM) tool in prompt flow enables you to take advantage of widely used large language models like [OpenAI](https://platform.openai.com/) or [Azure OpenAI Service](../../../cognitive-services/openai/overview.md) for natural language processing.
2020

21-
Prompt flow provides a few different LLM APIs:
22-
- **[Completion](https://platform.openai.com/docs/api-reference/completions)**: OpenAI's completion models generate text based on provided prompts.
23-
- **[Chat](https://platform.openai.com/docs/api-reference/chat)**: OpenAI's chat models facilitate interactive conversations with text-based inputs and responses.
21+
Prompt flow provides a few different large language model APIs:
22+
23+
- [Completion](https://platform.openai.com/docs/api-reference/completions): OpenAI's completion models generate text based on provided prompts.
24+
- [Chat](https://platform.openai.com/docs/api-reference/chat): OpenAI's chat models facilitate interactive conversations with text-based inputs and responses.
2425

2526
> [!NOTE]
26-
> We now remove the `embedding` option from LLM tool api setting. You can use embedding api with [Embedding tool](embedding-tool.md).
27+
> We removed the `embedding` option from the LLM tool API setting. You can use an embedding API with the [embedding tool](embedding-tool.md).
28+
29+
## Prerequisites
2730

28-
## Prerequisite
2931
Create OpenAI resources:
3032

31-
- **OpenAI**
33+
- **OpenAI**:
3234

33-
Sign up account [OpenAI website](https://openai.com/)
34-
Sign in and [Find personal API key](https://platform.openai.com/account/api-keys)
35+
- Sign up your account on the [OpenAI website](https://openai.com/).
36+
- Sign in and [find your personal API key](https://platform.openai.com/account/api-keys).
3537

36-
- **Azure OpenAI (AOAI)**
38+
- **Azure OpenAI**:
3739

38-
[Create Azure OpenAI resources](../../../cognitive-services/openai/how-to/create-resource.md?pivots=web-portal).
40+
- Create Azure OpenAI resources with [these instructions](../../../ai-services/openai/how-to/create-resource.md).
3941

40-
## **Connections**
42+
## Connections
4143

4244
Set up connections to provisioned resources in prompt flow.
4345

44-
| Type | Name | API KEY | API Type | API Version |
46+
| Type | Name | API key | API type | API version |
4547
|-------------|----------|----------|----------|-------------|
4648
| OpenAI | Required | Required | - | - |
47-
| AzureOpenAI | Required | Required | Required | Required |
49+
| Azure OpenAI| Required | Required | Required | Required |
4850

4951
## Inputs
5052

51-
### Text Completion
53+
The following sections show various inputs.
54+
55+
### Text completion
5256

5357
| Name | Type | Description | Required |
5458
|------------------------|-------------|-----------------------------------------------------------------------------------------|----------|
55-
| prompt | string | text prompt for the language model. | Yes |
56-
| model, deployment_name | string | the language model to use | Yes |
57-
| max\_tokens | integer | the maximum number of tokens to generate in the completion. Default is 16. | No |
58-
| temperature | float | the randomness of the generated text. Default is 1. | No |
59-
| stop | list | the stopping sequence for the generated text. Default is null. | No |
60-
| suffix | string | text appended to the end of the completion | No |
61-
| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No |
62-
| logprobs | integer | the number of log probabilities to generate. Default is null. | No |
63-
| echo | boolean | value that indicates whether to echo back the prompt in the response. Default is false. | No |
64-
| presence\_penalty | float | value that controls the model's behavior with regard to repeating phrases. Default is 0. | No |
65-
| frequency\_penalty | float | value that controls the model's behavior with regard to generating rare phrases. Default is 0. | No |
66-
| best\_of | integer | the number of best completions to generate. Default is 1. | No |
67-
| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No |
68-
59+
| prompt | string | Text prompt for the language model. | Yes |
60+
| model, deployment_name | string | Language model to use. | Yes |
61+
| max\_tokens | integer | Maximum number of tokens to generate in the completion. Default is 16. | No |
62+
| temperature | float | Randomness of the generated text. Default is 1. | No |
63+
| stop | list | Stopping sequence for the generated text. Default is null. | No |
64+
| suffix | string | Text appended to the end of the completion. | No |
65+
| top_p | float | Probability of using the top choice from the generated tokens. Default is 1. | No |
66+
| logprobs | integer | Number of log probabilities to generate. Default is null. | No |
67+
| echo | boolean | Value that indicates whether to echo back the prompt in the response. Default is false. | No |
68+
| presence\_penalty | float | Value that controls the model's behavior for repeating phrases. Default is 0. | No |
69+
| frequency\_penalty | float | Value that controls the model's behavior for generating rare phrases. Default is 0. | No |
70+
| best\_of | integer | Number of best completions to generate. Default is 1. | No |
71+
| logit\_bias | dictionary | Logit bias for the language model. Default is an empty dictionary. | No |
6972

7073
### Chat
7174

72-
7375
| Name | Type | Description | Required |
7476
|------------------------|-------------|------------------------------------------------------------------------------------------------|----------|
75-
| prompt | string | text prompt that the language model will response | Yes |
76-
| model, deployment_name | string | the language model to use | Yes |
77-
| max\_tokens | integer | the maximum number of tokens to generate in the response. Default is inf. | No |
78-
| temperature | float | the randomness of the generated text. Default is 1. | No |
79-
| stop | list | the stopping sequence for the generated text. Default is null. | No |
80-
| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No |
81-
| presence\_penalty | float | value that controls the model's behavior with regard to repeating phrases. Default is 0. | No |
82-
| frequency\_penalty | float | value that controls the model's behavior with regard to generating rare phrases. Default is 0. | No |
83-
| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No |
77+
| prompt | string | Text prompt that the language model uses for a response. | Yes |
78+
| model, deployment_name | string | Language model to use. | Yes |
79+
| max\_tokens | integer | Maximum number of tokens to generate in the response. Default is inf. | No |
80+
| temperature | float | Randomness of the generated text. Default is 1. | No |
81+
| stop | list | Stopping sequence for the generated text. Default is null. | No |
82+
| top_p | float | Probability of using the top choice from the generated tokens. Default is 1. | No |
83+
| presence\_penalty | float | Value that controls the model's behavior for repeating phrases. Default is 0. | No |
84+
| frequency\_penalty | float | Value that controls the model's behavior for generating rare phrases. Default is 0. | No |
85+
| logit\_bias | dictionary | Logit bias for the language model. Default is an empty dictionary. | No |
8486

8587
## Outputs
8688

87-
| API | Return Type | Description |
89+
| API | Return type | Description |
8890
|------------|-------------|------------------------------------------|
89-
| Completion | string | The text of one predicted completion |
90-
| Chat | string | The text of one response of conversation |
91+
| Completion | string | Text of one predicted completion |
92+
| Chat | string | Text of one response of conversation |
9193

92-
## How to use LLM Tool?
94+
## Use the LLM tool
9395

94-
1. Setup and select the connections to OpenAI resources
95-
2. Configure LLM model api and its parameters
96-
3. Prepare the prompt with [guidance](prompt-tool.md#how-to-write-prompt).
96+
1. Set up and select the connections to OpenAI resources.
97+
1. Configure the large language model API and its parameters.
98+
1. Prepare the prompt with [guidance](prompt-tool.md#write-a-prompt).

articles/machine-learning/prompt-flow/tools-reference/open-source-llm-tool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This prompt flow supports two different LLM API types:
3030
1. Choose a Model from the Azure Machine Learning Model Catalog and deploy.
3131
2. Setup and select the connections to the model deployment.
3232
3. Configure the tool with the model settings.
33-
4. [Prepare the prompt](./prompt-tool.md#how-to-write-prompt).
33+
4. [Prepare the prompt](./prompt-tool.md#write-a-prompt).
3434
5. Run the flow.
3535

3636
## Prerequisites: Model Deployment

0 commit comments

Comments
 (0)