mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
Merge branch 'docs/knowledge' into docs/migration-3.17
This commit is contained in:
@@ -4,7 +4,10 @@ title: Knowledge Retrieval
|
||||
|
||||
The Knowledge Base Retrieval Node is designed to query text content related to user questions from the Dify Knowledge Base, which can then be used as context for subsequent answers by the Large Language Model (LLM).
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/f18a4015660dbb73eeddeb78e6fbfc28.png"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
Configuring the Knowledge Base Retrieval Node involves four main steps:
|
||||
|
||||
@@ -19,7 +22,7 @@ In knowledge base retrieval scenarios, the query variable typically represents t
|
||||
|
||||
**Choosing the Knowledge Base for Query**
|
||||
|
||||
Within the knowledge base retrieval node, you can add an existing knowledge base from Dify. For instructions on creating a knowledge base within Dify, please refer to the knowledge base [documentation](/en-us/user-guide/knowledge-base/knowledge-base-creation/introduction).
|
||||
Within the knowledge base retrieval node, you can add an existing knowledge base from Dify. For instructions on creating a knowledge base within Dify, please refer to the knowledge base [help documentation](https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents).
|
||||
|
||||
**Applying Metadata Filtering**
|
||||
|
||||
@@ -27,10 +30,16 @@ Use **Metadata Filtering** to refine document search in your knowledge base. For
|
||||
|
||||
**Configuring the Retrieval Strategy**
|
||||
|
||||
It's possible to modify the indexing strategy and retrieval mode for an individual knowledge base within the node. For a detailed explanation of these settings, refer to the knowledge base [documentation](/en-us/user-guide/knowledge-base/knowledge-base-creation/introduction).
|
||||
It's possible to modify the indexing strategy and retrieval mode for an individual knowledge base within the node. For a detailed explanation of these settings, refer to the knowledge base [help documentation](https://docs.dify.ai/guides/knowledge-base/retrieval-test-and-citation).
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/fbd43d558f83b355a1b18ac26a253b84.png"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
Dify offers two recall strategies for different knowledge base retrieval scenarios: "N-to-1 Recall" and "Multi-way Recall". In the N-to-1 mode, knowledge base queries are executed through function calling, requiring the selection of a system reasoning model. In the multi-way recall mode, a Rerank model needs to be configured for result re-ranking. For a detailed explanation of these two recall strategies, refer to the retrieval mode explanation in the [help documentation](https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents#id-5-indexing-methods).
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/890f89cda5cfd549e2987008462fe6f7.png"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
@@ -79,36 +79,36 @@ The **Knowledge Retrieval** node allows you to filter documents using metadata f
|
||||
#### Steps
|
||||
|
||||
1. Select Filter Mode:
|
||||
- **Disabled (Default):** No metadata filtering.
|
||||
- **Disabled (Default):** No metadata filtering.
|
||||
|
||||
- **Automatic:** Filters auto-configure from query variables in the **Knowledge Retrieval** node.
|
||||
- **Automatic:** Filters auto-configure from query variables in the **Knowledge Retrieval** node.
|
||||
|
||||
> Note: Automatic Mode requires model selection for document retrieval.
|
||||
> Note: Automatic Mode requires model selection for document retrieval.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Manual:** Configure filters manually.
|
||||
- **Manual:** Configure filters manually.
|
||||
|
||||

|
||||
|
||||
2. For Manual Mode, follow these steps:
|
||||
|
||||
1. Click **Conditions** to open the configuration panel.
|
||||
1. Click **Conditions** to open the configuration panel.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Click **+Add Condition**:
|
||||
- Select metadata fields within your chosen knowledge base from the dropdown list.
|
||||
> Note: When multiple knowledge bases are selected, only common metadata fields are shown in the list.
|
||||
- Use the search box to find specific fields.
|
||||
2. Click **+Add Condition**:
|
||||
- Select metadata fields within your chosen knowledge base from the dropdown list.
|
||||
> Note: When multiple knowledge bases are selected, only common metadata fields are shown in the list.
|
||||
- Use the search box to find specific fields.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Click **+Add Condition** to add more fields.
|
||||
3. Click **+Add Condition** to add more fields.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Configure filter conditions:
|
||||
4. Configure filter conditions:
|
||||
|
||||
| Field Type | Operator | Description and Examples |
|
||||
| --- | --- | --- |
|
||||
@@ -136,23 +136,23 @@ The **Knowledge Retrieval** node allows you to filter documents using metadata f
|
||||
|
||||
5. Add filter values:
|
||||
|
||||
- **Variable:** Select from existing **Chatflow/Workflow** variables.
|
||||
- **Variable:** Select from existing **Chatflow/Workflow** variables.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Constant:** Enter specific values.
|
||||
- **Constant:** Enter specific values.
|
||||
|
||||
> Time-type fields can only be filtered by constants The date picker is for time-type fields.
|
||||
> Time-type fields can only be filtered by constants The date picker is for time-type fields.
|
||||
|
||||

|
||||

|
||||
|
||||
<Warning>
|
||||
Filter values are case-sensitive and require exact matches. Example: a filter `starts with “App”` or `contains “App”` will match “Apple” but not “apple” or “APPLE”.
|
||||
</Warning>
|
||||
<Info>
|
||||
Filter values are case-sensitive and require exact matches. Example: a filter `starts with "App"` or `contains "App"` will match "Apple" but not "apple" or "APPLE".
|
||||
</Info>
|
||||
|
||||
6. Set logic operators:
|
||||
- `AND`: Match all conditions
|
||||
- `OR`: Match any condition
|
||||
- `AND`: Match all conditions
|
||||
- `OR`: Match any condition
|
||||
|
||||

|
||||
|
||||
@@ -168,30 +168,33 @@ Access **Metadata Filtering** below **Knowledge** (bottom-left). Configuration s
|
||||
|
||||
On the left side of the knowledge base, you can see all linked Apps. Hover over the circular icon to view the list of all linked apps. Click the jump button on the right to quickly browser them.
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2024/12/28899b9b0eba8996f364fb74e5b94c7f.png"
|
||||
alt=""
|
||||
/>
|
||||
|
||||
### Frequently Asked Questions
|
||||
|
||||
1. **How should I choose Rerank settings in multi-recall mode?**
|
||||
11. **How should I choose Rerank settings in multi-recall mode?**
|
||||
|
||||
If users know the exact information or terminology, you can use keyword search for precise matching. In that case, set **“Keywords” to 1** under Weight Settings.
|
||||
If users know the exact information or terminology, you can use keyword search for precise matching. In that case, set **"Keywords" to 1** under Weight Settings.
|
||||
|
||||
If the knowledge base doesn’t contain the exact terms or if a cross-lingual query is involved, we recommend setting **“Semantic” to 1** under Weight Settings.
|
||||
If the knowledge base doesn't contain the exact terms or if a cross-lingual query is involved, we recommend setting **"Semantic" to 1** under Weight Settings.
|
||||
|
||||
If you are familiar with real user queries and want to adjust the ratio of semantics to keywords, they can manually tweak the ratio under **Weight Settings**.
|
||||
|
||||
If the knowledge base is complex, making simple semantic or keyword matches insufficient—and you need highly accurate answers and are willing to pay more—consider using a **Rerank Model** for content retrieval.
|
||||
|
||||
2. **What should I do if I encounter issues finding the “Weight Score” or the requirement to configure a Rerank model?**
|
||||
2. **What should I do if I encounter issues finding the "Weight Score" or the requirement to configure a Rerank model?**
|
||||
|
||||
Here's how the knowledge base retrieval method affects Multi-path Retrieval:
|
||||
|
||||

|
||||
|
||||
3. **What should I do if I cannot adjust the “Weight Score” when referencing multiple knowledge bases and an error message appears?**
|
||||
3. **What should I do if I cannot adjust the "Weight Score" when referencing multiple knowledge bases and an error message appears?**
|
||||
|
||||
This issue occurs because the embedding models used in the multiple referenced knowledge bases are inconsistent, prompting this notification to avoid conflicts in retrieval content. It is advisable to set and enable the Rerank model in the "Model Provider" or unify the retrieval settings of the knowledge bases.
|
||||
|
||||
4. **Why can't I find the “Weight Score” option in multi-recall mode, and only see the Rerank model?**
|
||||
4. **Why can't I find the "Weight Score" option in multi-recall mode, and only see the Rerank model?**
|
||||
|
||||
Please check whether your knowledge base is using the “Economical” index mode. If so, switch it to the “High Quality” index mode.
|
||||
Please check whether your knowledge base is using the "Economical" index mode. If so, switch it to the "High Quality" index mode.
|
||||
@@ -53,7 +53,7 @@ You can create, modify, and delete metadata fields in the knowledge base.
|
||||
|
||||
#### Get Started with the Metadata Panel
|
||||
|
||||
##### Access the Metadata Panel
|
||||
**Access the Metadata Panel**
|
||||
|
||||
To access the Metadata Panel, go to **Knowledge Base** page and click **Metadata**.
|
||||
|
||||
@@ -61,17 +61,75 @@ To access the Metadata Panel, go to **Knowledge Base** page and click **Metadata
|
||||
|
||||

|
||||
|
||||
##### Built-in vs Custom Metadata
|
||||
**Built-in vs Custom Metadata**
|
||||
|
||||
| Feature | Built-in Metadata | Custom Metadata |
|
||||
| --- | --- | --- |
|
||||
| Location | Lower section of the Metadata panel | Upper section of the Metadata panel |
|
||||
| Activation | Disabled by default; requires manual activation | Add as needed |
|
||||
| Generation | System automatically extracts and generates field values | User-defined and manually added |
|
||||
| Editing | Fields and values cannot be modified once generated | Fields and values can be edited or deleted |
|
||||
| Scope | Applies to all existing and new documents when enabled | Stored in metadata list; requires manual assignment to documents |
|
||||
| Fields | System-defined fields include:<br>• document_name (string)<br>• uploader (string)<br>• upload_date (time)<br>• last_update_date (time)<br>• source (string) | No default fields; all fields must be manually created |
|
||||
| Value Types | • String: For text values<br>• Number: For numerical values<br>• Time: For dates and timestamps | • String: For text values<br>• Number: For numerical values<br>• Time: For dates and timestamps |
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Built-in Metadata</th>
|
||||
<th>Custom Metadata</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>Lower section of the Metadata panel</td>
|
||||
<td>Upper section of the Metadata panel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Activation</td>
|
||||
<td>Disabled by default; requires manual activation</td>
|
||||
<td>Add as needed</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Generation</td>
|
||||
<td>System automatically extracts and generates field values</td>
|
||||
<td>User-defined and manually added</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Editing</td>
|
||||
<td>Fields and values cannot be modified once generated</td>
|
||||
<td>Fields and values can be edited or deleted</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Scope</td>
|
||||
<td>Applies to all existing and new documents when enabled</td>
|
||||
<td>Stored in metadata list; requires manual assignment to documents</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fields</td>
|
||||
<td>
|
||||
System-defined fields include:
|
||||
<ul>
|
||||
<li>document_name (string)</li>
|
||||
<li>uploader (string)</li>
|
||||
<li>upload_date (time)</li>
|
||||
<li>last_update_date (time)</li>
|
||||
<li>source (string)</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>No default fields; all fields must be manually created</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Value Types</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>String: For text values</li>
|
||||
<li>Number: For numerical values</li>
|
||||
<li>Time: For dates and timestamps</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>String: For text values</li>
|
||||
<li>Number: For numerical values</li>
|
||||
<li>Time: For dates and timestamps</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
#### Create New Metadata Fields
|
||||
|
||||
@@ -135,7 +193,7 @@ To delete a metadata field, click the delete icon next to a field to delete it.
|
||||
|
||||
You can edit metadata in bulk in the knowledge base.
|
||||
|
||||
##### Access the Metadata Editor
|
||||
**Access the Metadata Editor**
|
||||
|
||||
To access the Metadata Editor:
|
||||
|
||||
@@ -147,7 +205,7 @@ To access the Metadata Editor:
|
||||
|
||||

|
||||
|
||||
##### Bulk Add Metadata
|
||||
**Bulk Add Metadata**
|
||||
|
||||
To add metadata in bulk:
|
||||
|
||||
@@ -187,15 +245,23 @@ To add metadata in bulk:
|
||||
|
||||
2. *(Optional)* Enter values for new fields.
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/aabfe789f607a1db9062beb493213376.png"
|
||||
width="400"
|
||||
alt="value_for_field"
|
||||
/>
|
||||
|
||||
> The date picker is for time-type fields.
|
||||
|
||||

|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/65df828e605ebfb4947fccce189520a3.png"
|
||||
width="440"
|
||||
alt="date_picker"
|
||||
/>
|
||||
|
||||
3. Click **Save** to apply changes.
|
||||
|
||||
##### Bulk Update Metadata
|
||||
**Bulk Update Metadata**
|
||||
|
||||
To update metadata in bulk:
|
||||
|
||||
@@ -231,7 +297,7 @@ To update metadata in bulk:
|
||||
|
||||
2. Click **Save** to apply changes.
|
||||
|
||||
##### Set Update Scope
|
||||
**Set Update Scope**
|
||||
|
||||
Use **Apply to All Documents** to control changes:
|
||||
|
||||
@@ -249,7 +315,7 @@ Use **Apply to All Documents** to control changes:
|
||||
|
||||
You can edit a single document's metadata on its details page.
|
||||
|
||||
##### Access Metadata Edit Mode
|
||||
**Access Metadata Edit Mode**
|
||||
|
||||
To edit a single document's metadata:
|
||||
|
||||
@@ -259,7 +325,7 @@ On the document details page, click **Start labeling** to begin editing.
|
||||
|
||||

|
||||
|
||||
##### Add Metadata
|
||||
**Add Metadata**
|
||||
|
||||
To add a single document's metadata fields and values:
|
||||
|
||||
@@ -286,7 +352,7 @@ To add a single document's metadata fields and values:
|
||||
|
||||
3. Click **Save** to apply changes.
|
||||
|
||||
##### Edit Metadata
|
||||
**Edit Metadata**
|
||||
|
||||
To update a single document's metadata fields and values:
|
||||
|
||||
@@ -329,15 +395,15 @@ See *[Maintaining Dataset via API](https://docs.dify.ai/guides/knowledge-base/kn
|
||||
|
||||
- **Fields vs Values: What is the difference?**
|
||||
|
||||
| Concept | Definition | Characteristics | Examples |
|
||||
| | Definition | Characteristics | Examples |
|
||||
| --- | --- | --- | --- |
|
||||
| Metadata Fields in the Metadata Panel | System-defined attributes that describe document properties | Global fields accessible across all documents in the knowledge base | Author, Type, Date, etc. |
|
||||
| Metadata Value on a document's detail page | Custom metadata tagged according to individual document requirements | Unique metadata values assigned based on document content and context | The "Author" field in Document A is set to "Mary" value, while in Document B it is set to "John" value. |
|
||||
|
||||
- **How do different delete options work?**
|
||||
|
||||
| Action | Steps | Image | Impact | Outcome |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Delete field in the Metadata Panel | In the Metadata Panel, click delete icon next to field |  | Global - affects all documents | Field and all values permanently deleted from the knowledge base |
|
||||
| Delete field in the Metadata Editor | In the Metadata Editor, click delete icon next to field |  | Selected documents only | Field deleted from selected documents; remains in the knowledge base |
|
||||
| Delete field on the document detail page | In the Edit Mode, click delete icon next to field |  | Current document only | Field deleted from current document; remains in the knowledge base |
|
||||
| Action | Steps | Impact | Outcome |
|
||||
| --- | --- | --- | --- |
|
||||
| Delete field in the Metadata Panel | In the Metadata Panel, click delete icon next to field | Global - affects all documents | Field and all values permanently deleted from the knowledge base |
|
||||
| Delete field in the Metadata Editor | In the Metadata Editor, click delete icon next to field | Selected documents only | Field deleted from selected documents; remains in the knowledge base |
|
||||
| Delete field on the document detail page | In the Edit Mode, click delete icon next to field | Current document only | Field deleted from current document; remains in the knowledge base |
|
||||
@@ -18,7 +18,6 @@ title: 元数据
|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/b6a197aa21ab92db93869fcbfa156b62.png"
|
||||
width="300"
|
||||
className="mx-auto"
|
||||
alt="field_name_and_value"
|
||||
/>
|
||||
|
||||
@@ -40,7 +39,6 @@ alt="metadata_field"
|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/f6adc7418869334805361535c8cd6874.png"
|
||||
width="300"
|
||||
className="mx-auto"
|
||||
alt="value_type"
|
||||
/>
|
||||
|
||||
@@ -54,7 +52,7 @@ alt="metadata_field"
|
||||
|
||||
#### 元数据管理界面简介
|
||||
|
||||
##### 进入元数据管理界面
|
||||
**进入元数据管理界面**
|
||||
|
||||
在知识库管理界面,点击右上方的 **元数据** 按钮,进入元数据管理界面。
|
||||
|
||||
@@ -62,19 +60,77 @@ alt="metadata_field"
|
||||
|
||||

|
||||
|
||||
##### 知识库元数据字段的类型
|
||||
**知识库元数据字段的类型**
|
||||
|
||||
在知识库中,元数据字段分为两类:**内置元数据(Built-in)** 和 **自定义元数据**。
|
||||
|
||||
| | 内置元数据(Built-in) | 自定义元数据 |
|
||||
| --- | --- | --- |
|
||||
| 显示位置 | 知识库界面 元数据 栏的下半部分。 | 知识库界面 元数据 栏的上半部分。 |
|
||||
| 启用方式 | 默认禁用,需要手动开启才能生效。 | 由用户根据需求自由添加。 |
|
||||
| 生成方式 | 启用后,由系统自动提取相关信息并生成字段值。 | 用户手动添加,完全由用户自定义。 |
|
||||
| 修改权限 | 一旦生成,无法修改字段与字段值。 | 可以删除或编辑字段名称,也可以修改字段值。 |
|
||||
| 应用范围 | 启用后,适用于已上传和新上传的所有文档。 | 添加元数据字段后,字段会储存在知识库的元数据列表中/需要手动设置,才能将该字段应用于具体文档。 |
|
||||
| 字段 | 由系统预定义,包括:• document_name (string):文件名• uploader (string):上传者• upload_date (time):上传日期• last_update_date (time):最后更新时间• source (string):文件来源 | 在初始状态下,知识库无自定义元数据字段,需要用户手动添加。 |
|
||||
| 字段值类型 | • 字符串 (string):文本值• 数字 (number):数值• 时间 (time):日期和时间 | • 字符串 (string):文本值• 数字 (number):数值 • 时间 (time):日期和时间 |
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>内置元数据(Built-in)</th>
|
||||
<th>自定义元数据</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>显示位置</td>
|
||||
<td>知识库界面 元数据 栏的下半部分。</td>
|
||||
<td>知识库界面 元数据 栏的上半部分。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>启用方式</td>
|
||||
<td>默认禁用,需要手动开启才能生效。</td>
|
||||
<td>由用户根据需求自由添加。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>生成方式</td>
|
||||
<td>启用后,由系统自动提取相关信息并生成字段值。</td>
|
||||
<td>用户手动添加,完全由用户自定义。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>修改权限</td>
|
||||
<td>一旦生成,无法修改字段与字段值。</td>
|
||||
<td>可以删除或编辑字段名称,也可以修改字段值。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>应用范围</td>
|
||||
<td>启用后,适用于已上传和新上传的所有文档。</td>
|
||||
<td>添加元数据字段后,字段会储存在知识库的元数据列表中/需要手动设置,才能将该字段应用于具体文档。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>字段</td>
|
||||
<td>
|
||||
由系统预定义,包括:
|
||||
<ul>
|
||||
<li>document_name (string):文件名</li>
|
||||
<li>uploader (string):上传者</li>
|
||||
<li>upload_date (time):上传日期</li>
|
||||
<li>last_update_date (time):最后更新时间</li>
|
||||
<li>source (string):文件来源</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>在初始状态下,知识库无自定义元数据字段,需要用户手动添加。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>字段值类型</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>字符串 (string):文本值</li>
|
||||
<li>数字 (number):数值</li>
|
||||
<li>时间 (time):日期和时间</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>字符串 (string):文本值</li>
|
||||
<li>数字 (number):数值</li>
|
||||
<li>时间 (time):日期和时间</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
#### 新建元数据字段
|
||||
|
||||
@@ -134,7 +190,7 @@ alt="metadata_field"
|
||||
|
||||
你可以在知识库管理界面批量编辑文档的元数据信息。
|
||||
|
||||
##### 打开编辑元数据弹窗
|
||||
**打开编辑元数据弹窗**
|
||||
|
||||
1. 打开知识库管理界面,在文档列表左侧的白色方框中勾选你希望批量操作的文档。勾选后,页面下方会弹出操作选项。
|
||||
|
||||
@@ -144,7 +200,7 @@ alt="metadata_field"
|
||||
|
||||

|
||||
|
||||
##### 批量新增元数据信息
|
||||
**批量新增元数据信息**
|
||||
|
||||
1. 在 **编辑元数据** 弹窗中点击底部的 **+添加元数据** 按钮,弹出操作弹窗。
|
||||
|
||||
@@ -202,7 +258,7 @@ alt="metadata_field"
|
||||
|
||||
3. 点击 **保存** 按钮,保存操作。
|
||||
|
||||
##### 批量删改元数据信息
|
||||
**批量删改元数据信息**
|
||||
|
||||
1. 在 **编辑元数据** 弹窗中删改元数据信息:
|
||||
|
||||
@@ -240,13 +296,13 @@ alt="metadata_field"
|
||||
|
||||
2. 点击 **保存** 按钮,保存操作。
|
||||
|
||||
##### 调整批量操作的应用范围
|
||||
**调整批量操作的应用范围**
|
||||
|
||||
- **调整批量操作的应用范围**: 你可以使用 **编辑元数据** 弹窗左下角的 **应用于所有文档** 选框来调整编辑模式中改动的应用范围。
|
||||
|
||||
- **否(默认)**: 如果不选中该选项,编辑模式中的改动仅对原本已有该元数据字段的文档生效,其他文档不会受到影响。
|
||||
- **否(默认)**: 如果不选中该选项,编辑模式中的改动仅对原本已有该元数据字段的文档生效,其他文档不会受到影响。
|
||||
|
||||
- **是**: 如果选中该选项,编辑模式中的改动会对所有选中的文档生效。原本没有该字段的文档,会自动添加该字段。
|
||||
- **是**: 如果选中该选项,编辑模式中的改动会对所有选中的文档生效。原本没有该字段的文档,会自动添加该字段。
|
||||
|
||||
<img
|
||||
src="https://assets-docs.dify.ai/2025/03/4550c68960802c24271492b63a39ad05.png"
|
||||
@@ -258,7 +314,7 @@ alt="metadata_field"
|
||||
|
||||
你可以在文档详情界面中编辑单篇文档的元数据信息。
|
||||
|
||||
##### 进入文档元数据编辑模式
|
||||
**进入文档元数据编辑模式**
|
||||
|
||||
1. 在文档详情界面,点击信息栏上方的 **开始标记** 按钮。
|
||||
|
||||
@@ -268,26 +324,26 @@ alt="metadata_field"
|
||||
|
||||

|
||||
|
||||
##### 新增文档元数据信息
|
||||
**新增文档元数据信息**
|
||||
|
||||
1. 在文档的元数据编辑模式中,点击 **+添加元数据** 按钮,弹出操作弹窗。
|
||||

|
||||
|
||||
- 如需使用新建字段为该文档标记字段值,可以点击弹窗左下角的 **+ 新建元数据** 按钮,并参考前文的 **新建元数据字段** 章节新建字段。
|
||||
- 如需使用新建字段为该文档标记字段值,可以点击弹窗左下角的 **+ 新建元数据** 按钮,并参考前文的 **新建元数据字段** 章节新建字段。
|
||||
|
||||
> 在文档页面新建的元数据字段,将自动同步至知识库字段列表中。
|
||||
|
||||

|
||||
|
||||
- 如需使用知识库已有的字段为该文档标记字段值,可以选择下列任意一种方式使用已有的字段:
|
||||
- 如需使用知识库已有的字段为该文档标记字段值,可以选择下列任意一种方式使用已有的字段:
|
||||
|
||||
- 从下拉列表中选择知识库已有的字段,添加到该文档的字段列表中。
|
||||
- 从下拉列表中选择知识库已有的字段,添加到该文档的字段列表中。
|
||||
|
||||
- 在 **搜索元数据** 搜索框中搜索你需要的字段,添加到该文档的字段列表中。
|
||||
- 在 **搜索元数据** 搜索框中搜索你需要的字段,添加到该文档的字段列表中。
|
||||
|
||||

|
||||

|
||||
|
||||
- 如需管理知识库已有的字段,可以点击弹窗右下角的 **管理** 按钮,跳转到知识库的管理界面。
|
||||
- 如需管理知识库已有的字段,可以点击弹窗右下角的 **管理** 按钮,跳转到知识库的管理界面。
|
||||
|
||||

|
||||
|
||||
@@ -297,7 +353,7 @@ alt="metadata_field"
|
||||
|
||||
3. 点击右上角的 **保存** 按钮,保存字段值。
|
||||
|
||||
##### 删改文档元数据信息
|
||||
**删改文档元数据信息**
|
||||
|
||||
1. 在文档的元数据编辑模式中,点击右上角的 **编辑** 按钮,进入编辑模式。
|
||||
|
||||
@@ -338,15 +394,15 @@ alt="metadata_field"
|
||||
|
||||
- **知识库元数据管理列表中的元数据字段和某篇文档中的元数据值有什么区别?**
|
||||
|
||||
| / | 定义 | 性质 | 举例 |
|
||||
| | 定义 | 性质 | 举例 |
|
||||
| --- | --- | --- | --- |
|
||||
| 元数据管理列表中的元数据字段 | 预定义的字段,用于描述文档的某些属性。 | 全局性字段。所有文档都可以使用这些字段。 | 作者、文档类型、上传日期。 |
|
||||
| 某篇文档中的元数据值 | 每个文档按需标记的针对特定文档的信息。 | 文档特定的值。每个文档根据其内容会标记不同的元数据值。 | 文档 A 的"作者"字段值为"张三",文档 B 的"作者"字段值为"李四"。 |
|
||||
|
||||
- **"在知识库管理界面删除某条元数据字段""在编辑元数据弹窗中删除已选文档的某条元数据字段"和"在文档详情界面删除某条元数据字段"有什么区别?**
|
||||
|
||||
| 操作方式 | 操作方法 | 示例图 | 影响范围 | 结果 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 在知识库管理界面删除某条元数据字段 | 在知识库管理界面,点击某条元数据字段右侧的删除图标,删除该字段。 |  | 从知识库管理列表中完全删除该元数据字段及其所有字段值。 | 该字段从知识库中移除,所有文档中的该字段及包含的所有字段值也会消失。 |
|
||||
| 在编辑元数据弹窗中删除已选文档的某条元数据字段 | 在编辑元数据弹窗中,点击某条元数据字段右侧的删除图标,删除该字段。 |  | 仅删除已选文档的该字段与字段值,字段本身依然保留在知识库管理列表中。 | 选中文档中的字段与字段值被移除,但字段仍保留在知识库内,字段值计数会发生数值上的变化。 |
|
||||
| 在文档详情界面删除某条元数据字段 | 在文档详情界面中的元数据编辑模式里,点击某条元数据字段右侧的删除图标,删除该字段。 |  | 仅删除该文档的该字段与字段值,字段本身依然保留在知识库管理列表中。 | 该文档中的字段与字段值被移除,但字段仍保留在知识库内,字段值计数会发生数值上的变化。 |
|
||||
| 操作方式 | 操作方法 | 影响范围 | 结果 |
|
||||
| --- | --- | --- | --- |
|
||||
| 在知识库管理界面删除某条元数据字段 | 在知识库管理界面,点击某条元数据字段右侧的删除图标,删除该字段。 | 从知识库管理列表中完全删除该元数据字段及其所有字段值。 | 该字段从知识库中移除,所有文档中的该字段及包含的所有字段值也会消失。 |
|
||||
| 在编辑元数据弹窗中删除已选文档的某条元数据字段 | 在编辑元数据弹窗中,点击某条元数据字段右侧的删除图标,删除该字段。 | 仅删除已选文档的该字段与字段值,字段本身依然保留在知识库管理列表中。 | 选中文档中的字段与字段值被移除,但字段仍保留在知识库内,字段值计数会发生数值上的变化。 |
|
||||
| 在文档详情界面删除某条元数据字段 | 在文档详情界面中的元数据编辑模式里,点击某条元数据字段右侧的删除图标,删除该字段。 | 仅删除该文档的该字段与字段值,字段本身依然保留在知识库管理列表中。 | 该文档中的字段与字段值被移除,但字段仍保留在知识库内,字段值计数会发生数值上的变化。 |
|
||||
|
||||
Reference in New Issue
Block a user