Skip to content

Commit c21b9f6

Browse files
committed
edit pass: prompt-flow-tools_batch1
1 parent 66a80d8 commit c21b9f6

File tree

4 files changed

+90
-98
lines changed

4 files changed

+90
-98
lines changed

articles/ai-studio/how-to/prompt-flow-tools/llm-tool.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: LLM tool for flows in Azure AI Studio
33
titleSuffix: Azure AI Studio
4-
description: This article introduces the LLM tool for flows in Azure AI Studio.
4+
description: This article introduces you to the large language model (LLM) tool for flows in Azure AI Studio.
55
manager: scottpolly
66
ms.service: azure-ai-studio
77
ms.custom:
@@ -17,74 +17,72 @@ author: lgayhardt
1717

1818
[!INCLUDE [Azure AI Studio preview](../../includes/preview-ai-studio.md)]
1919

20-
The prompt flow *LLM* tool enables you to use large language models (LLM) for natural language processing.
20+
To use large language models (LLMs) for natural language processing, you use the prompt flow *LLM* tool.
2121

2222
> [!NOTE]
2323
> For embeddings to convert text into dense vector representations for various natural language processing tasks, see [Embedding tool](embedding-tool.md).
2424
2525
## Prerequisites
2626

27-
Prepare a prompt as described in the [prompt tool](prompt-tool.md#prerequisites) documentation. The LLM tool and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. For more information and best practices, see [prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md).
27+
Prepare a prompt as described in the [Prompt tool](prompt-tool.md#prerequisites) documentation. The LLM tool and Prompt tool both support [Jinja](https://jinja.palletsprojects.com/en/3.1.x/) templates. For more information and best practices, see [Prompt engineering techniques](../../../ai-services/openai/concepts/advanced-prompt-engineering.md).
2828

2929
## Build with the LLM tool
3030

3131
1. Create or open a flow in [Azure AI Studio](https://ai.azure.com). For more information, see [Create a flow](../flow-develop.md).
3232
1. Select **+ LLM** to add the LLM tool to your flow.
3333

34-
:::image type="content" source="../../media/prompt-flow/llm-tool.png" alt-text="Screenshot of the LLM tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/llm-tool.png":::
34+
:::image type="content" source="../../media/prompt-flow/llm-tool.png" alt-text="Screenshot that shows the LLM tool added to a flow in Azure AI Studio." lightbox="../../media/prompt-flow/llm-tool.png":::
3535

3636
1. Select the connection to one of your provisioned resources. For example, select **Default_AzureOpenAI**.
37-
1. From the **Api** drop-down list, select *chat* or *completion*.
38-
1. Enter values for the LLM tool input parameters described [here](#inputs). If you selected the *chat* API, see [chat inputs](#chat-inputs). If you selected the *completion* API, see [text completion inputs](#text-completion-inputs). For information about how to prepare the prompt input, see [prerequisites](#prerequisites).
39-
1. Add more tools to your flow as needed, or select **Run** to run the flow.
40-
1. The outputs are described [here](#outputs).
41-
37+
1. From the **Api** dropdown list, select **chat** or **completion**.
38+
1. Enter values for the LLM tool input parameters described in the [Text completion inputs table](#inputs). If you selected the **chat** API, see the [Chat inputs table](#chat-inputs). If you selected the **completion** API, see the [Text completion inputs table](#text-completion-inputs). For information about how to prepare the prompt input, see [Prerequisites](#prerequisites).
39+
1. Add more tools to your flow, as needed. Or select **Run** to run the flow.
40+
1. The outputs are described in the [Outputs table](#outputs).
4241

4342
## Inputs
4443

45-
The following are available input parameters:
44+
The following input parameters are available.
4645

4746
### Text completion inputs
4847

4948
| Name | Type | Description | Required |
5049
|------------------------|-------------|-----------------------------------------------------------------------------------------|----------|
51-
| prompt | string | text prompt for the language model | Yes |
52-
| model, deployment_name | string | the language model to use | Yes |
53-
| max\_tokens | integer | the maximum number of tokens to generate in the completion. Default is 16. | No |
54-
| temperature | float | the randomness of the generated text. Default is 1. | No |
55-
| stop | list | the stopping sequence for the generated text. Default is null. | No |
56-
| suffix | string | text appended to the end of the completion | No |
57-
| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No |
58-
| logprobs | integer | the number of log probabilities to generate. Default is null. | No |
59-
| echo | boolean | value that indicates whether to echo back the prompt in the response. Default is false. | No |
60-
| presence\_penalty | float | value that controls the model's behavior regarding repeating phrases. Default is 0. | No |
61-
| frequency\_penalty | float | value that controls the model's behavior regarding generating rare phrases. Default is 0. | No |
62-
| best\_of | integer | the number of best completions to generate. Default is 1. | No |
63-
| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No |
64-
50+
| prompt | string | Text prompt for the language model. | Yes |
51+
| model, deployment_name | string | The language model to use. | Yes |
52+
| max\_tokens | integer | The maximum number of tokens to generate in the completion. Default is 16. | No |
53+
| temperature | float | The randomness of the generated text. Default is 1. | No |
54+
| stop | list | The stopping sequence for the generated text. Default is null. | No |
55+
| suffix | string | The text appended to the end of the completion. | No |
56+
| top_p | float | The probability of using the top choice from the generated tokens. Default is 1. | No |
57+
| logprobs | integer | The number of log probabilities to generate. Default is null. | No |
58+
| echo | boolean | The value that indicates whether to echo back the prompt in the response. Default is false. | No |
59+
| presence\_penalty | float | The value that controls the model's behavior regarding repeating phrases. Default is 0. | No |
60+
| frequency\_penalty | float | The value that controls the model's behavior regarding generating rare phrases. Default is 0. | No |
61+
| best\_of | integer | The number of best completions to generate. Default is 1. | No |
62+
| logit\_bias | dictionary | The logit bias for the language model. Default is empty dictionary. | No |
6563

6664
### Chat inputs
6765

6866
| Name | Type | Description | Required |
6967
|------------------------|-------------|------------------------------------------------------------------------------------------------|----------|
70-
| prompt | string | text prompt that the language model should reply to | Yes |
71-
| model, deployment_name | string | the language model to use | Yes |
72-
| max\_tokens | integer | the maximum number of tokens to generate in the response. Default is inf. | No |
73-
| temperature | float | the randomness of the generated text. Default is 1. | No |
74-
| stop | list | the stopping sequence for the generated text. Default is null. | No |
75-
| top_p | float | the probability of using the top choice from the generated tokens. Default is 1. | No |
76-
| presence\_penalty | float | value that controls the model's behavior regarding repeating phrases. Default is 0. | No |
77-
| frequency\_penalty | float | value that controls the model's behavior regarding generating rare phrases. Default is 0. | No |
78-
| logit\_bias | dictionary | the logit bias for the language model. Default is empty dictionary. | No |
68+
| prompt | string | The text prompt that the language model should reply to. | Yes |
69+
| model, deployment_name | string | The language model to use. | Yes |
70+
| max\_tokens | integer | The maximum number of tokens to generate in the response. Default is inf. | No |
71+
| temperature | float | The randomness of the generated text. Default is 1. | No |
72+
| stop | list | The stopping sequence for the generated text. Default is null. | No |
73+
| top_p | float | The probability of using the top choice from the generated tokens. Default is 1. | No |
74+
| presence\_penalty | float | The value that controls the model's behavior regarding repeating phrases. Default is 0. | No |
75+
| frequency\_penalty | float | The value that controls the model's behavior regarding generating rare phrases. Default is 0. | No |
76+
| logit\_bias | dictionary | The logit bias for the language model. Default is empty dictionary. | No |
7977

8078
## Outputs
8179

8280
The output varies depending on the API you selected for inputs.
8381

84-
| API | Return Type | Description |
82+
| API | Return type | Description |
8583
|------------|-------------|------------------------------------------|
86-
| Completion | string | The text of one predicted completion |
87-
| Chat | string | The text of one response of conversation |
84+
| Completion | string | The text of one predicted completion. |
85+
| Chat | string | The text of one response of conversation. |
8886

8987
## Next steps
9088

articles/ai-studio/how-to/prompt-flow-tools/prompt-flow-tools-overview.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,33 @@ author: lgayhardt
1515

1616
[!INCLUDE [Azure AI Studio preview](../../includes/preview-ai-studio.md)]
1717

18-
The following table provides an index of tools in prompt flow.
18+
The following table provides an index of tools in prompt flow.
1919

20-
| Tool (set) name | Description | Environment | Package name |
20+
| Tool or tool set name | Description | Environment | Package name |
2121
|------|-----------|-------------|--------------|
22-
| [LLM](./llm-tool.md) | Use Azure OpenAI large language models (LLM) for tasks such as text completion or chat. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
22+
| [Large language models](./llm-tool.md) | Use Azure OpenAI large language models for tasks such as text completion or chat. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
2323
| [Prompt](./prompt-tool.md) | Craft a prompt by using Jinja as the templating language. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
2424
| [Python](./python-tool.md) | Run Python code. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
2525
| [Azure OpenAI GPT-4 Turbo with Vision](./azure-open-ai-gpt-4v-tool.md) | Use AzureOpenAI GPT-4 Turbo with Vision model deployment to analyze images and provide textual responses to questions about them. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
2626
| [Content Safety (Text)](./content-safety-tool.md) | Use Azure AI Content Safety to detect harmful content. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
27-
| [Index Lookup*](./index-lookup-tool.md) | Search an Azure Machine Learning Vector Index for relevant results using one or more text queries. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) |
27+
| [Index Lookup*](./index-lookup-tool.md) | Search an Azure Machine Learning Vector Index for relevant results by using one or more text queries. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) |
2828
| [Vector Index Lookup*](./vector-index-lookup-tool.md) | Search text or a vector-based query from a vector index. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) |
2929
| [Faiss Index Lookup*](./faiss-index-lookup-tool.md) | Search a vector-based query from the Faiss index file. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) |
3030
| [Vector DB Lookup*](./vector-db-lookup-tool.md) | Search a vector-based query from an existing vector database. | Default | [promptflow-vectordb](https://pypi.org/project/promptflow-vectordb/) |
3131
| [Embedding](./embedding-tool.md) | Use Azure OpenAI embedding models to create an embedding vector that represents the input text. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
3232
| [Serp API](./serp-api-tool.md) | Use Serp API to obtain search results from a specific search engine. | Default | [promptflow-tools](https://pypi.org/project/promptflow-tools/) |
33-
| [Azure AI Language tools*](https://microsoft.github.io/promptflow/integrations/tools/azure-ai-language-tool.html) | This collection of tools is a wrapper for various Azure AI Language APIs, which can help effectively understand and analyze documents and conversations. The capabilities currently supported include: Abstractive Summarization, Extractive Summarization, Conversation Summarization, Entity Recognition, Key Phrase Extraction, Language Detection, PII Entity Recognition, Conversational PII, Sentiment Analysis, Conversational Language Understanding, Translator. You can learn how to use them by the [Sample flows](https://github.com/microsoft/promptflow/tree/e4542f6ff5d223d9800a3687a7cfd62531a9607c/examples/flows/integrations/azure-ai-language). Support contact: [email protected] | Custom | [promptflow-azure-ai-language](https://pypi.org/project/promptflow-azure-ai-language/) |
33+
| [Azure AI Language tools*](https://microsoft.github.io/promptflow/integrations/tools/azure-ai-language-tool.html) | This collection of tools is a wrapper for various Azure AI Language APIs, which can help effectively understand and analyze documents and conversations. The capabilities currently supported include Abstractive Summarization, Extractive Summarization, Conversation Summarization, Entity Recognition, Key Phrase Extraction, Language Detection, PII Entity Recognition, Conversational PII, Sentiment Analysis, Conversational Language Understanding, and Translator. You can learn how to use them by the [Sample flows](https://github.com/microsoft/promptflow/tree/e4542f6ff5d223d9800a3687a7cfd62531a9607c/examples/flows/integrations/azure-ai-language). Support contact: [email protected] | Custom | [promptflow-azure-ai-language](https://pypi.org/project/promptflow-azure-ai-language/) |
3434

35-
_*The asterisk marks indicate custom tools, which are created by the community that extend prompt flow's capabilities for specific use cases. They aren't officially maintained or endorsed by prompt flow team. When you encounter questions or issues for these tools, please prioritize using the support contact if it is provided in the description._
35+
_*The asterisks indicate custom tools that the community created. Custom tools extend prompt flow's capabilities for specific use cases. The prompt flow team doesn't officially maintain or endorse these tools. When you encounter questions or issues for these tools, prioritize by using the support contact if the description provides it._
3636

3737
To discover more custom tools developed by the open-source community, see [More custom tools](https://microsoft.github.io/promptflow/integrations/tools/index.html).
3838

3939
## Remarks
4040
- If existing tools don't meet your requirements, you can [develop your own custom tool and make a tool package](https://microsoft.github.io/promptflow/how-to-guides/develop-a-tool/create-and-use-tool-package.html).
41-
- To install the custom tools, if you're using the automatic runtime, you can readily install the publicly released package by adding the custom tool package name into the `requirements.txt` file in the flow folder. Then select the **Save and install** button to start installation. After completion, you can see the custom tools displayed in the tool list. In addition, if you want to use local or private feed package, please build an image first, then set up the runtime based on your image. To learn more, see [How to create and manage a runtime](../create-manage-runtime.md).
42-
:::image type="content" source="../../media/prompt-flow/install-package-on-automatic-runtime.png" alt-text="Screenshot of how to install packages on automatic runtime."lightbox = "../../media/prompt-flow/install-package-on-automatic-runtime.png":::
41+
- To install the custom tools, if you're using the automatic runtime, you can readily install the publicly released package by adding the custom tool package name in the `requirements.txt` file in the flow folder. Then select **Save and install** to start installation. After completion, the custom tools appear in the tool list. If you want to use a local or private feed package, build an image first, and then set up the runtime based on your image. To learn more, see [How to create and manage a runtime](../create-manage-runtime.md).
42+
:::image type="content" source="../../media/prompt-flow/install-package-on-automatic-runtime.png" alt-text="Screenshot that shows how to install packages on automatic runtime."lightbox = "../../media/prompt-flow/install-package-on-automatic-runtime.png":::
4343

4444
## Next steps
4545

4646
- [Create a flow](../flow-develop.md)
47-
- [Build your own copilot using prompt flow](../../tutorials/deploy-copilot-ai-studio.md)
47+
- [Build your own copilot by using prompt flow](../../tutorials/deploy-copilot-ai-studio.md)

0 commit comments

Comments
 (0)