mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
modification upon use
This commit is contained in:
@@ -539,6 +539,10 @@ Used to store uploaded data set files, team/tenant encryption keys, and other fi
|
||||
|
||||
The maximum top-k value of RAG, default 10.
|
||||
|
||||
- SINGLE_CHUNK_ATTACHMENT_LIMIT
|
||||
|
||||
The maximum number of images that can be attached to a single chunk in multimodal knowledge bases that support image-based retrieval, default 10.
|
||||
|
||||
### Multi-modal Configuration
|
||||
|
||||
- MULTIMODAL_SEND_IMAGE_FORMAT
|
||||
|
||||
@@ -8,7 +8,7 @@ Drag and drop or select files to upload. The number of files allowed for **batch
|
||||
|
||||
**Limitations for uploading documents:**
|
||||
|
||||
* The upload size limit for a single document is 15MB;
|
||||
* The upload size limit for a single document is 15 MB;
|
||||
* Different [subscription plans](https://dify.ai/pricing) for the SaaS version limit **batch upload numbers, total document uploads, and vector storage**
|
||||
|
||||

|
||||
|
||||
@@ -26,7 +26,7 @@ The knowledge base offers two index methods: **High-Quality** and **Economical**
|
||||
Think of these vectors as coordinates in a multi-dimensional space—the closer two points are, the more similar their meanings. This allows the system to find relevant information based on semantic similarity, not just exact keyword matches.
|
||||
|
||||
<Tip>
|
||||
Quick-created knowledge bases don't allow selecting embedding models that support image embedding (indicated by a **Vision** icon) and thus they don't support image-based retrieval.
|
||||
Quick-created knowledge bases don't allow selecting embedding models that support image embedding (indicated by the **Vision** icon) and thus they don't support image-based retrieval.
|
||||
|
||||
But don't worry—you can easily convert a quick-created knowledge base into a pipeline-created one to enable this feature.
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ In a knowledge base, click the **Settings** icon in the left sidebar to enter it
|
||||
|
||||
| Settings | Description |
|
||||
|:----------------------- |:---------------------|
|
||||
| Name & Icon | The name and icon that identify the knowledge base.|
|
||||
| Description | A brief description that indicates the knowledge base's purpose and content.|
|
||||
| Name & Icon | Identifies the knowledge base.|
|
||||
| Description | Indicates the knowledge base's purpose and content.|
|
||||
| Permissions | Defines which workspace members can access the knowledge base.<Note>Members granted access to a knowledge base have all the permissions listed in [Manage Knowledge Content](/en/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents).</Note>|
|
||||
| Index Method | Defines how document chunks are processed and organized for retrieval. For more details, see [Select the Index Method](/en/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods#select-the-index-method).|
|
||||
| Embedding Model | Specifies the embedding model used to convert document chunks into vector representations.<Info>Changing the embedding model will re-embed all chunks, regenerate the vector index, and discard the existing vectors.</Info>|
|
||||
|
||||
@@ -40,7 +40,7 @@ According to its chunk settings, every document is split into content chunks—t
|
||||
| Enable / Disable | Temporarily include or exclude a chunk from retrieval. Disabled chunks cannot be edited.|
|
||||
| Edit | Modify the content of a chunk. Edited chunks are marked **Edited**.<br/><br/>For documents chunked with Parent-child mode: <ul><li>When editing a parent chunk, you can choose to regenerate its child chunks or keep them unchanged.</li><li>Editing a child chunk does not update its parent chunk. </li></ul>|
|
||||
| Add / Edit / Delete Keywords | In knowledge bases using the Economical index method, you can add or modify keywords for each chunk to improve its retrievability. Each chunk can have up to 10 keywords.|
|
||||
| Upload / Delete Images | In knowledge bases with image-based retrieval enabled, you can delete imported images or upload new ones within the corresponding chunk. <Tip>Choose an embedding model that supports image embedding (indicated by a **Vision** icon) for the knowledge base to enable image-based retrieval.</Tip>|
|
||||
| Add / Delete Images | In knowledge bases with image-based retrieval enabled, you can delete imported images or upload new ones within the corresponding chunk. <Note> Each chunk can have up to 10 images; any additional images will not be imported. <br/><br/>For self-hosted deployments, you can adjust this limit via the environment variable `SINGLE_CHUNK_ATTACHMENT_LIMIT` (default: 10).</Note><Tip>Choose an embedding model that supports image embedding (indicated by the **Vision** icon) for the knowledge base to enable image-based retrieval.</Tip>|
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ The High Quality method uses embedding models to convert chunks into numerical v
|
||||
|
||||
<Tip>
|
||||
|
||||
To enable image-based retrieval, choose an embedding model that supports image embedding (indicated by a **Vision** icon).
|
||||
To enable image-based retrieval, choose an embedding model that supports image embedding (indicated by the **Vision** icon).
|
||||
|
||||
Knowledge bases with such embedding models are marked **Multimodal** on their cards.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Here, you can simulate user queries to test how well the knowledge base retrieve
|
||||
</Note>
|
||||
|
||||
<Tip>
|
||||
For more on retrieval settings, see [Configure the Retrieval Settings](/en/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods#configure-the-retrieval-settings).
|
||||
For more about retrieval settings, see [Configure the Retrieval Settings](/en/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods#configure-the-retrieval-settings).
|
||||
</Tip>
|
||||
|
||||
The **Records** section logs all retrieval events associated with this knowledge base, including:
|
||||
|
||||
@@ -24,10 +24,12 @@ Below is an example of using the Knowledge Retrieval node in a Chatflow:
|
||||
|
||||
## Configure a Knowledge Retrieval Node
|
||||
|
||||
To make the Knowledge Retrieval node work properly, you need to tell it:
|
||||
To make the Knowledge Retrieval node work properly, you need to specify:
|
||||
|
||||
- *What* it should search for (the query)
|
||||
|
||||
- *Where* it should search (the knowledge base)
|
||||
|
||||
- *How* to process the retrieval results (the node-level retrieval settings)
|
||||
|
||||
You can also use document metadata to enable filter-based searches and further improve retrieval precision.
|
||||
@@ -38,16 +40,16 @@ Provide the query content that the node should search for in the selected knowle
|
||||
|
||||
- **Query Text**: Select a text variable. For example, use `userinput.query` to reference user input in Chatflows, or a custom text-type user input variable in Workflows.
|
||||
|
||||
- **Query Image**: Select an image variable to search by image, e.g., the image uploaded by the user through a User Input node. The image size limit is 10 MB.
|
||||
- **Query Images**: Select an image variable to search by image, e.g., the image(s) uploaded by the user through a User Input node. The image size limit is 10 MB.
|
||||
|
||||
<Tip>
|
||||
For self-hosted deployments, you can adjust the image size limit via the environment variable `UPLOAD_IMAGE_FILE_SIZE_LIMIT` (default: 10).
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
Self-hosting users can adjust the image size limit by modifying the environment variable `UPLOAD_IMAGE_FILE_SIZE_LIMIT` (default: 10).
|
||||
</Info>
|
||||
The **Query Image** option is available only when at least one added knowledge base supports image-based retrieval.
|
||||
|
||||
<Info>
|
||||
**Query Image** is available only when at least one added knowledge base supports image-based retrieval.
|
||||
|
||||
Such knowledge bases are marked with a **Vision** icon, indicating that they use an embedding model that supports image embedding.
|
||||
Such knowledge bases are marked with the **Vision** icon, indicating that they use an embedding model that supports image embedding.
|
||||
</Info>
|
||||
|
||||
### Select Knowledge to Search
|
||||
@@ -55,11 +57,11 @@ Provide the query content that the node should search for in the selected knowle
|
||||
Add one or more existing knowledge bases for the node to search for content relevant to the query content.
|
||||
|
||||
<Info>
|
||||
Knowledge bases marked with a **Vision** icon support image-based retrieval, which means that you can use text and/or images as queries and retrieve both semantically related text and images.
|
||||
Knowledge bases marked with the **Vision** icon support image-based retrieval, allowing the use of text and/or images as queries to retrieve semantically related text and images.
|
||||
</Info>
|
||||
|
||||
<Tip>
|
||||
You can click the **Edit** icon next to any added knowledge base to modify its settings directly within the Knowledge Retrieval node. To learn more about these settings, see [Manage Knowledge Settings](/en/guides/knowledge-base/knowledge-and-documents-maintenance/introduction) and [Specify the Index Method and Retrieval Settings](/en/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods).
|
||||
Click the **Edit** icon next to any added knowledge base to modify its settings directly within the Knowledge Retrieval node. To learn more about these settings, see [Manage Knowledge Settings](/en/guides/knowledge-base/knowledge-and-documents-maintenance/introduction) and [Specify the Index Method and Retrieval Settings](/en/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods).
|
||||
</Tip>
|
||||
|
||||
### Configure Node-Level Retrieval Settings
|
||||
@@ -82,6 +84,10 @@ Further fine-tune how the node processes retrieval results after they are fetche
|
||||
|
||||
- **Rerank Model**: The rerank model to re-score and reorder all the results based on their relevance to the query.
|
||||
|
||||
<Note>
|
||||
Select a rerank model marked with the **Vision** icon if retrieved results may include images. Otherwise, retrieved images will be excluded from reranking and the final output.
|
||||
</Note>
|
||||
|
||||
- **Top K**: The maximum number of top results to return after reranking. When a rerank model is selected, this value will be automatically adjusted based on the model's maximum input capacity (how much text the model can process at once).
|
||||
|
||||
- **Score Threshold**: The minimum similarity score for returned results. Results scoring below this threshold are excluded. Use higher thresholds for stricter relevance or lower thresholds to include broader matches.
|
||||
@@ -92,7 +98,7 @@ Further fine-tune how the node processes retrieval results after they are fetche
|
||||
|
||||
### Enable Metadata Filtering
|
||||
|
||||
You can use existing document metadata to restrict retrieval to specific documents within your knowledge base, improving retrieval precision.
|
||||
Use existing document metadata to restrict retrieval to specific documents within your knowledge base, improving retrieval precision.
|
||||
|
||||
With metadata filtering enabled, the Knowledge Retrieval node only searches documents that match the specified metadata conditions, rather than searching across the entire knowledge base. This is especially useful for targeted searching in large and diverse knowledge bases.
|
||||
|
||||
@@ -104,9 +110,7 @@ With metadata filtering enabled, the Knowledge Retrieval node only searches docu
|
||||
|
||||
The Knowledge Retrieval node outputs the retrieval results as a variable named `result`, which is an array of retrieved document chunks containing their content, metadata, title, and other attributes.
|
||||
|
||||
If image-based retrieval is enabled and relevant images are fetched, the `result` variable also includes an additional field named `files` containing the retrieved image information.
|
||||
|
||||
![Knowledge Retrieval Node Output]()
|
||||
When the retrieval results contain images, the `result` variable also includes a field named `files` containing the details of retrieved images.
|
||||
|
||||
## Use with LLM Nodes
|
||||
|
||||
|
||||
@@ -523,6 +523,10 @@ dockerイメージまたはdocker-composeによる起動時にのみ有効です
|
||||
|
||||
RAG の最大の上位 k 値。デフォルトは 10。
|
||||
|
||||
- SINGLE_CHUNK_ATTACHMENT_LIMIT
|
||||
|
||||
画像検索対応のマルチモーダルナレッジベースにおいて、1つのチャンクに添付できる画像の最大数(デフォルト: 10)。
|
||||
|
||||
### マルチモーダルモデル設定
|
||||
|
||||
- MULTIMODAL_SEND_IMAGE_FORMAT
|
||||
|
||||
@@ -40,7 +40,7 @@ sidebarTitle: コンテンツの管理
|
||||
| 有効/無効 | 一時的にチャンクを検索対象に含める/除外します。無効化されたチャンクは編集できません。|
|
||||
| 編集 | チャンクの内容を修正します。編集されたチャンクは **「編集済み」** と表示されます。<br/><br/>親子分割モード(階層分割モード)のドキュメントでは:<ul><li>親チャンクを編集するとき、子チャンクを再生成するか保持するかを選択できます。</li><li>子チャンクを編集しても、親チャンクには影響しません。</li></ul>|
|
||||
| キーワードの追加/編集/削除 | 経済的インデックス方式を使用するナレッジベースでは、各チャンクに対してキーワードを追加・編集して検索精度を向上させることができます。1つのチャンクにつき最大10個のキーワードを設定可能です。 |
|
||||
| 画像のアップロード/削除 | 画像検索機能が有効なナレッジベースでは、各チャンク内で画像を削除または新規アップロードできます。<Tip>画像検索を有効にするには、「**Vision**」アイコン付きの埋め込みモデルを選択してください。</Tip> |
|
||||
| 画像のアップロード/削除 | 画像検索機能が有効なナレッジベースでは、各チャンク内で画像を削除または新規アップロードできます。<Note>各チャンクには最大10枚まで画像を設定できます。これを超える画像はインポートされません。<br/><br/>セルフホスティング環境では、環境変数 `SINGLE_CHUNK_ATTACHMENT_LIMIT`(デフォルト: 10)を変更することでこの上限を調整できます。</Note><Tip>画像検索を有効にするには、「**Vision**」アイコン付きの埋め込みモデルを選択してください。</Tip> |
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
|
||||
@@ -44,14 +44,14 @@ title: 知識検索
|
||||
|
||||
- **クエリ画像**:画像変数を指定して画像検索を行います。ユーザーがアップロードした画像などを使用できます。最大サイズは 10 MB です。
|
||||
|
||||
<Info>
|
||||
<Tip>
|
||||
自己ホスティング環境では、環境変数 `UPLOAD_IMAGE_FILE_SIZE_LIMIT` を変更することで画像サイズ上限を調整できます(デフォルト値:10)。
|
||||
</Info>
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
**クエリ画像** は、画像検索対応のナレッジベースが少なくとも1つ存在する場合にのみ利用可能です。
|
||||
|
||||
対応ナレッジベースは「**Vision**」アイコンで表示され、画像埋め込みに対応した埋め込みモデルを使用しています。
|
||||
**クエリ画像**オプションは、追加されたナレッジベースのうち少なくとも1つが画像検索に対応している場合のみ利用可能です。
|
||||
|
||||
画像検索対応のナレッジベースは **Vision** アイコンで表示され、画像埋め込みに対応した埋め込みモデルを使用しています。
|
||||
</Info>
|
||||
|
||||
### 検索対象ナレッジベースの選択
|
||||
@@ -59,7 +59,7 @@ title: 知識検索
|
||||
ノードで検索対象とするナレッジベースを1つ以上追加します。
|
||||
|
||||
<Info>
|
||||
**Vision** アイコンが付いたナレッジベースは **画像検索** に対応しており、テキストおよび/または画像をクエリとして使用できます。これにより、意味的に関連するテキストと画像の両方を検索・取得することが可能です。
|
||||
**Vision** アイコンが付いたナレッジベースは画像検索に対応しており、テキストや画像をクエリとして利用することで、意味的に関連するテキストや画像を検索・取得できます。
|
||||
</Info>
|
||||
|
||||
<Tip>
|
||||
@@ -88,6 +88,10 @@ title: 知識検索
|
||||
|
||||
- **Rerank モデル**: クエリとの関連度に基づいてすべての検索結果を再スコアリング・並べ替えします。
|
||||
|
||||
<Note>
|
||||
検索結果に画像が含まれる可能性がある場合は、**Vision** アイコン付きのリランキングモデルを選択してください。そうでない場合、取得された画像はリランキングおよび最終出力から除外されます。
|
||||
</Note>
|
||||
|
||||
- **トップ K**: 再ランク後に返す最大件数を指定します。 Rerank モデルを選択している場合、この値はモデルが処理可能な最大入力サイズ(トークン上限)に応じて自動的に調整されます。
|
||||
|
||||
- **スコア閾値**: 結果を返す際の最低スコア(類似度)を指定します。この閾値未満の結果は除外されます。高めに設定すると関連性の厳密な検索が行われ、低めにするとより広範なマッチを含めることができます。
|
||||
@@ -108,9 +112,7 @@ title: 知識検索
|
||||
|
||||
知識検索ノードの出力は `result` という変数として返されます。この変数は検索されたドキュメントチャンクの配列で、各チャンクには内容・メタデータ・タイトルなどの情報が含まれます。
|
||||
|
||||
画像検索が有効で、関連する画像が取得された場合、`result` 変数には `files` フィールドが追加され、取得された画像情報が格納されます。
|
||||
|
||||
![知識検索ノードの出力]()
|
||||
検索結果に画像が含まれる場合、`result` 変数に `files` フィールドが追加され、取得された画像情報が格納されます。
|
||||
|
||||
## LLM ノードとの連携
|
||||
|
||||
|
||||
@@ -535,6 +535,10 @@ Flask 调试模式,开启可在接口输出 trace 信息,方便调试。
|
||||
|
||||
RAG 的最大 top-k 值,默认值为 10。
|
||||
|
||||
* SINGLE_CHUNK_ATTACHMENT_LIMIT
|
||||
|
||||
在支持图片检索的多模态知识库中,单个分段允许附加的图片数量上限,默认值为 10。
|
||||
|
||||
### 多模态模型配置
|
||||
|
||||
* MULTIMODAL_SEND_IMAGE_FORMAT
|
||||
|
||||
@@ -11,7 +11,7 @@ sidebarTitle: 调整设置
|
||||
|
||||
| 设置项 | 说明 |
|
||||
|:----------------------- |:---------------------|
|
||||
| 名称和图标 | 标识知识库。|
|
||||
| 名称和图标 | 用于标识知识库。|
|
||||
| 描述 | 简要说明知识库的用途和内容。|
|
||||
| 权限 | 定义哪些工作区成员可访问该知识库。<Note>被授予访问权限的成员将拥有 [维护知识库内容](/zh-hans/guides/knowledge-base/knowledge-and-documents-maintenance/maintain-knowledge-documents) 中列出的全部权限。</Note>|
|
||||
| 索引方式 | 决定文档分段的处理和组织方式。详见 [选择索引方式](/zh-hans/guides/knowledge-base/create-knowledge-and-upload-documents/setting-indexing-methods#选择索引方式)。|
|
||||
|
||||
@@ -39,7 +39,7 @@ sidebarTitle: 维护内容
|
||||
| 启用 / 禁用 | 临时将分段纳入或排除检索。已禁用的分段不可编辑。|
|
||||
| 编辑 | 修改分段内容。已编辑的分段将标记为 **已编辑**。<br/><br/>对于采用父子分段模式的文档:<ul><li>编辑父分段时,可选择重新生成其子分段或保持原有的子分段不变。</li><li>编辑子分段不会改变其父分段。</li></ul>|
|
||||
| 添加 / 编辑 / 删除关键词 | 在使用经济索引方式的知识库中,可为分段添加或修改关键词,以提升其可检索性。一个分段最多可添加 10 个关键词。|
|
||||
| 上传 / 删除图片 | 在启用图片检索的知识库中,可在对应分段中删除已导入的图片或上传新图片。<Tip>为知识库选择支持图片向量化的嵌入模型(带有 **Vision** 图标),即可启用图片检索。</Tip>|
|
||||
| 添加 / 删除图片 | 在启用图片检索的知识库中,可在对应分段中删除已导入的图片或上传新图片。<Note> 每个分段最多可添加 10 张图片;超过数量的图片不会被导入。<br/><br/>对于自托管部署,可通过修改环境变量 `SINGLE_CHUNK_ATTACHMENT_LIMIT`(默认值:10)调整此限制。</Note><Tip>为知识库选择支持图片向量化的嵌入模型(带有 **Vision** 图标),即可启用图片检索。</Tip>|
|
||||
|
||||
## 最佳实践
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ Unstructured 将文档转换为结构化的机器可读格式,具有高度可
|
||||
|
||||
若要启用图片检索,需选择支持图片向量化的嵌入模型(带有 **Vision** 图标)。
|
||||
|
||||
采用此类嵌入模型的知识库,其卡片上将显示 **多模态** 图标。
|
||||
使用此类嵌入模型的知识库,其卡片上将显示 **多模态** 图标。
|
||||
|
||||
<img src="/images/multimodal_knowledge_base.png" alt="多模态知识库" width="300" />
|
||||
|
||||
|
||||
@@ -21,10 +21,12 @@ title: 知识检索
|
||||
|
||||
## 配置知识检索节点
|
||||
|
||||
要使知识检索节点正常工作,你需要告诉它:
|
||||
要使知识检索节点正常工作,你需要指定:
|
||||
|
||||
- *检索什么*(查询内容)
|
||||
|
||||
- *在哪里检索*(知识库)
|
||||
|
||||
- *如何处理检索结果*(节点级检索设置)
|
||||
|
||||
你还可以利用文档元数据实现基于筛选的检索,进一步提升检索精度。
|
||||
@@ -33,17 +35,18 @@ title: 知识检索
|
||||
|
||||
设置节点需要在指定知识库中检索的查询内容。
|
||||
|
||||
- **文本查询**:选择一个文本变量。例如,在 Chatflow 中可用 `userinput.query` 引用用户输入,而在 Workflow 中则可选择文本类型的用户输入变量。
|
||||
- **图片查询**:选择一个图片变量(如用户通过用户输入节点上传的图片),启用图片检索。图片大小限制为 10 MB。
|
||||
- **查询文本**:选择一个文本变量。例如,在 Chatflow 中可用 `userinput.query` 引用用户输入,而在 Workflow 中则可选择文本类型的用户输入变量。
|
||||
|
||||
- **查询图片**:选择一个图片变量(如用户通过用户输入节点上传的图片),启用图片检索。图片大小限制为 10 MB。
|
||||
|
||||
<Tip>
|
||||
对于自托管部署,可通过环境变量 `UPLOAD_IMAGE_FILE_SIZE_LIMIT`(默认 10)调整图片大小限制。
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
自托管用户可通过环境变量 `UPLOAD_IMAGE_FILE_SIZE_LIMIT`(默认 10)调整图片大小限制。
|
||||
</Info>
|
||||
仅当添加了至少一个支持图片检索的知识库时,才会出现 **查询图片** 选项。
|
||||
|
||||
<Info>
|
||||
仅当至少有一个已添加的知识库支持图片检索时,才可使用 **图片查询**。
|
||||
|
||||
支持图片检索的知识库带有 **Vision** 图标,表示其使用的嵌入模型支持图片向量化。
|
||||
此类知识库带有 **Vision** 图标,表示其使用的嵌入模型支持图片向量化。
|
||||
</Info>
|
||||
|
||||
|
||||
@@ -52,7 +55,7 @@ title: 知识检索
|
||||
为节点添加一个或多个知识库,用于检索与查询内容相关的信息。
|
||||
|
||||
<Info>
|
||||
带有 **Vision** 图标的知识库支持图片检索,可用文本和/或图片作为查询内容,同时检索语义相关的文本及图片。
|
||||
支持图片检索的知识库带有 **Vision** 图标,支持用文本和/或图片作为查询内容,检索语义相关的文本及图片。
|
||||
</Info>
|
||||
|
||||
<Tip>
|
||||
@@ -60,7 +63,7 @@ title: 知识检索
|
||||
</Tip>
|
||||
|
||||
|
||||
### 调整节点级检索设置(召回设置)
|
||||
### 调整节点级检索(召回)设置
|
||||
|
||||
设置节点在获取知识库检索结果后的处理方式。
|
||||
|
||||
@@ -80,6 +83,10 @@ title: 知识检索
|
||||
|
||||
- **Rerank 模型**:根据与查询内容的相关性,对所有结果的相似度分数进行重新评定和排序。
|
||||
|
||||
<Note>
|
||||
若检索结果中可能包含图片,则需选择带有 Vision 图标的 Rerank 模型。否则,检索到的图片将不会参与重排序,也不会出现在最终的检索结果中。
|
||||
</Note>
|
||||
|
||||
- **Top K**:重排序后返回的最大结果数。选择 Rerank 模型时,该值将根据模型的最大输入容量自动调整。
|
||||
|
||||
- **Score 阈值**:返回结果的最低相似度分数。低于该阈值的结果会被过滤。阈值高表示对结果的相关性更严格,阈值低则更宽松。
|
||||
@@ -103,15 +110,14 @@ title: 知识检索
|
||||
|
||||
知识检索节点将检索结果输出为 `result` 变量——一个包含分段内容、分段标题、分段链接等属性的文档分段数组。
|
||||
|
||||
若启用了图片检索且检索到相关图片,`result` 变量中将增加 `files` 字段,包含检索到的图片信息。
|
||||
|
||||
![知识检索节点输出]()
|
||||
若检索结果中包含图片,`result` 变量中将增加 `files` 字段,包含检索到的图片信息。
|
||||
|
||||
## 搭配 LLM 节点使用知识检索节点
|
||||
|
||||
如需在 LLM 节点中基于检索结果回答用户问题:
|
||||
|
||||
1. 在 **上下文** 字段中,选择知识检索节点的 `result` 变量。
|
||||
|
||||
2. 在提示词字段中,同时引用 `上下文` 变量和用户输入变量(如 Chatflow 中的 `userinput.query`)。
|
||||
|
||||
<img src="/images/llm_node_configuration_example.png" alt="LLM 节点配置示例" width="400"/>
|
||||
|
||||
Reference in New Issue
Block a user