### What problem does this PR solve? ### Type of change - [x] Documentation Updatetags/v0.17.0
| { | { | ||||
| "label": "Agent Components", | "label": "Agent Components", | ||||
| "position": 3, | |||||
| "position": 20, | |||||
| "link": { | "link": { | ||||
| "type": "generated-index", | "type": "generated-index", | ||||
| "description": "A complete reference for RAGFlow's agent components." | "description": "A complete reference for RAGFlow's agent components." |
| Where `{source_text}` and `{target_lang}` are global variables defined by the **Begin** component, while `{translation_1}` is the output of another **Generate** component with the component ID **Translate directly**. | Where `{source_text}` and `{target_lang}` are global variables defined by the **Begin** component, while `{translation_1}` is the output of another **Generate** component with the component ID **Translate directly**. | ||||
| :::danger IMPORTANT | |||||
| A **Generate** component relies on keys (variables) to specify its data inputs. Its immediate upstream component is *not* necessarily its data input, and the arrows in the workflow indicate *only* the processing sequence. | |||||
| ::: | |||||
|  | |||||
| Keys in a **Generate** component are used in conjunction with the system prompt to specify data inputs for the LLM. Use a forward slash `/` to show the keys to use. | |||||
| ### Cite | ### Cite | ||||
| This toggle sets whether to cite the original text as reference. | This toggle sets whether to cite the original text as reference. | ||||
| ::: | ::: | ||||
| ### Key (Variable) | |||||
| :::danger IMPORTANT | |||||
| A **Generate** component relies on keys (variables) to specify its data inputs. Its immediate upstream component is *not* necessarily its data input, and the arrows in the workflow indicate *only* the processing sequence. | |||||
| ::: | |||||
|  | |||||
| Keys in a **Generate** component are used in conjunction with the system prompt to specify data inputs for the LLM. As shown in the above screenshot, the values are categorized into two groups: | |||||
| - **Component Output**: The value of the key should be a component ID. | |||||
| - **Begin Input**: The value of the key should be the name of a global variable defined in the **Begin** component. | |||||
| ## Examples | ## Examples | ||||
| You can explore our three-step interpreter agent template, where a **Generate** component (component ID: **Reflect**) takes three global variables: | You can explore our three-step interpreter agent template, where a **Generate** component (component ID: **Reflect**) takes three global variables: |
| A **Rewrite** component is essential when you need to optimize a user query based on the context of previous conversations. It is usually the upstream component of a **Retrieval** component. | A **Rewrite** component is essential when you need to optimize a user query based on the context of previous conversations. It is usually the upstream component of a **Retrieval** component. | ||||
| :::tip NOTE | :::tip NOTE | ||||
| See also the [Keyword](https://ragflow.io/docs/dev/keyword_component) component, a similar component used for multi-turn optimization. | |||||
| See also the [Keyword](./keyword.mdx) component, a similar component used for multi-turn optimization. | |||||
| ::: | ::: | ||||
| ## Configurations | ## Configurations |
| ## Scenarios | ## Scenarios | ||||
| A **Switch** component is essential for condition-based direction of execution flow. While it shares similarities with the [Categorize](https://ragflow.io/docs/dev/categorize_component) component, which is also used in multi-pronged strategies, the key distinction lies in their approach: the evaluation of the **Switch** component is rule-based, whereas the **Categorize** component involves AI and uses an LLM for decision-making. | |||||
| A **Switch** component is essential for condition-based direction of execution flow. While it shares similarities with the [Categorize](./categorize.mdx) component, which is also used in multi-pronged strategies, the key distinction lies in their approach: the evaluation of the **Switch** component is rule-based, whereas the **Categorize** component involves AI and uses an LLM for decision-making. | |||||
| ## Configurations | ## Configurations | ||||
| - Supports DeepSeek R1 and DeepSeek V3. | - Supports DeepSeek R1 and DeepSeek V3. | ||||
| - GraphRAG refactor: Knowledge graph is dynamically built on an entire knowledge base (dataset) rather than on an individual file, and automatically updated when a newly uploaded file starts parsing. See [here](https://ragflow.io/docs/dev/construct_knowledge_graph). | - GraphRAG refactor: Knowledge graph is dynamically built on an entire knowledge base (dataset) rather than on an individual file, and automatically updated when a newly uploaded file starts parsing. See [here](https://ragflow.io/docs/dev/construct_knowledge_graph). | ||||
| - Adds an **Iteration** agent component and a **Research report generator** agent template. See [here](./references/agent_component_reference/iteration.mdx). | |||||
| - Adds an **Iteration** agent component and a **Research report generator** agent template. See [here](./guides/agent/agent_component_reference/iteration.mdx). | |||||
| - New UI language: Portuguese. | - New UI language: Portuguese. | ||||
| - Allows setting metadata for a specific file in a knowledge base to enhance AI-powered chats. See [here](./guides/configure_knowledge_base/set_metadata.md). | - Allows setting metadata for a specific file in a knowledge base to enhance AI-powered chats. See [here](./guides/configure_knowledge_base/set_metadata.md). | ||||
| - Upgrades RAGFlow's document engine [Infinity](https://github.com/infiniflow/infinity) to v0.6.0.dev3. | - Upgrades RAGFlow's document engine [Infinity](https://github.com/infiniflow/infinity) to v0.6.0.dev3. | ||||
| - [Construct knowledge graph](./guides/configure_knowledge_base/construct_knowledge_graph.md) | - [Construct knowledge graph](./guides/configure_knowledge_base/construct_knowledge_graph.md) | ||||
| - [Set metadata](./guides/configure_knowledge_base/set_metadata.md) | - [Set metadata](./guides/configure_knowledge_base/set_metadata.md) | ||||
| - [Begin component](./references/agent_component_reference/begin.mdx) | |||||
| - [Generate component](./references/agent_component_reference/generate.mdx) | |||||
| - [Interact component](./references/agent_component_reference/interact.mdx) | |||||
| - [Retrieval component](./references/agent_component_reference/retrieval.mdx) | |||||
| - [Categorize component](./references/agent_component_reference/categorize.mdx) | |||||
| - [Keyword component](./references/agent_component_reference/keyword.mdx) | |||||
| - [Message component](./references/agent_component_reference/message.mdx) | |||||
| - [Rewrite component](./references/agent_component_reference/rewrite.mdx) | |||||
| - [Switch component](./references/agent_component_reference/switch.mdx) | |||||
| - [Concentrator component](./references/agent_component_reference/concentrator.mdx) | |||||
| - [Template component](./references/agent_component_reference/template.mdx) | |||||
| - [Iteration component](./references/agent_component_reference/iteration.mdx) | |||||
| - [Note component](./references/agent_component_reference/note.mdx) | |||||
| - [Begin component](./guides/agent/agent_component_reference/begin.mdx) | |||||
| - [Generate component](./guides/agent/agent_component_reference/generate.mdx) | |||||
| - [Interact component](./guides/agent/agent_component_reference/interact.mdx) | |||||
| - [Retrieval component](./guides/agent/agent_component_reference/retrieval.mdx) | |||||
| - [Categorize component](./guides/agent/agent_component_reference/categorize.mdx) | |||||
| - [Keyword component](./guides/agent/agent_component_reference/keyword.mdx) | |||||
| - [Message component](./guides/agent/agent_component_reference/message.mdx) | |||||
| - [Rewrite component](./guides/agent/agent_component_reference/rewrite.mdx) | |||||
| - [Switch component](./guides/agent/agent_component_reference/switch.mdx) | |||||
| - [Concentrator component](./guides/agent/agent_component_reference/concentrator.mdx) | |||||
| - [Template component](./guides/agent/agent_component_reference/template.mdx) | |||||
| - [Iteration component](./guides/agent/agent_component_reference/iteration.mdx) | |||||
| - [Note component](./guides/agent/agent_component_reference/note.mdx) | |||||
| ## v0.15.1 | ## v0.15.1 | ||||