|
3 | 3 | [](https://pypi.org/project/promptflow/)
|
4 | 4 | [](https://pypi.python.org/pypi/promptflow/)
|
5 | 5 | [](https://pypi.org/project/promptflow/)
|
| 6 | +[](https://microsoft.github.io/promptflow/reference/pf-command-reference.html) |
| 7 | +[](https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow) |
| 8 | + |
| 9 | +[](https://microsoft.github.io/promptflow/index.html) |
| 10 | +[](https://github.com/microsoft/promptflow/issues/new/choose) |
| 11 | +[](https://github.com/microsoft/promptflow/issues/new/choose) |
| 12 | +[](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md) |
6 | 13 | [](https://github.com/microsoft/promptflow/blob/main/LICENSE)
|
7 | 14 |
|
8 | 15 | > Welcome to join us to make Prompt flow better by
|
|
14 | 21 |
|
15 | 22 | With prompt flow, you will be able to:
|
16 | 23 |
|
17 |
| -- Create executable workflows that link LLMs, prompts, Python code and other tools together. |
18 |
| -- Debug and iterate your flows, especially the interaction with LLMs with ease. |
19 |
| -- Evaluate your flow's quality and performance with larger datasets. |
20 |
| -- Integrate the testing and evaluation into your CI/CD system to ensure quality of your flow. |
21 |
| -- Deploy your flow to the serving platform you choose or integrate into your app's code base easily. |
22 |
| -- (Optional but highly recommended) Collaborate with your team by leveraging the cloud version of [Prompt flow in Azure AI](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow?view=azureml-api-2). |
| 24 | +- **Create and iteratively develop flow** |
| 25 | + - Create executable [flows](https://microsoft.github.io/promptflow/concepts/concept-flows.html) that link LLMs, prompts, Python code and other [tools](https://microsoft.github.io/promptflow/concepts/concept-tools.html) together. |
| 26 | + - Debug and iterate your flows, especially the [interaction with LLMs](https://microsoft.github.io/promptflow/concepts/concept-connections.html) with ease. |
| 27 | +- **Evaluate flow quality and performance** |
| 28 | + - Evaluate your flow's quality and performance with larger datasets. |
| 29 | + - Integrate the testing and evaluation into your CI/CD system to ensure quality of your flow. |
| 30 | +- **Streamlined development cycle for production** |
| 31 | + - Deploy your flow to the serving platform you choose or integrate into your app's code base easily. |
| 32 | + - (Optional but highly recommended) Collaborate with your team by leveraging the cloud version of [Prompt flow in Azure AI](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow?view=azureml-api-2). |
| 33 | + |
| 34 | +------ |
| 35 | + |
| 36 | +## Installation |
| 37 | + |
| 38 | +Ensure you have a python environment, `python=3.9` is recommended. |
| 39 | + |
| 40 | +```sh |
| 41 | +pip install promptflow promptflow-tools |
| 42 | +``` |
| 43 | + |
| 44 | +## Quick Start ⚡ |
| 45 | + |
| 46 | +**Create a chatbot with prompt flow** |
| 47 | + |
| 48 | +Run the command to initiate a prompt flow from a chat template, it creates folder named `my_chatbot` and generates required files within it: |
| 49 | + |
| 50 | +```sh |
| 51 | +pf flow init --flow ./my_chatbot --type chat |
| 52 | +``` |
| 53 | + |
| 54 | +**Setup a connection for your API key** |
| 55 | + |
| 56 | +For OpenAI key, establish a connection by running the command, using the `openai.yaml` file in the `my_chatbot` folder, which stores your OpenAI key: |
| 57 | + |
| 58 | +```sh |
| 59 | +# Override keys with --set to avoid yaml file changes |
| 60 | +pf connection create --file ./my_chatbot/openai.yaml --set api_key=<your_api_key> --name open_ai_connection |
| 61 | +``` |
| 62 | + |
| 63 | +For Azure OpenAI key, establish the connection by running the command, using the `azure_openai.yaml` file: |
| 64 | + |
| 65 | +```sh |
| 66 | +pf connection create --file ./my_chatbot/azure_openai.yaml --set api_key=<your_api_key> api_base=<your_api_base> --name open_ai_connection |
| 67 | +``` |
| 68 | + |
| 69 | +**Chat with your flow** |
| 70 | + |
| 71 | +In the `my_chatbot` folder, there's a `flow.dag.yaml` file that outlines the flow, including inputs/outputs, nodes, connection, and the LLM model, etc |
| 72 | + |
| 73 | +> Note that in the `chat` node, we're using a connection named `open_ai_connection` (specified in `connection` field) and the `gpt-35-turbo` model (specified in `deployment_name` field). The deployment_name filed is to specify the OpenAI model, or the Azure OpenAI deployment resource. |
| 74 | +
|
| 75 | +Interact with your chatbot by running: (press `Ctrl + C` to end the session) |
| 76 | + |
| 77 | +```sh |
| 78 | +pf flow test --flow ./my_chatbot --interactive |
| 79 | +``` |
| 80 | + |
| 81 | +Next Step! Continue with the **Tutorial** 👇 section to delve deeper into Prompt flow. |
| 82 | + |
| 83 | +## Tutorial 🏃♂️ |
| 84 | + |
| 85 | +Prompt Flow is a tool designed to **build high quality LLM apps**, the development process in prompt flow follows these steps: develop a flow, improve the flow quality, deploy the flow to production. |
| 86 | + |
| 87 | +### Develop your own LLM apps |
| 88 | + |
| 89 | +#### VS Code Extension<img src="examples/tutorials/quick-start/media/logo_pf.png" alt="logo" width="25"/> |
| 90 | + |
| 91 | +We also offer a VS Code extension (a flow designer) for an interactive flow development experience with UI. |
| 92 | + |
| 93 | +<img src="examples/tutorials/quick-start/media/vsc.png" alt="vsc" width="1000"/> |
| 94 | + |
| 95 | +You can install it from the <a href="https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow">visualstudio marketplace</a>. |
| 96 | + |
| 97 | +#### Deep dive into flow development |
| 98 | + |
| 99 | +[Getting Started with Prompt Flow](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html): A step by step guidance to invoke your first flow run. |
| 100 | + |
| 101 | +### Learn from use cases |
| 102 | + |
| 103 | +[Tutorial: Chat with PDF](https://github.com/microsoft/promptflow/blob/main/examples/tutorials/e2e-development/chat-with-pdf.md): An end-to-end tutorial on how to build a high quality chat application with prompt flow, including flow development and evaluation with metrics. |
| 104 | +> More examples can be found [here](https://microsoft.github.io/promptflow/tutorials/index.html#samples). We welcome contributions of new use cases! |
23 | 105 |
|
24 |
| -## Get Started with Prompt flow ⚡ |
| 106 | +### Setup for contributors |
25 | 107 |
|
26 |
| -Develop your LLM apps with Prompt flow: please start with our [docs](https://microsoft.github.io/promptflow/) & [examples](./examples/README.md): |
27 |
| -- [Getting Started with Prompt Flow](https://microsoft.github.io/promptflow/how-to-guides/quick-start.html): A step by step guidance to invoke your first flow run. |
28 |
| -- [Tutorial: Chat with PDF](https://github.com/microsoft/promptflow/blob/main/examples/tutorials/e2e-development/chat-with-pdf.md): An end-to-end tutorial on how to build a high quality chat application with prompt flow, including flow development and evaluation with metrics. |
| 108 | +If you're interested in contributing, please start with our dev setup guide: [dev_setup.md](./docs/dev/dev_setup.md). |
29 | 109 |
|
30 |
| -Contribute to Prompt flow: please start with our dev setup guide: [dev_setup.md](./docs/dev/dev_setup.md). |
| 110 | +Next Step! Continue with the **Contributing** 👇 section to to contribute to Prompt flow. |
31 | 111 |
|
32 | 112 | ## Contributing
|
33 | 113 |
|
|
0 commit comments