Skip to content

Commit 858486a

Browse files
committed
fix
1 parent ab8a17d commit 858486a

File tree

4 files changed

+26
-42
lines changed

4 files changed

+26
-42
lines changed

articles/machine-learning/prompt-flow/how-to-end-to-end-azure-devops-with-prompt-flow.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Set up LLMOps with prompt flow and Azure DevOps
2+
title: LLMOps with prompt flow and Azure DevOps
33
titleSuffix: Azure Machine Learning
44
description: Learn how to set up a sample LLMOps environment and pipeline on Azure DevOps for prompt flow project
55
services: machine-learning
@@ -20,7 +20,7 @@ ms.custom:
2020

2121
Large Language Operations, or **LLMOps**, has become the cornerstone of efficient prompt engineering and LLM-infused application development and deployment. As the demand for LLM-infused applications continues to soar, organizations find themselves in need of a cohesive and streamlined process to manage their end-to-end lifecycle.
2222

23-
Azure Machine Learning allows you to integrate with [Azure DevOps pipeline](/azure/devops/pipelines/) to automate the LLM-infused application development lifecycle with prompt flow.
23+
Azure Machine Learning allows you to integrate with **Azure DevOps** to automate the LLM-infused application development lifecycle with prompt flow.
2424

2525
Azure Machine Learning Prompt Flow provides a streamlined and structured approach to developing LLM-infused applications. Its well-defined process and lifecycle guides you through the process of building, testing, optimizing, and deploying flows, culminating in the creation of fully functional LLM-infused solutions.
2626

@@ -76,13 +76,13 @@ The lifecycle comprises four distinct stages:
7676

7777
By adhering to this structured methodology, prompt flow empowers you to confidently develop, rigorously test, fine-tune, and deploy flows, leading to the creation of robust and sophisticated AI applications.
7878

79-
LLMOps prompt flow template formalize this structured methodology using code-first approach and helps you build LLM-infused apps using prompt flow using tools and process relevant to prompt flow. It offers a range of features including Centralized Code Hosting, Lifecycle Management, Variant and Hyperparameter Experimentation, A/B Deployment, reporting for all runs and experiments and more.
79+
LLMOps prompt flow template formalizes this structured methodology using code-first approach and helps you build LLM-infused apps using prompt flow using tools and process relevant to prompt flow. It offers a range of features including Centralized Code Hosting, Lifecycle Management, Variant and Hyperparameter Experimentation, A/B Deployment, reporting for all runs and experiments and more.
8080

8181
The repository for this article is available at [LLMOps with Prompt flow template](https://github.com/microsoft/llmops-promptflow-template)
8282

8383
## LLMOps process Flow
8484

85-
:::image type="content" source="./media/how-to-end-to-end-azure-devops-with-prompt-flow/llmops-prompt-flow-process.png" alt-text="LLMOps prompt flow process." lightbox = "./media/how-to-end-to-end-azure-devops-with-prompt-flow/llmops-prompt-flow-process.png":::
85+
:::image type="content" source="./media/how-to-end-to-end-azure-devops-with-prompt-flow/large-language-model-operations-prompt-flow-process.png" alt-text="Screenshot of LLMOps prompt flow process." lightbox = "./media/how-to-end-to-end-azure-devops-with-prompt-flow/large-language-model-operations-prompt-flow-process.png":::
8686

8787
1. This is the initialization stage. Here, flows are developed, data is prepared and curated and LLMOps related configuration files are updated.
8888
2. After local development using Visual Studio Code along with prompt flow extension, a pull request is raised from feature branch to development branch. This results in executed the Build validation pipeline. It also executes the experimentation flows.
@@ -119,7 +119,7 @@ From here on, you can learn **LLMOps with prompt flow** by following the end-to-
119119
>The CLI commands in this article were tested using Bash. If you use a different shell, you may encounter errors.
120120
121121

122-
## Setup prompt flow
122+
## Set up prompt flow
123123

124124
Prompt flow uses connections resource to connect to endpoints like Azure OpenAI, OpenAI or Azure AI Search and uses runtime for the execution of the flows. These resources should be created before executing the flows in prompt flow.
125125

@@ -134,9 +134,9 @@ Click on the link to know more about [connections](./concept-connections.md).
134134
> The sample flows use 'aoai' connection and connection named 'aoai' should be created to execute them.
135135
136136

137-
### Setup compute and runtime for prompt flow
137+
### Set up compute and runtime for prompt flow
138138

139-
Runtime can be created through **prompt flow portal UI** or using the **REST API**. Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#setup-runtime-for-prompt-flow) to setup compute and runtime for prompt flow.
139+
Runtime can be created through **prompt flow portal UI** or using the **REST API**. Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#setup-runtime-for-prompt-flow) to set up compute and runtime for prompt flow.
140140

141141
Click on the link to know more about [runtime](./concept-runtime.md).
142142

@@ -145,15 +145,15 @@ Click on the link to know more about [runtime](./concept-runtime.md).
145145
> The same runtime name should be used in the LLMOps_config.json file explained later.
146146
147147

148-
## Setup Azure Service Principal
148+
## Set up Azure Service Principal
149149

150150
An **Azure Service Principal** is a security identity that applications, services, and automation tools use to access Azure resources. It represents an application or service that needs to authenticate with Azure and access resources on your behalf. Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#create-azure-service-principal) to create Service Principal in Azure.
151151

152-
This Service Principal is later used to configure Azure DevOps Service connection and Azure DevOps pipelines to authenticate and connect to Azure Services. The jobs executed in Prompt Flow for both `experiment and evaluation runs` are under the identity of this Service Principal. Moreover, both the `compute` and `runtime` are created using the same Service Principal.
152+
This Service Principal is later used to configure Azure DevOps Service connection and Azure DevOps to authenticate and connect to Azure Services. The jobs executed in Prompt Flow for both `experiment and evaluation runs` are under the identity of this Service Principal. Moreover, both the `compute` and `runtime` are created using the same Service Principal.
153153

154154
> [!TIP]
155155
>
156-
>The setup provides `owner` permissions to the Service Principal.
156+
>The set up provides `owner` permissions to the Service Principal.
157157
> * This is because the CD Pipeline automatically provides access to the newly provisioned Azure Machine Learning Endpoint access to Azure Machine Learning workspace for reading connections information.
158158
> * It also adds it to Azure Machine Learning Workspace associated key vault policy with `get` and `list` secret permissions.
159159
>
@@ -170,7 +170,7 @@ Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-te
170170

171171
### Set up authentication between Azure DevOps and Azure
172172

173-
Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#set-up-authentication-with-azure-and-azure-devops) to use the earlier created [Service Principal](#setup-azure-service-principal) and setup authentication between Azure DevOps and Azure Services.
173+
Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#set-up-authentication-with-azure-and-azure-devops) to use the earlier created [Service Principal](#setup-azure-service-principal) and set up authentication between Azure DevOps and Azure Services.
174174

175175
This step configures a new Azure DevOps Service Connection that stores the Service Principal information. The pipelines in the project can read the connection information using the connection name. This helps to configure Azure DevOps pipeline steps to connect to Azure automatically.
176176

@@ -184,24 +184,24 @@ The Service principal name is available automatically as environment variable to
184184

185185
### Configure Azure DevOps repository and pipelines
186186

187-
This repo uses two branches - `main` and `development` for code promotions and execution of pipelines in lieu of changes to code in them. Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#configure-azure-devops-local-and-remote-repository) to setup your own local as well as remote repository to use code from this repository.
187+
This repo uses two branches - `main` and `development` for code promotions and execution of pipelines in lieu of changes to code in them. Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#configure-azure-devops-local-and-remote-repository) to set up your own local as well as remote repository to use code from this repository.
188188

189-
The steps involves cloning both the `main` and `development branches` from the repository and associating the code to refer to the new Azure DevOps repository. Apart from code migration, pipelines - both PR and dev pipelines are configured such that they are executed automatically based on PR creation and merge triggers.
189+
The steps involve cloning both the `main` and `development branches` from the repository and associating the code to refer to the new Azure DevOps repository. Apart from code migration, pipelines - both PR and dev pipelines are configured such that they are executed automatically based on PR creation and merge triggers.
190190

191-
The branch policy for development branch should also configured to execute PR pipeline for any PR raised on development branch from a feature branch. The 'dev' pipeline is executed when the PR is merged to the development branch. The 'dev' pipeline consists of both CI and CD phases.
191+
The branch policy for development branch should also be configured to execute PR pipeline for any PR raised on development branch from a feature branch. The 'dev' pipeline is executed when the PR is merged to the development branch. The 'dev' pipeline consists of both CI and CD phases.
192192

193-
There is also **human in the loop** implemented within the pipelines. After the CI phase in `dev` pipeline is executed, the CD phase follows after manual approval. The approval should happen from Azure DevOps pipeline build execution UI. The default time-out is 60 minutes after which the pipeline will be rejected and CD phase will not execute. Manually approving the execution will lead to execution of the CD steps of the pipeline. The manual approval is configured to send notifications to '[email protected]'. It should be replaced with an appropriate email Id.
193+
There is also **human in the loop** implemented within the pipelines. After the CI phase in `dev` pipeline is executed, the CD phase follows after manual approval. The approval should happen from Azure DevOps pipeline build execution UI. The default time-out is 60 minutes after which the pipeline will be rejected and CD phase will not execute. Manually approving the execution will lead to execution of the CD steps of the pipeline. The manual approval is configured to send notifications to '[email protected]'. It should be replaced with an appropriate email ID.
194194

195195
## Test the pipelines
196196

197-
Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#test-the-pipelines) mentioned at to test the pipelines.
197+
Please follow the [guidelines](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#test-the-pipelines) mentioned at to test the pipelines.
198198

199199
The steps are:
200200

201201
1. Raise a PR(Pull Request) from a feature branch to development branch.
202202
2. The PR pipeline should execute automatically as result of branch policy configuration.
203203
3. The PR is then merged to the development branch.
204-
4. The associated 'dev' pipeline is executed. This will result in full CI and CD execution and result in provisioning or updation of existing Azure Machine Learning Endpoints.
204+
4. The associated 'dev' pipeline is executed. This will result in full CI and CD execution and result in provisioning or updating of existing Azure Machine Learning Endpoints.
205205

206206
The test outputs should be similar to ones shown at [here](https://github.com/microsoft/llmops-promptflow-template/blob/main/docs/Azure_devops_how_to_setup.md#example-prompt-run-evaluation-and-deployment-scenario).
207207

@@ -216,7 +216,7 @@ To harness the capabilities of the **local execution**, follow these installatio
216216
git clone https://github.com/microsoft/llmops-promptflow-template.git
217217
```
218218

219-
2. **setup env file**: create .env file at top folder level and provide information for items mentioned. Add as many connection names as needed. All the flow examples in this repo uses AzureOpenAI connection named `aoai`. Add a line `aoai={"api_key": "","api_base": "","api_type": "azure","api_version": "2023-03-15-preview"}` with updated values for api_key and api_base. If additional connections with different names are used in your flows, they should be added accordingly. Currently, flow with AzureOpenAI as provider as supported.
219+
2. **Set up env file**: create .env file at top folder level and provide information for items mentioned. Add as many connection names as needed. All the flow examples in this repo use AzureOpenAI connection named `aoai`. Add a line `aoai={"api_key": "","api_base": "","api_type": "azure","api_version": "2023-03-15-preview"}` with updated values for api_key and api_base. If additional connections with different names are used in your flows, they should be added accordingly. Currently, flow with AzureOpenAI as provider as supported.
220220

221221
```bash
222222

0 commit comments

Comments
 (0)