RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Initial draft of the begin component reference (#4272)
writinwaters8cdf10148d12
diff --git a/agent/templates/general_chat_bot.json b/agent/templates/general_chat_bot.jsonindex 6645e98877..331782fa8b 100644--- a/agent/templates/general_chat_bot.json+++ b/agent/templates/general_chat_bot.json@@ -85,7 +85,7 @@},"5. chitchatting": {"description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",- "examples": "What's your name?\nAre you female o male.\nWhat a bad day!\nTerrible day.\nHow are you today?\nDo you have boy friend?",+ "examples": "What's your name?\nWhat a bad day!\nTerrible day.\nHow are you today?","to": "Generate:FiveDragonsLay"}},@@ -637,7 +637,7 @@},"5. chitchatting": {"description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",- "examples": "What's your name?\nAre you female o male.\nWhat a bad day!\nTerrible day.\nHow are you today?\nDo you have boy friend?",+ "examples": "What's your name?\nWhat a bad day!\nTerrible day.\nHow are you today?","to": "Generate:FiveDragonsLay"}},diff --git a/docs/guides/agentic_rag/_category_.json b/docs/guides/agent/_category_.jsonsimilarity index 100%rename from docs/guides/agentic_rag/_category_.jsonrename to docs/guides/agent/_category_.jsondiff --git a/docs/guides/agentic_rag/agent_introduction.md b/docs/guides/agent/agent_introduction.mdsimilarity index 100%rename from docs/guides/agentic_rag/agent_introduction.mdrename to docs/guides/agent/agent_introduction.mddiff --git a/docs/guides/agentic_rag/general_purpose_chatbot.md b/docs/guides/agent/general_purpose_chatbot.mdsimilarity index 100%rename from docs/guides/agentic_rag/general_purpose_chatbot.mdrename to docs/guides/agent/general_purpose_chatbot.mddiff --git a/docs/guides/agentic_rag/text2sql_agent.md b/docs/guides/agent/text2sql_agent.mdsimilarity index 99%rename from docs/guides/agentic_rag/text2sql_agent.mdrename to docs/guides/agent/text2sql_agent.mdindex aa8766f826..da0d35a972 100644--- a/docs/guides/agentic_rag/text2sql_agent.md+++ b/docs/guides/agent/text2sql_agent.md@@ -4,8 +4,11 @@ slug: /text2sql_agent---# Create a Text2SQL agent+Build a Text2SQL agent leverging RAGFlow's RAG capabilities. Contributed by @TeslaZY.+## Scenario+The Text2SQL agent is designed to bridge the gap between Natural Language Processing (NLP) and Structured Query Language (SQL). Its key advantages are as follows:- **Assisting non-technical users with SQL**: Not all users have a background in SQL or understand the structure of the tables involved in queries. With a Text2SQL agent, users can pose questions or request data in natural language without needing an in-depth knowledge of the database structure or SQL syntax.@@ -35,9 +38,11 @@ A list of components required:- ExeSQL## Procedure+### Preparation of Data#### Database Environment+Mysql-8.0.39#### Database Table Creation Statements@@ -261,7 +266,9 @@ CREATE TABLE OrderDetails (#### Configure DB_Description Knowledge Base+1. the content of the DB_Description text is as follows:+2.```markdown### Customers (Customer Information Table)The Customers table records detailed information about different customers in the online store. Here is the meaning of each field within this table:@@ -294,6 +301,7 @@ The OrderDetails table provides detailed information about each item in an order- Quantity: The number of units of the product ordered.- TotalPrice: The total price for this particular item in the order, calculated as UnitPrice * Quantity.```+2. set the chunk data for the DB_Description knowledge base#### Configure Q->SQL Knowledge Basediff --git a/docs/guides/agentic_rag/agent_component_reference/_category_.json b/docs/references/agent_component_reference/_category_.jsonsimilarity index 90%rename from docs/guides/agentic_rag/agent_component_reference/_category_.jsonrename to docs/references/agent_component_reference/_category_.jsonindex 503831131a..28678a5fbc 100644--- a/docs/guides/agentic_rag/agent_component_reference/_category_.json+++ b/docs/references/agent_component_reference/_category_.json@@ -1,6 +1,6 @@{"label": "Agent Component Reference",- "position": 1,+ "position": 3,"link": {"type": "generated-index","description": "A complete reference for RAGFlow's agent components."diff --git a/docs/references/agent_component_reference/begin.mdx b/docs/references/agent_component_reference/begin.mdxnew file mode 100644index 0000000000..701835fed7--- /dev/null+++ b/docs/references/agent_component_reference/begin.mdx@@ -0,0 +1,70 @@+---+sidebar_position: 1+slug: /begin_component+---++# Begin component++The starting component in a workflow.++---++The **Begin** component sets an opening greeting or accepts inputs from the user. It is automatically populated onto the canvas when you create an agent, whether from a template or from scratch (from a blank template). There should be only one **Begin** component in the workflow.++## Scenarios++A **Begin** component is essential in all cases. Every agent includes a **Begin** component, which cannot be deleted.++## Configurations++Click the component to display its **Configuration** window. Here, you can set an opening greeting and the input parameters (global variables) for the agent.++### ID++The ID is the unique identifier for the component within the workflow. Unlike the IDs of other components, the ID of the **Begin** component *cannot* be changed.++### Opening greeting++An opening greeting is the agent's first message to the user. It can be a welcoming remark or an instruction to guide the user forward.++### Global variables++You can set global variables within the **Begin** component, which can be either required or optional. Once established, users will need to provide values for these variables when interacting or with the agent. Click **+ Add variable** to add a global variable, each with the following attributes:++- **Key**: *Required*+ The unique variable name.+- **Name**: *Required*+ A descriptive name providing additional details about the variable.+ For example, if **Key** is set to `lang`, you can set its **Name** to `Target language`.+- **Type**: *Required*+ The type of the variable:+ - **line**: Accepts a single line of text without line breaks.+ - **paragraph**: Accepts multiple lines of text, including line breaks.+ - **options**: Requires the user to select a value for this variable from a dropdown menu. And you are required to set *at least* one option for the dropdown menu.+ - **file**: Requires the user to upload a file from their device.+ - **integer**: Accepts an integer as input.+ - **boolean**: Requires the user to toggle between on and off.+- **Optional**: A toggle indicating whether the variable is optional.++## Examples++As mentioned earlier, the **Begin** component is indispensable for an agent. Still, you can take a look at our three-step interpreter agent, where the **Begin** component takes two global variables:++1. Click the **Agent** tab in the middle top of the page to show the **Agent** page.+2. Click **+ Create agent** on the top right of the page to show the **agent template** page.+3. On the **agent template** page, hover over the card on **Interperter** and click **Use this template**.+4. Name the new agent and click **OK** to enter the workflow editor.+5. Click the **Begin** component to display its **Configuration** window.++## Frequently asked questions++### Is the uploaded file in a knowledge base?++No. Files uploaded to an agent as input are not stored in a knowledge base and will not be chunked using RAGFlow's built-in chunk methods. However, RAGFlow's built-in OSR, DLR, and TSR models will still be applied to process the document.++### File size limit for uploaded file++The maximum file size for each uploaded file is determined by the variable `MAX_CONTENT_LENGTH` in `/docker/.env`. It defaults to 128 MB. If you change the default file size, ensure you also update the value of `client_max_body_size` in `/docker/nginx/nginx.conf` accordingly.+++diff --git a/docs/references/faq.md b/docs/references/faq.mdindex 8be0c86aaa..c0de029451 100644--- a/docs/references/faq.md+++ b/docs/references/faq.md@@ -1,5 +1,5 @@----sidebar_position: 3+sidebar_position: 10slug: /faq---diff --git a/docs/release_notes.md b/docs/release_notes.mdindex 8587bd6576..0c146748e2 100644--- a/docs/release_notes.md+++ b/docs/release_notes.md@@ -21,6 +21,7 @@ Released on December 25, 2024.This release fixes the following issues:- The `SCORE not found` and `position_int` errors returned by [Infinity](https://github.com/infiniflow/infinity).+- Once an embedding model in a specific knowledge base is changed, embedding models in other knowledge bases can no longer be changed.- Slow response in question-answering and AI search due to repetitive loading of the embedding model.- Fails to parse documents with RAPTOR.- Using the **Table** parsing method results in information loss.diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 040bcbd56a..99624e7432 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -350,7 +350,7 @@ The above is the content you need to summarize.`,language: 'Language',emptyResponse: 'Empty response',emptyResponseTip: `Set this as a response if no results are retrieved from the knowledge bases for your query, or leave this field blank to allow the LLM to improvise when nothing is found.`,- setAnOpener: 'Set an opener',+ setAnOpener: 'Opening greeting',setAnOpenerInitial: `Hi! I'm your assistant, what can I do for you?`,setAnOpenerTip: 'Set an opening greeting for users.',knowledgeBases: 'Knowledge bases',@@ -677,7 +677,7 @@ The above is the content you need to summarize.`,msg: 'Messages',messagePlaceholder: 'message',messageMsg: 'Please input message or delete this field.',- addField: 'Add field',+ addField: 'Add option',addMessage: 'Add message',loop: 'Loop',loopTip:diff --git a/web/src/pages/flow/form/begin-form/begin-dynamic-options.tsx b/web/src/pages/flow/form/begin-form/begin-dynamic-options.tsxindex b68a13d5b2..bcc9c57884 100644--- a/web/src/pages/flow/form/begin-form/begin-dynamic-options.tsx+++ b/web/src/pages/flow/form/begin-form/begin-dynamic-options.tsx@@ -55,7 +55,7 @@ const BeginDynamicOptions = () => {icon={<PlusOutlined />}block>- Add field+ Add option</Button><Form.ErrorList errors={errors} /></Form.Item>