GITBOOK-171: No subject

pull/100/head
vincehe 2024-05-24 12:24:57 +00:00 committed by gitbook-bot
parent daba0234f0
commit 17a1d609db
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
56 changed files with 46 additions and 43 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 KiB

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

After

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 KiB

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 732 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 KiB

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

After

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 KiB

After

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 KiB

After

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 KiB

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 KiB

After

Width:  |  Height:  |  Size: 439 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 KiB

After

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

After

Width:  |  Height:  |  Size: 583 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 KiB

After

Width:  |  Height:  |  Size: 758 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 KiB

After

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

After

Width:  |  Height:  |  Size: 674 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 445 KiB

After

Width:  |  Height:  |  Size: 712 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 KiB

After

Width:  |  Height:  |  Size: 660 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 573 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 573 KiB

After

Width:  |  Height:  |  Size: 525 KiB

View File

@ -8,11 +8,11 @@
为了方便快速上手使用,您可以在“探索”中找到智能助手的应用模板,添加到自己的工作区,或者在此基础上进行自定义。在全新的 Dify 工作室中你也可以从零编排一个专属于你自己的智能助手帮助你完成财务报表分析、撰写报告、Logo 设计、旅程规划等任务。
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>探索-智能助手应用模板</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>探索-智能助手应用模板</p></figcaption></figure>
在“工作室-助手型应用”内选择智能助手即可开始编排。
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1).png" alt=""><figcaption><p>工作室-构建智能助手</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>工作室-构建智能助手</p></figcaption></figure>
选择智能助手的推理模型,智能助手的任务完成能力取决于模型推理能力,我们建议在使用智能助手时选择推理能力更强的模型系列如 gpt-4 以获得更稳定的任务完成效果。
@ -20,7 +20,7 @@
你可以在“提示词”中编写智能助手的指令,为了能够达到更优的预期效果,你可以在指令中明确它的任务目标、工作流程、资源和限制等。
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>编排智能助手的指令提示词</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>编排智能助手的指令提示词</p></figcaption></figure>
### 添加助手需要的工具
@ -30,7 +30,7 @@
你可以直接使用 Dify 生态提供的第一方内置工具,或者轻松导入自定义的 API 工具(目前支持 OpenAPI / Swagger 和 OpenAI Plugin 规范)。
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt=""><figcaption><p>添加助手需要的工具</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>添加助手需要的工具</p></figcaption></figure>
工具使用户可以在 Dify 上创建更强大的 AI 应用如你可以为智能助理型应用Agent编排合适的工具它可以通过任务推理、步骤拆解、调用工具完成复杂任务。另外工具也可以方便将你的应用与其他系统或服务连接与外部环境交互如代码执行、对专属信息源的访问等。
@ -48,7 +48,7 @@
您可以为智能助手配置一套会话开场白和开场问题,配置的对话开场白将在每次用户初次对话中展示助手可以完成什么样的任务,以及可以提出的问题示例。
<figure><img src="../../.gitbook/assets/image (4) (1) (1).png" alt=""><figcaption><p>配置会话开场白和开场问题</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1) (1) (1).png" alt=""><figcaption><p>配置会话开场白和开场问题</p></figcaption></figure>
### 调试与预览

View File

@ -53,7 +53,7 @@
通过进入“应用构建->日志与标注->标注”开启标注回复开关:
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>日志与标注中开启标注回复</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>日志与标注中开启标注回复</p></figcaption></figure>
### 在标注后台设置标注回复参数
@ -63,7 +63,7 @@
**Embedding 模型**:用于对标注文本进行向量化,切换模型时会重新生成嵌入。
<figure><img src="../../.gitbook/assets/image (4) (1) (1) (1) (1).png" alt=""><figcaption><p>设置标注回复参数</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>设置标注回复参数</p></figcaption></figure>
### 批量导入标注问答对

View File

@ -93,7 +93,7 @@ Dify 目前已支持 Cohere Rerank 模型,通过进入“模型供应商-> Coh
通过进入“数据集->创建数据集->检索设置”页面并在添加 Rerank 设置。除了在创建数据集可以设置 Rerank ,你也可以在已创建的数据集设置内更改 Rerank 配置,在应用编排的数据集召回模式设置中更改 Rerank 配置。
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>数据集检索模式中设置 Rerank 模型</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>数据集检索模式中设置 Rerank 模型</p></figcaption></figure>
**TopK**:用于设置 Rerank 后返回相关文档的数量。
@ -101,4 +101,4 @@ Dify 目前已支持 Cohere Rerank 模型,通过进入“模型供应商-> Coh
通过进入“提示词编排->上下文->设置”页面中设置为多路召回模式时需开启 Rerank 模型。
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>数据集多路召回模式中设置 Rerank 模型</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>数据集多路召回模式中设置 Rerank 模型</p></figcaption></figure>

View File

@ -4,7 +4,7 @@
知识库内已上传的每个文档都会以文本分段Chunks的形式进行存储你可以在分段列表内查看每一个分段的具体文本内容。
<figure><img src="../../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption><p>查看已上传的文档分段</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1).png" alt=""><figcaption><p>查看已上传的文档分段</p></figcaption></figure>
***
@ -34,11 +34,11 @@
在分段列表内点击 「 添加分段 」 ,可以在文档内自行添加一个或批量添加多个自定义分段。
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
批量添加分段时,你需要先下载 CSV 格式的分段上传模板,并按照模板格式在 Excel 内编辑所有的分段内容,再将 CSV 文件保存后上传。
<figure><img src="../../.gitbook/assets/image (4) (1).png" alt=""><figcaption><p>批量添加自定义分段</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1) (1).png" alt=""><figcaption><p>批量添加自定义分段</p></figcaption></figure>
***

View File

@ -4,11 +4,11 @@
Dify 知识库内提供了文本召回测试的功能,用于调试不同检索方式及参数配置下的召回效果。你可以在 **源文本** 输入框输入常见的用户问题,点击 **测试** 并在右侧的 **召回段落** 查看召回结果。在 **最近查询** 内可以查看到历史的查询记录;若知识库已关联至应用内,由应用内触发的知识库查询也可以在此查看记录。
<figure><img src="../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption><p>召回测试</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1).png" alt=""><figcaption><p>召回测试</p></figcaption></figure>
点击源文本输入框右上角的图标可以更换当前知识库的检索方式和具体参数,**保存之后仅在召回测试的调试过程中生效**。在召回测试完成调试并确认更改知识库的检索参数时,需要在 [知识库设置 > 检索设置](retrieval\_test\_and\_citation.md#zhi-shi-ku-she-zhi) 中进行更改。
<figure><img src="../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption><p>召回测试-检索设置</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption><p>召回测试-检索设置</p></figcaption></figure>
**召回测试建议步骤:**
@ -27,8 +27,8 @@ Dify 知识库内提供了文本召回测试的功能,用于调试不同检索
在应用内测试知识库效果时,你可以进入 **工作室 -- 添加功能 -- 引用归属**,打开引用归属功能。
<figure><img src="../../.gitbook/assets/image (1) (1).png" alt=""><figcaption><p>打开引用与归属功能</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption><p>打开引用与归属功能</p></figcaption></figure>
开启功能后,当大语言模型回复问题时引用来自知识库的内容时,可以在回复内容下面查看到具体的引用段落信息,包括**原始分段文本、分段序号、匹配度**等。点击引用分段上方的 **跳转至知识库 **可以快捷访问该分段所在的知识库分段列表,方便开发者进行调试编辑。
<figure><img src="../../.gitbook/assets/image (2) (1).png" alt=""><figcaption><p>查看回复内容的引用信息</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption><p>查看回复内容的引用信息</p></figcaption></figure>

View File

@ -37,11 +37,11 @@ Notion集成分为**内部集成**internal integration和**外部集成**
点击“**New integration**”按钮,类型默认是 **Internal**(不可修改),选择关联的空间,输入集成名称并上传 logo 后点击“Submit”集成创建成功。
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
创建集成后,您可以根据需要在 Capabilities 选项卡下更新其设置,并在 Secrets 下点击 “Show” 按钮然后复制 Secrets。
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
复制后回到 Dify 源代码下,在 **.env** 文件里配置相关环境变量,环境变量如下:

View File

@ -35,7 +35,7 @@ Dify 目前已支持主流的模型供应商,例如 OpenAI 的 GPT 系列、An
Dify 在需要模型时,会根据使用场景来选择设置过的默认模型。在 `设置 > 模型供应商` 中设置默认模型。
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
### 接入模型设置

View File

@ -9,7 +9,7 @@ Dify 支持接入 Replicate 上的 [Language models](https://replicate.com/colle
3. 挑选模型。在 [Language models](https://replicate.com/collections/language-models) 和 [Embedding models](https://replicate.com/collections/embedding-models) 下挑选模型。
4. 在 Dify 的 `设置 > 模型供应商 > Replicate` 中添加模型。
<figure><img src="../../.gitbook/assets/image (4) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (4) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
API key 为第 2 步中设置的 API Key。Model Name 和 Model Version 可以在模型详情页中找到:

View File

@ -14,8 +14,8 @@
示例2输出图片+LLM回复
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt="" width="275"><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png" alt="" width="275"><figcaption></figcaption></figure>
提示:直接回复节点可以不作为最终的输出节点,作为流程过程节点时,可以在中间步骤流式输出结果。

View File

@ -10,32 +10,35 @@
常见情景:构建基于外部数据/知识的 AI 问答系统RAG。了解更多关于 RAG 的[基本概念](../../../learn-more/extended-reading/retrieval-augment/)。
下图为一个最基础的知识库问答系统示例,该流程的执行逻辑为:知识库检索作为 LLM 节点的前置步骤,在用户问题传递至 LLM 节点之前,先在知识检索节点内将匹配用户问题最相关的文本内容并召回,随后在 LLM 节点内将用户问题与检索到的上下文一同作为输入,让 LLM 根据检索内容来回复问题。
下图为一个最基础的知识库问答应用示例,该流程的执行逻辑为:知识库检索作为 LLM 节点的前置步骤,在用户问题传递至 LLM 节点之前,先在知识检索节点内将匹配用户问题最相关的文本内容并召回,随后在 LLM 节点内将用户问题与检索到的上下文一同作为输入,让 LLM 根据检索内容来回复问题。
<figure><img src="../../../.gitbook/assets/image (193).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (193).png" alt=""><figcaption><p>知识库问答应用示例</p></figcaption></figure>
***
### 3 如何配置
配置知识库检索节点主要包含三个部分:
<figure><img src="../../../.gitbook/assets/image.png" alt=""><figcaption><p>知识检索配置</p></figcaption></figure>
1. 选择查询变量
2. 选择查询的知识库
3. 配置检索策略
**配置流程:**
**选择查询变量**
1. 选择查询变量,用于作为输入来检索知识库中的相关文本分段,在常见的对话类应用中一般将开始节点的 `sys.query` 作为查询变量;
2. 选择需要查询的知识库,可选知识库需要在 Dify 知识库内预先[创建](../../knowledge-base/create\_knowledge\_and\_upload\_documents.md#id-1-chuang-jian-zhi-shi-ku)
3. 配置[召回模式](../../../learn-more/extended-reading/retrieval-augment/retrieval.md)和[知识库设置](../../knowledge-base/knowledge\_and\_documents\_maintenance.md#id-8-zhi-shi-ku-she-zhi)
4. 连接并配置下游节点,一般为 LLM 节点;
在知识库检索场景中用于知识库检索的查询变量一般为用户输入的问题在对话型应用的「开始」节点中系统预设了「sys.query」作为用户输入变量你可以使用该变量用于查询知识库内与用户问题最相近的文本分段结果。
**输出变量**
**选择查询知识库**
<figure><img src="../../../.gitbook/assets/image (1).png" alt="" width="364"><figcaption></figcaption></figure>
在知识库检索节点中你可以添加一个 Dify 内已有的知识库,如何在 Dify 内创建知识库请参考[知识库帮助文档](https://docs.dify.ai/v/zh-hans/guides/knowledge-base)
知识检索的输出变量 `result` 为从知识库中检索到的相关文本分段。其变量数据结构中包含了分段内容、标题、链接、图标、元数据信息
**配置检索策略**
**配置下游节点**
可以在节点内修改单个知识库的索引策略和检索模式。关于该设置的具体原理请参考[知识库帮助文档](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/retrieval-augment/hybrid-search)
在常见的对话类应用中,知识库检索的下游节点一般为 LLM 节点,知识检索的**输出变量** `result` 需要配置在 LLM 节点的 **上下文变量** 内关联赋值。关联后你可以在系统提示词中的合适位置插入 **上下文变量**
<figure><img src="../../../.gitbook/assets/output (4) (1).png" alt=""><figcaption></figcaption></figure>
当用户提问时,若在知识检索中召回了相关文本,文本内容会作为上下文变量中的值填入提示词,提供 LLM 回复问题若未在知识库检索中召回相关的文本上下文变量值为空LLM 则会直接回复用户问题。
Dify 针对多知识库的不同检索场景提供了两种召回策略「N选1召回」和「多路召回」在 N 选 1 模式下知识库查询通过工具函数调用Function Calling来实现需要选择系统推理模型。在多路召回模式下需要配置 Rerank 模型用于结果重排。关于两种召回策略的具体原理请参考帮助文档中的[召回模式说明](https://docs.dify.ai/v/zh-hans/learn-more/extended-reading/retrieval-augment/retrieval)。
<figure><img src="../../../.gitbook/assets/image (3).png" alt=""><figcaption><p>配置下游 LLM 节点</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/output (5) (1).png" alt=""><figcaption></figcaption></figure>
该变量除了可以作为 LLM 回复问题时的提示词上下文作为外部知识参考引用,另外由于其数据结构中包含了分段引用信息,同时可以支持应用端的 **引用与归属** 功能。

View File

@ -14,7 +14,7 @@
下图为产品客服场景的示例工作流模板:
<figure><img src="../../../.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1).png" alt=""><figcaption></figcaption></figure>
在该场景中我们设置了 3 个分类标签/描述:
@ -32,7 +32,7 @@
### 3 如何配置
<figure><img src="../../../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1).png" alt=""><figcaption></figcaption></figure>
**配置步骤:**

View File

@ -38,7 +38,7 @@ Dify 目前已支持 Cohere Rerank 模型,通过进入“模型供应商-> Coh
通过进入“数据集->创建数据集->检索设置”页面并在添加 Rerank 设置。除了在创建数据集可以设置 Rerank ,你也可以在已创建的数据集设置内更改 Rerank 配置,在应用编排的数据集召回模式设置中更改 Rerank 配置。
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>数据集检索模式中设置 Rerank 模型</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt="" width="563"><figcaption><p>数据集检索模式中设置 Rerank 模型</p></figcaption></figure>
\*\*TopK\*\*用于设置 Rerank 后返回相关文档的数量。
@ -50,4 +50,4 @@ Dify 目前已支持 Cohere Rerank 模型,通过进入“模型供应商-> Coh
关于多路召回模式的说明:🔗
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>数据集多路召回模式中设置 Rerank 模型</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>数据集多路召回模式中设置 Rerank 模型</p></figcaption></figure>

View File

@ -26,7 +26,7 @@
以下是多路召回模式的技术流程图:
<figure><img src="../../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>多路召回</p></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption><p>多路召回</p></figcaption></figure>
由于多路召回模式不依赖于模型的推理能力或数据集描述,该模式在多数据集检索时能够获得质量更高的召回效果,除此之外加入 Rerank 步骤也能有效改进文档召回效果。因此,当创建的知识库问答应用关联了多个数据集时,我们更推荐将召回模式配置为多路召回。\
\

View File

@ -125,7 +125,7 @@ Query or prefix prompt is too long, you can reduce the preix prompt, or shrink t
如下方表格示例仅需保留第二行的表头首行表格1为多余表头需删掉。
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
### 20 买了 ChatGPT plus为什么在 dify 里还不能使用 GPT4