此存储库包含用于插入GPT外部检索器服务的说明和模板,由 Zilliz Cloud Pipelines 提供支持。
Zilliz Cloud Pipelines是一站式检索服务。通过将此外部检索服务配置为 GPT“操作”,此方法为默认 GPT 知识库提供了更灵活、更经济的替代方案。
在这里尝试现场演示:https://chat.openai.com/g/g-CXDhOVcGf-ask-about-2023(使用 GPT 需要订阅 ChatGPT Plus)
Zilliz Cloud Pipelines 是免费的 DevOps、高度可扩展且经济的。与仅接受上传文件的默认 GPT 检索功能相比,该服务支持丰富的定制,例如多种分块策略、BAAI、Voyage AI 和 OpenAI 嵌入模型的选择,以及可选的重新排名功能(3 月初即将推出)。
在 GPT 中,只需从此存储库复制 API 配置和提示即可完成与 Zilliz Cloud Pipelines 的集成。
该 GPT 简化了 Zilliz Cloud Pipelines 的管理,使用户能够通过简单的命令轻松列出、创建、运行和删除管道。
本教程展示如何使用 Zilliz Cloud Pipelines 构建您自己的具有检索功能的 GPT。
在本快速入门指南中,我们构建了一个演示 GPTs Ask about 2023 ,它可以回答有关 2023 年发生的事件的问题。ChatGPT 没有 2023 年的信息,因此正确的答案将取决于从外部知识库检索相关信息,例如本案例使用 Zilliz Cloud Pipelines 实现。
在 Zilliz Cloud 上注册以获取帐户或使用现有的 Zilliz Cloud 帐户。
按照说明创建管道。这些管道可以提取/搜索/删除矢量数据库上的知识。创建摄取、搜索和删除管道后。记下搜索管道 ID : pipe-xxxxxxxxxxxx
和您的API-Key 。它们将用于在 GPT 上设置 Action。
通过运行摄取管道来索引知识文档:导航到 Pipeline Playground,输入doc_url
字段,然后单击运行以摄取文档。
"doc_url": " https://raw.githubusercontent.com/wxywb/raw_resources/master/2023.pdf "
单击创建新操作以设置新操作。
将 YAML 文件 rag.yaml 中的内容插入到 GPT 操作架构字段中。
将 SearchPipelineID 替换为您之前记下的搜索管道 ID: pipe-xxxxxxxxxxxx
。
配置身份验证以允许 GPT 调用 Zilliz Cloud API:
单击身份验证。
选择 API-key 作为身份验证类型,选择 Bearer 作为身份验证类型。
输入从您的 Zilliz Cloud 帐户获取的 API 密钥。
https://openai.com/policies/terms-of-use
GPT 需要指令来指导他们的行为,以便在聊天期间他们可以正确使用上述定义的操作来检索相关知识。说明应该清晰简洁,提供对 GPT 功能和限制的全面理解。
说明应包括两部分,第一部分是GPT的一般说明,第二部分是使用action作为检索工具的提示。
在“配置”选项卡中,输入指令“第 1 部分” 。这是特定于您的应用程序的,解释了此 GPT 的用途。
This GPT is designed to inform users about events that occurred in 2023. It provides summaries, insights, and detailed
accounts of significant happenings from that year. It aims to be informative, engaging, and accurate in its
descriptions, ensuring users receive a comprehensive understanding of the year's events. When asked, it will focus on
delivering concise information about specific incidents, trends, developments in various fields such as technology,
global politics, health, and culture. It will avoid speculation and stick to verified information to maintain
credibility.
In cases where details are not clear or are disputed, the GPT may clarify that the information is based on available
sources as of its last training cut-off in April 2023. It will encourage users to consult up-to-date sources for the
latest information. The GPT is friendly and approachable in its tone, making historical information accessible and
interesting to a wide audience. It avoids sensitive topics with respect and care, ensuring that discussions are handled
with empathy and awareness of their complexity.
从 rag_prompt.md 复制指令第 2 部分并将其附加到上述指令中。这是为了指示 GPT 如何通过调用 Zilliz Cloud Pipelines 的 RESTful API 来触发检索外部知识的操作。
或者,您可以添加对话开始者来指导用户如何使用 GPT 提问。
单击“保存”以使用户可以访问您的 GPT。
现在您可以尝试使用 Zilliz Cloud Pipelines 作为外部知识库的新创建的 GPT。在 GPT 页面中,选择您创建的 GPT,然后开始提问。答案将基于 Zilliz Cloud Pipelines 上存储的 2023 年事件。
如果您对使用 GPT 的 Zilliz Cloud Pipelines 有疑问,请随时在此存储库中提出问题或联系我们的支持团队:电子邮件:[email protected]