### What problem does this PR solve? ### Type of change - [x] Documentation Updatetags/v0.17.0
| - Use GPU to reduce embedding time. | - Use GPU to reduce embedding time. | ||||
| - On the configuration page of your knowledge base, switch off **Use RAPTOR to enhance retrieval**. | - On the configuration page of your knowledge base, switch off **Use RAPTOR to enhance retrieval**. | ||||
| - The **Knowledge Graph** chunk method (GraphRAG) is time-consuming. | |||||
| - Extracting knowledge graph (GraphRAG) is time-consuming. | |||||
| - Disable **Auto-keyword** and **Auto-question** on the configuration page of yor knowledge base, as both depend on the LLM. | - Disable **Auto-keyword** and **Auto-question** on the configuration page of yor knowledge base, as both depend on the LLM. | ||||
| ## 2. Accelerate question answering | ## 2. Accelerate question answering |
| ### Entity resolution | ### Entity resolution | ||||
| Whether to enable entity resolution. You can think of this as an entity deduplication switch. When enabled, the LLM will combine similar entities - e.g., '2025' and 'the year of 2025', or 'IT' and 'Information Technology' - to construct a more accurate graph. | |||||
| Whether to enable entity resolution. You can think of this as an entity deduplication switch. When enabled, the LLM will combine similar entities - e.g., '2025' and 'the year of 2025', or 'IT' and 'Information Technology' - to construct a more effective graph. | |||||
| - (Default) Disable entity resolution. This option consumes fewer tokens. | |||||
| - Enable entity resolution. | |||||
| - (Default) Disable entity resolution. | |||||
| - Enable entity resolution. This option consumes more tokens. | |||||
| ### Community report generation | ### Community report generation | ||||
| In a knowledge graph, a community is a cluster of entities linked by relationships. You can have the LLM generate an abstract for each community, known as a community report. See [here](https://www.microsoft.com/en-us/research/blog/graphrag-improving-global-search-via-dynamic-community-selection/) for more information. This indicates whether to generate community reports: | In a knowledge graph, a community is a cluster of entities linked by relationships. You can have the LLM generate an abstract for each community, known as a community report. See [here](https://www.microsoft.com/en-us/research/blog/graphrag-improving-global-search-via-dynamic-community-selection/) for more information. This indicates whether to generate community reports: | ||||
| - Generate community reports. | |||||
| - (Default) Do not generate community reports. This options consumes fewer tokens. | |||||
| - Generate community reports. This option consumes more tokens. | |||||
| - (Default) Do not generate community reports. | |||||
| ## Procedure | ## Procedure | ||||
| 1. On the **Configuration** page of your knowledge base, switch on **Extract knowledge graph** or adjust its settings as needed, and click **Save** to confirm your changes. | 1. On the **Configuration** page of your knowledge base, switch on **Extract knowledge graph** or adjust its settings as needed, and click **Save** to confirm your changes. | ||||
| - *The default GraphRAG configurations for your knowlege base are now set and files uploaded from this point onward will automatically use these settings during parsing.* | |||||
| - *The default knowledge graph configurations for your knowlege base are now set and files uploaded from this point onward will automatically use these settings during parsing.* | |||||
| - *Files parsed before this update will retain their original knowledge graph settings.* | - *Files parsed before this update will retain their original knowledge graph settings.* | ||||
| 2. The knowledge graph of your knowlege base does *not* automatically update *until* a newly uploaded file is parsed. | 2. The knowledge graph of your knowlege base does *not* automatically update *until* a newly uploaded file is parsed. |
| --- | --- | ||||
| ### Where to find the version of RAGFlow? How to interprete it? | |||||
| You can find the RAGFlow version number on the **System** page of the UI: | |||||
|  | |||||
| If you build RAGFlow from source, the version number is also in the system log: | |||||
| ``` | |||||
| ____ ___ ______ ______ __ | |||||
| / __ \ / | / ____// ____// /____ _ __ | |||||
| / /_/ // /| | / / __ / /_ / // __ \| | /| / / | |||||
| / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ / | |||||
| /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/ | |||||
| 2025-02-18 10:10:43,835 INFO 1445658 RAGFlow version: v0.16.0-50-g6daae7f2 full | |||||
| ``` | |||||
| Where: | |||||
| - `v0.16.0`: The officially published release. | |||||
| - `50`: The number of git commits since the official release. | |||||
| - `g6daae7f2`: `g` is the prefix, and `6daae7f2` is the first seven characters of the current commit ID. | |||||
| - `full`/`slim`: The RAGFlow edition. | |||||
| - `full`: The full RAGFlow edition. | |||||
| - `slim`: The RAGFlow edition without embedding models and Python packages. | |||||
| --- | |||||
| ### Why does it take longer for RAGFlow to parse a document than LangChain? | ### Why does it take longer for RAGFlow to parse a document than LangChain? | ||||
| We put painstaking effort into document pre-processing tasks like layout analysis, table structure recognition, and OCR (Optical Character Recognition) using our vision models. This contributes to the additional time required. | We put painstaking effort into document pre-processing tasks like layout analysis, table structure recognition, and OCR (Optical Character Recognition) using our vision models. This contributes to the additional time required. |
| - Body: | - Body: | ||||
| - the required parameters:`str` | - the required parameters:`str` | ||||
| - other parameters: | - other parameters: | ||||
| The parameters in the begin component. | |||||
| The parameters set in the **Begin** component. | |||||
| ##### Request example | ##### Request example | ||||
| If `begin` component in the agent doesn't have required parameters: | |||||
| If the **Begin** component in your agent does not have required parameters: | |||||
| ```bash | ```bash | ||||
| curl --request POST \ | curl --request POST \ | ||||
| --url http://{address}/api/v1/agents/{agent_id}/sessions \ | --url http://{address}/api/v1/agents/{agent_id}/sessions \ | ||||
| --data '{ | --data '{ | ||||
| }' | }' | ||||
| ``` | ``` | ||||
| If `begin` component in the agent has required parameters: | |||||
| If the **Begin** component in your agent has required parameters: | |||||
| ```bash | ```bash | ||||
| curl --request POST \ | curl --request POST \ | ||||
| --url http://{address}/api/v1/agents/{agent_id}/sessions \ | --url http://{address}/api/v1/agents/{agent_id}/sessions \ | ||||
| "file":"Who are you" | "file":"Who are you" | ||||
| }' | }' | ||||
| ``` | ``` | ||||
| If `begin` component in the agent has required file parameters: | |||||
| If the **Begin** component in your agent has required file parameters: | |||||
| ```bash | ```bash | ||||
| curl --request POST \ | curl --request POST \ | ||||
| --url http://{address}/api/v1/agents/{agent_id}/sessions?user_id={user_id} \ | --url http://{address}/api/v1/agents/{agent_id}/sessions?user_id={user_id} \ | ||||
| - `agent_id`: (*Path parameter*) | - `agent_id`: (*Path parameter*) | ||||
| The ID of the associated agent. | The ID of the associated agent. | ||||
| - `user_id`: (*Filter parameter*), string | - `user_id`: (*Filter parameter*), string | ||||
| The optional user-defined ID for parsing docs(especially images) when creating session while uploading files. | |||||
| The optional user-defined ID for parsing docs (especially images) when creating a session while uploading files. | |||||
| #### Response | #### Response | ||||
| - `"user_id"`: `string`(optional) | - `"user_id"`: `string`(optional) | ||||
| - other parameters: `string` | - other parameters: `string` | ||||
| ##### Request example | ##### Request example | ||||
| If the `begin` component doesn't have parameters, the following code will create a session. | |||||
| Ifthe **Begin** component doesn't have parameters, the following code will create a session. | |||||
| ```bash | ```bash | ||||
| curl --request POST \ | curl --request POST \ | ||||
| --url http://{address}/api/v1/agents/{agent_id}/completions \ | --url http://{address}/api/v1/agents/{agent_id}/completions \ | ||||
| { | { | ||||
| }' | }' | ||||
| ``` | ``` | ||||
| If the `begin` component have parameters, the following code will create a session. | |||||
| Ifthe **Begin** component have parameters, the following code will create a session. | |||||
| ```bash | ```bash | ||||
| curl --request POST \ | curl --request POST \ | ||||
| --url http://{address}/api/v1/agents/{agent_id}/completions \ | --url http://{address}/api/v1/agents/{agent_id}/completions \ | ||||
| }' | }' | ||||
| ``` | ``` | ||||
| ##### Request Parameters | ##### Request Parameters | ||||
| - `agent_id`: (*Path parameter*), `string` | - `agent_id`: (*Path parameter*), `string` | ||||
| - `"user_id"`: (*Body parameter*), `string` | - `"user_id"`: (*Body parameter*), `string` | ||||
| The optional user-defined ID. Valid *only* when no `session_id` is provided. | The optional user-defined ID. Valid *only* when no `session_id` is provided. | ||||
| - Other parameters: (*Body Parameter*) | - Other parameters: (*Body Parameter*) | ||||
| The parameters in the begin component. | |||||
| Parameters specified in the **Begin** component. | |||||
| #### Response | #### Response | ||||
| success without `session_id` provided and with no parameters in the `begin` component: | |||||
| success without `session_id` provided and with no parameters inthe **Begin** component: | |||||
| ```json | ```json | ||||
| data:{ | data:{ | ||||
| "code": 0, | "code": 0, | ||||
| "data": true | "data": true | ||||
| } | } | ||||
| ``` | ``` | ||||
| Success without `session_id` provided and with parameters in the `begin` component: | |||||
| Success without `session_id` provided and with parameters inthe **Begin** component: | |||||
| ```json | ```json | ||||
| data:{ | data:{ | ||||
| } | } | ||||
| data: | data: | ||||
| ``` | ``` | ||||
| Success with parameters in the `begin` component: | |||||
| Success with parameters inthe **Begin** component: | |||||
| ```json | ```json | ||||
| data:{ | data:{ | ||||
| "code": 0, | "code": 0, |
| ##### question: `str` | ##### question: `str` | ||||
| The question to start an AI-powered conversation. If the `begin` component takes parameters, a question is not required. | |||||
| The question to start an AI-powered conversation. Ifthe **Begin** component takes parameters, a question is not required. | |||||
| ##### stream: `bool` | ##### stream: `bool` | ||||
| ### New features | ### New features | ||||
| - 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 files are added or removed. | |||||
| - GraphRAG refactor: Knowledge graph is dynamically built on an entire knowledge base (dataset) rather than on an individual file, and automatically updated when files are added or removed. See [here](https://ragflow.io/docs/dev/construct_knowledge_graph). | |||||
| - Adds an **Iteration** agent component and a **Research report generator** agent template. | - Adds an **Iteration** agent component and a **Research report generator** agent template. | ||||
| - New UI language: Portuguese. | - New UI language: Portuguese. | ||||
| - Allows setting metadata for a specific file in a knowledge base to support AI-powered chats. | - Allows setting metadata for a specific file in a knowledge base to support AI-powered chats. |
| addTag: 'Add tag', | addTag: 'Add tag', | ||||
| useGraphRag: 'Extract knowledge graph', | useGraphRag: 'Extract knowledge graph', | ||||
| useGraphRagTip: | useGraphRagTip: | ||||
| 'After files being chunked, all the chunks will be used for knowlege graph generation which helps inference of multi-hop and complex problems a lot.', | |||||
| 'Construct a knowledge graph over extracted file chunks to enhance multi-hop question answering.', | |||||
| graphRagMethod: 'Method', | graphRagMethod: 'Method', | ||||
| graphRagMethodTip: `Light: the entity and relation extraction prompt is from GitHub - HKUDS/LightRAG: "LightRAG: Simple and Fast Retrieval-Augmented Generation"</br> | |||||
| General: the entity and relation extraction prompt is from GitHub - microsoft/graphrag: A modular graph-based Retrieval-Augmented Generation (RAG) system`, | |||||
| graphRagMethodTip: `Light: (Default) Use prompts provided by github.com/HKUDS/LightRAG to extract entities and relationships. This option consumes fewer tokens, less memory, and fewer computational resources.</br> | |||||
| General: Use prompts provided by github.com/microsoft/graphrag to extract entities and relationships`, | |||||
| resolution: 'Entity resolution', | resolution: 'Entity resolution', | ||||
| resolutionTip: `The resolution procedure would merge entities with the same meaning together which allows the graph conciser and more accurate. Entities as following should be merged: President Trump, Donald Trump, Donald J. Trump, Donald John Trump`, | |||||
| resolutionTip: `An entity deduplication switch. When enabled, the LLM will combine similar entities - e.g., '2025' and 'the year of 2025', or 'IT' and 'Information Technology' - to construct a more accurate graph`, | |||||
| community: 'Community reports generation', | community: 'Community reports generation', | ||||
| communityTip: | communityTip: | ||||
| 'Chunks are clustered into hierarchical communities with entities and relationships connecting each segment up through higher levels of abstraction. We then use an LLM to generate a summary of each community, known as a community report. More: https://www.microsoft.com/en-us/research/blog/graphrag-improving-global-search-via-dynamic-community-selection/', | |||||
| 'In a knowledge graph, a community is a cluster of entities linked by relationships. You can have the LLM generate an abstract for each community, known as a community report. See here for more information: https://www.microsoft.com/en-us/research/blog/graphrag-improving-global-search-via-dynamic-community-selection/', | |||||
| }, | }, | ||||
| chunk: { | chunk: { | ||||
| chunk: 'Chunk', | chunk: 'Chunk', |