docs: add prompt management (#740)

add prompt management
This commit is contained in:
FangYin Cheng 2023-10-26 22:36:32 +08:00 committed by GitHub
commit da3f795d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 144 additions and 14 deletions

View File

@ -6,9 +6,9 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: DB-GPT 0.3.0\n" "Project-Id-Version: DB-GPT 👏👏 0.4.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-14 22:33+0800\n" "POT-Creation-Date: 2023-10-26 19:57+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
@ -17,23 +17,112 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n" "Generated-By: Babel 2.13.1\n"
#: ../../modules/prompts.md:1 b9279c238c014a74aecbc75b5d3dc202 #: ../../modules/prompts.md:1 00907f941b7743b99278d7fd0b67e5d3
msgid "Prompts" msgid "Prompts"
msgstr "" msgstr "Prompts"
#: ../../modules/prompts.md:3 f0c720c1c85b401cbc26ed0eb3f6e70e #: ../../modules/prompts.md:3 f1c7042cba32483b90ab22db28e369a9
msgid "" msgid ""
"Prompt is a very important part of the interaction between the large " "**Prompt** is a very important part of the interaction between the large "
"model and the user, and to a certain extent, it determines the quality " "model and the user, and to a certain extent, it determines the quality "
"and accuracy of the answer generated by the large model. In this project," "and accuracy of the answer generated by the large model. In this project,"
" we will automatically optimize the corresponding prompt according to " " we will automatically optimize the corresponding Prompt according to "
"user input and usage scenarios, making it easier and more efficient for " "user input and usage scenarios, making it easier and more efficient for "
"users to use large language models." "users to use large language models."
msgstr "Prompt是与大模型交互过程中非常重要的部分一定程度上Prompt决定了大模型生成答案的质量与准确性在本的项目中我们会根据用户输入与使用场景自动优化对应的Prompt让用户使用大语言模型变得更简单、更高效。" msgstr "**Prompt**是大模型与用户交互中非常重要的一环,在一定程度上决定了大模型生成答案的质量和准确性。在这个项目中,我们会根据用户输入和使用场景自动地优化相应提示,让用户更轻松、更高效地使用大语言模型。"
#: ../../modules/prompts.md:5 6576d32e28a14be6a5d8180eed000aa7 #: ../../modules/prompts.md:5 695c05f96a2c4077a0a25f5f6dc22d31
msgid "1.DB-GPT Prompt" msgid "Prompt Management"
msgstr "" msgstr "Prompt 管理"
#: ../../modules/prompts.md:7 325254a0ceba48b8aa19a4cf66d18c12
msgid ""
"Here, you can choose to create a Prompt in **Public Prompts** space or "
"**Private Prompts** space."
msgstr "该页面允许用户选择**公共Prompts**或者**私有Prompts**空间来创建相应的 Prompt。"
#: ../../modules/prompts.md:11 4528a48a14d246d8874c1b31819d3f4f
msgid ""
"The difference between **Public Prompts** and **Private Prompts** is that"
" Prompts in **Public Prompts** space can be viewed and used by all users,"
" while prompts in **Private Prompts** space can only be viewed and used "
"by the owner."
msgstr "**公共 Prompts**和**私有 Prompts**空间的区别在于,**公共 Prompts**空间下的 Prompt 可供所有的用户查看和使用,而**私有 Prompts**空间下的 Prompt 只能被所有者查看和使用。"
#: ../../modules/prompts.md:13 45fdbc12758c4cb3aa71f5616c75a6e6
msgid "Create Prompt"
msgstr "创建 Prompt"
#: ../../modules/prompts.md:15 850b9c136d5949939c3966b6bff8204e
msgid "Click the \"Add Prompts\" button to pop up the following subpage:"
msgstr "点击 \"新增Prompts\"按钮可以弹出如下的子页面:"
#: ../../modules/prompts.md:19 9db6614fcc454bddbf2e3257232e7c93
msgid ""
"**Scene**: It is assumed here that when we have a lot of Prompts, we "
"often classify the Prompts according to scene, such as Prompts in the "
"chat knowledge scene, Prompts in the chat data scene, Prompts in the chat"
" normal scene, etc."
msgstr "**场景**:这里假设,当我们有很多 Prompts 时,往往会根据场景对 Prompts 进行分类,比如在 DB-GPT 项目中chat knowledge 场景的 Prompts、chat data 场景的 Prompts、chat normal 场景的 Prompts 等等。"
#: ../../modules/prompts.md:21 45a0a38ceafe4575a5957b2de8c0661f
msgid ""
"**Sub Scene**: Continuing with the above, assuming that we have a lot of "
"Prompts, scene classification alone is not enough. For example, in the "
"chat data scenario, there can be many types of sub-scene: anomaly "
"recognition sub scene, attribution analysis sub scene, etc. sub scene is "
"used to distinguish subcategories under each scene."
msgstr "**次级场景**:接着上面的内容,如果我们的 Prompt 很多时,仅使用场景一级分类是不够的。例如,在 chat data 场景中,还可以细分为很多的次级场景:异常识别次级场景、归因分析次级场景等等。次级场景是用于区分每个场景下的子类别。"
#: ../../modules/prompts.md:23 78544fc530114bb0bc0a753811e9ce58
msgid ""
"**Name**: Considering that a Prompt generally contains a lot of content, "
"for ease of use and easy search, we need to name the Prompt. Note: The "
"name of the Prompt is not allowed to be repeated. Name is the unique key "
"that identifies a Prompt."
msgstr "**名称**:考虑到每个 Prompt 的内容会非常多,为了方便用户使用和搜索,我们需要给每个 Prompt 命名。注意Prompt 的名称不允许重复,名称是一个 Prompt 的唯一键。"
#: ../../modules/prompts.md:25 f44598d2f2a4429d8c1624feca65c867
msgid "**Content**: Here is the actual Prompt content that will be input to LLM."
msgstr "**内容**:这里是实际要输入 LLM 的提示内容。"
#: ../../modules/prompts.md:27 2384fc6006e74e9f94966f6112e6bb06
msgid "Edit Prompt"
msgstr "编辑 Prompt"
#: ../../modules/prompts.md:29 efe8e16acc584f258645b1b20d891f71
msgid ""
"Existing Prompts can be edited. Note that except **name**, other items "
"can be modified."
msgstr "已有的 Prompts 可以被编辑,除了名称不可修改,其余的内容均可修改。"
#: ../../modules/prompts.md:33 b1a82b4d88584275955087114cdcf574
msgid "Delete Prompt"
msgstr "删除 Prompt"
#: ../../modules/prompts.md:35 e4e55367b8574324937f8b3006e7d3cd
msgid ""
"Ordinary users can only delete Prompts created by themselves in the "
"private Prompts space. Administrator users can delete Prompts in public "
"Prompts spaces and private Prompts spaces."
msgstr "普通用户只能删除他们自己在私有 Prompts 空间中创建的 Prompts管理员可以删除 公共 Prompts 空间下的 Prompts也可以删除私有 Prompts 空间下的 Prompts即使 Prompts 的创建者不是管理员)。"
#: ../../modules/prompts.md:38 ad8210816c524908bd131ffa9adae07c
msgid "Use Prompt"
msgstr "使用 Prompt"
#: ../../modules/prompts.md:40 e7dd1e88f47647ecbfaf02a0d068b3f9
msgid ""
"Users can find and use Prompts next to the input boxes in each scene. "
"Click to view all contents of Prompts library."
msgstr "用户可以在每个场景中的输入框旁边找到并使用 Prompts。 点击悬浮图标可以查看当前用户能使用的全部 Prompts。"
#: ../../modules/prompts.md:42 38b6c173235c4f8499da14496a5a78b3
msgid ""
"✓ Hover the mouse over each Prompt to preview the Prompt content. ✓ "
"Click Prompt to automatically fill in the Prompt content in the input "
"box."
msgstr "✓ 将鼠标悬停在每个 Prompt 上,可预览 Prompt 的内容。 ✓ 单击对应的 Prompt可自动将 Prompt 的内容填充到输入框中。"

View File

@ -1,5 +1,46 @@
# Prompts # Prompts
Prompt is a very important part of the interaction between the large model and the user, and to a certain extent, it determines the quality and accuracy of the answer generated by the large model. In this project, we will automatically optimize the corresponding prompt according to user input and usage scenarios, making it easier and more efficient for users to use large language models. **Prompt** is a very important part of the interaction between the large model and the user, and to a certain extent, it determines the quality and accuracy of the answer generated by the large model. In this project, we will automatically optimize the corresponding Prompt according to user input and usage scenarios, making it easier and more efficient for users to use large language models.
### 1.DB-GPT Prompt ## Prompt Management
Here, you can choose to create a Prompt in **Public Prompts** space or **Private Prompts** space.
<img width="1657" alt="image" src="https://github.com/eosphoros-ai/DB-GPT/assets/44772254/64d3b666-b8da-48f4-85fe-bf128381c715">
The difference between **Public Prompts** and **Private Prompts** is that Prompts in **Public Prompts** space can be viewed and used by all users, while prompts in **Private Prompts** space can only be viewed and used by the owner.
### Create Prompt
Click the "Add Prompts" button to pop up the following subpage:
<img width="1658" alt="image" src="https://github.com/eosphoros-ai/DB-GPT/assets/44772254/18fac6df-e050-4e41-aac9-bb4a4728a79b">
**Scene**: It is assumed here that when we have a lot of Prompts, we often classify the Prompts according to scene, such as Prompts in the chat knowledge scene, Prompts in the chat data scene, Prompts in the chat normal scene, etc.
**Sub Scene**: Continuing with the above, assuming that we have a lot of Prompts, scene classification alone is not enough. For example, in the chat data scenario, there can be many types of sub-scene: anomaly recognition sub scene, attribution analysis sub scene, etc. sub scene is used to distinguish subcategories under each scene.
**Name**: Considering that a Prompt generally contains a lot of content, for ease of use and easy search, we need to name the Prompt. Note: The name of the Prompt is not allowed to be repeated. Name is the unique key that identifies a Prompt.
**Content**: Here is the actual Prompt content that will be input to LLM.
### Edit Prompt
Existing Prompts can be edited. Note that except **name**, other items can be modified.
<img width="1881" alt="image" src="https://github.com/eosphoros-ai/DB-GPT/assets/44772254/28c66fdb-0dd4-48d1-8604-211b4cced8b6">
### Delete Prompt
Ordinary users can only delete Prompts created by themselves in the private Prompts space. Administrator users can delete Prompts in public Prompts spaces and private Prompts spaces.
## Use Prompt
Users can find and use Prompts next to the input boxes in each scene. Click to view all contents of Prompts library.
✓ Hover the mouse over each Prompt to preview the Prompt content.
✓ Click Prompt to automatically fill in the Prompt content in the input box.
<img width="1907" alt="image" src="https://github.com/eosphoros-ai/DB-GPT/assets/44772254/f63999bc-6b7b-439f-81b7-b9271e65b17b">
<img width="1902" alt="image" src="https://github.com/eosphoros-ai/DB-GPT/assets/44772254/414ab0db-b961-487f-99a8-1edf8f173ebc">