{"id":13755336,"url":"https://microsoft.github.io/promptflow/","last_synced_at":"2025-05-10T01:30:56.095Z","repository":{"id":192387862,"uuid":"660489378","full_name":"microsoft/promptflow","owner":"microsoft","description":"Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.","archived":false,"fork":false,"pushed_at":"2024-05-22T10:21:58.000Z","size":140032,"stargazers_count":8340,"open_issues_count":119,"forks_count":718,"subscribers_count":95,"default_branch":"main","last_synced_at":"2024-05-22T10:47:10.245Z","etag":null,"topics":["ai","ai-application-development","ai-applications","chatgpt","gpt","llm","prompt","prompt-engineering"],"latest_commit_sha":null,"homepage":"https://microsoft.github.io/promptflow/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T06:03:06.000Z","updated_at":"2024-08-15T06:40:25.990Z","dependencies_parsed_at":"2024-04-16T14:27:29.973Z","dependency_job_id":"0691ab83-b954-4cf3-b2fd-7f515cc4a262","html_url":"https://github.com/microsoft/promptflow","commit_stats":null,"previous_names":["microsoft/promptflow"],"tags_count":339,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpromptflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpromptflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpromptflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fpromptflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/promptflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224900798,"owners_count":17388942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-application-development","ai-applications","chatgpt","gpt","llm","prompt","prompt-engineering"],"created_at":"2024-08-03T10:00:52.530Z","updated_at":"2024-11-16T09:30:35.888Z","avatar_url":"https://github.com/microsoft.png","language":"Python","readme":"# Prompt flow\n\n[![Python package](https://img.shields.io/pypi/v/promptflow)](https://pypi.org/project/promptflow/)\n[![Python](https://img.shields.io/pypi/pyversions/promptflow.svg?maxAge=2592000)](https://pypi.python.org/pypi/promptflow/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow)](https://pypi.org/project/promptflow/)\n[![CLI](https://img.shields.io/badge/CLI-reference-blue)](https://microsoft.github.io/promptflow/reference/pf-command-reference.html)\n[![vsc extension](https://img.shields.io/visual-studio-marketplace/i/prompt-flow.prompt-flow?logo=Visual%20Studio\u0026label=Extension%20)](https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow)\n\n[![Doc](https://img.shields.io/badge/Doc-online-green)](https://microsoft.github.io/promptflow/index.html)\n[![Issue](https://img.shields.io/github/issues/microsoft/promptflow)](https://github.com/microsoft/promptflow/issues/new/choose)\n[![Discussions](https://img.shields.io/github/discussions/microsoft/promptflow)](https://github.com/microsoft/promptflow/issues/new/choose)\n[![CONTRIBUTING](https://img.shields.io/badge/Contributing-8A2BE2)](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md)\n[![License: MIT](https://img.shields.io/github/license/microsoft/promptflow)](https://github.com/microsoft/promptflow/blob/main/LICENSE)\n\n\u003e Welcome to join us to make prompt flow better by\n\u003e participating [discussions](https://github.com/microsoft/promptflow/discussions),\n\u003e opening [issues](https://github.com/microsoft/promptflow/issues/new/choose),\n\u003e submitting [PRs](https://github.com/microsoft/promptflow/pulls).\n\n**Prompt flow** is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation to production deployment and monitoring. It makes prompt engineering much easier and enables you to build LLM apps with production quality.\n\nWith prompt flow, you will be able to:\n\n- **Create and iteratively develop flow**\n    - 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.\n    - Debug and iterate your flows, especially [tracing interaction with LLMs](https://microsoft.github.io/promptflow/how-to-guides/tracing/index.html) with ease.\n- **Evaluate flow quality and performance**\n    - Evaluate your flow's quality and performance with larger datasets.\n    - Integrate the testing and evaluation into your CI/CD system to ensure quality of your flow.\n- **Streamlined development cycle for production**\n    - Deploy your flow to the serving platform you choose or integrate into your app's code base easily.\n    - (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).\n\n------\n\n## Installation\n\nTo get started quickly, you can use a pre-built development environment. **Click the button below** to open the repo in GitHub Codespaces, and then continue the readme!\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/promptflow?quickstart=1)\n\nIf you want to get started in your local environment, first install the packages:\n\nEnsure you have a python environment, `python\u003e=3.9, \u003c=3.11` is recommended.\n\n```sh\npip install promptflow promptflow-tools\n```\n\n## Quick Start ⚡\n\n**Create a chatbot with prompt flow**\n\nRun the command to initiate a prompt flow from a chat template, it creates folder named `my_chatbot` and generates required files within it:\n\n```sh\npf flow init --flow ./my_chatbot --type chat\n```\n\n**Setup a connection for your API key**\n\nFor OpenAI key, establish a connection by running the command, using the `openai.yaml` file in the `my_chatbot` folder, which stores your OpenAI key (override keys and name with --set to avoid yaml file changes):\n\n```sh\npf connection create --file ./my_chatbot/openai.yaml --set api_key=\u003cyour_api_key\u003e --name open_ai_connection\n```\n\nFor Azure OpenAI key, establish the connection by running the command, using the `azure_openai.yaml` file:\n\n```sh\npf connection create --file ./my_chatbot/azure_openai.yaml --set api_key=\u003cyour_api_key\u003e api_base=\u003cyour_api_base\u003e --name open_ai_connection\n```\n\n**Chat with your flow**\n\nIn 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\n\n\u003e 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.\n\nInteract with your chatbot by running: (press `Ctrl + C` to end the session)\n\n```sh\npf flow test --flow ./my_chatbot --interactive\n```\n\n**Core value: ensuring \"High Quality” from prototype to production**\n\nExplore our [**15-minute tutorial**](examples/tutorials/flow-fine-tuning-evaluation/promptflow-quality-improvement.md) that guides you through prompt tuning ➡ batch testing ➡ evaluation, all designed to ensure high quality ready for production.\n\nNext Step! Continue with the **Tutorial**  👇 section to delve deeper into prompt flow.\n\n## Tutorial 🏃‍♂️\n\nPrompt 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.\n\n### Develop your own LLM apps\n\n#### VS Code Extension\n\nWe also offer a VS Code extension (a flow designer) for an interactive flow development experience with UI.\n\n\u003cimg src=\"docs/media/readme/vsc.png\" alt=\"vsc\" width=\"1000\"/\u003e\n\nYou can install it from the \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow\"\u003evisualstudio marketplace\u003c/a\u003e.\n\n#### Deep delve into flow development\n\n[Getting started with prompt flow](./docs/how-to-guides/quick-start.md): A step by step guidance to invoke your first flow run.\n\n### Learn from use cases\n\n[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.\n\u003e More examples can be found [here](https://microsoft.github.io/promptflow/tutorials/index.html#samples). We welcome contributions of new use cases!\n\n### Setup for contributors\n\nIf you're interested in contributing, please start with our dev setup guide: [dev_setup.md](./docs/dev/dev_setup.md).\n\nNext Step! Continue with the **Contributing**  👇 section to contribute to prompt flow.\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft\ntrademarks or logos is subject to and must follow\n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\n## Code of Conduct\n\nThis project has adopted the\n[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the\n[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)\nor contact [opencode@microsoft.com](mailto:opencode@microsoft.com)\nwith any additional questions or comments.\n\n## Data Collection\n\nThe software may collect information about you and your use of the software and\nsend it to Microsoft if configured to enable telemetry.\nMicrosoft may use this information to provide services and improve our products and services.\nYou may turn on the telemetry as described in the repository.\nThere are also some features in the software that may enable you and Microsoft\nto collect data from users of your applications. If you use these features, you\nmust comply with applicable law, including providing appropriate notices to\nusers of your applications together with a copy of Microsoft's privacy\nstatement. Our privacy statement is located at\nhttps://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data\ncollection and use in the help documentation and our privacy statement. Your\nuse of the software operates as your consent to these practices.\n\n### Telemetry Configuration\n\nTelemetry collection is on by default.\n\nTo opt out, please run `pf config set telemetry.enabled=false` to turn it off.\n\n## License\n\nCopyright (c) Microsoft Corporation. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","funding_links":[],"categories":["文本生成","LLMs and ChatGPT","RAG Framework"],"sub_categories":["其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/microsoft.github.io%2Fpromptflow%2F","html_url":"https://awesome.ecosyste.ms/projects/microsoft.github.io%2Fpromptflow%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/microsoft.github.io%2Fpromptflow%2F/lists"}