writinwaters commited on
Commit
0812124
Β·
1 Parent(s): a1ea313

Initial draft of the begin component reference (#4272)

Browse files

### What problem does this PR solve?

### Type of change


- [x] Documentation Update

agent/templates/general_chat_bot.json CHANGED
@@ -85,7 +85,7 @@
85
  },
86
  "5. chitchatting": {
87
  "description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",
88
- "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?",
89
  "to": "Generate:FiveDragonsLay"
90
  }
91
  },
@@ -637,7 +637,7 @@
637
  },
638
  "5. chitchatting": {
639
  "description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",
640
- "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?",
641
  "to": "Generate:FiveDragonsLay"
642
  }
643
  },
 
85
  },
86
  "5. chitchatting": {
87
  "description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",
88
+ "examples": "What's your name?\nWhat a bad day!\nTerrible day.\nHow are you today?",
89
  "to": "Generate:FiveDragonsLay"
90
  }
91
  },
 
637
  },
638
  "5. chitchatting": {
639
  "description": "Regarding the issues of small talk, companionship, sharing, and emotional intimacy.",
640
+ "examples": "What's your name?\nWhat a bad day!\nTerrible day.\nHow are you today?",
641
  "to": "Generate:FiveDragonsLay"
642
  }
643
  },
docs/guides/{agentic_rag β†’ agent}/_category_.json RENAMED
File without changes
docs/guides/{agentic_rag β†’ agent}/agent_introduction.md RENAMED
File without changes
docs/guides/{agentic_rag β†’ agent}/general_purpose_chatbot.md RENAMED
File without changes
docs/guides/{agentic_rag β†’ agent}/text2sql_agent.md RENAMED
@@ -4,8 +4,11 @@ slug: /text2sql_agent
4
  ---
5
 
6
  # Create a Text2SQL agent
 
7
  Build a Text2SQL agent leverging RAGFlow's RAG capabilities. Contributed by @TeslaZY.
 
8
  ## Scenario
 
9
  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:
10
 
11
  - **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:
35
  - ExeSQL
36
 
37
  ## Procedure
 
38
  ### Preparation of Data
39
 
40
  #### Database Environment
 
41
  Mysql-8.0.39
42
 
43
  #### Database Table Creation Statements
@@ -261,7 +266,9 @@ CREATE TABLE OrderDetails (
261
  ![DDL knowledge base](https://github.com/user-attachments/assets/2c073e1b-8fdd-443e-98ca-4fd36f9d93e0)
262
 
263
  #### Configure DB_Description Knowledge Base
 
264
  1. the content of the DB_Description text is as follows:
 
265
  ```markdown
266
  ### Customers (Customer Information Table)
267
  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
294
  - Quantity: The number of units of the product ordered.
295
  - TotalPrice: The total price for this particular item in the order, calculated as UnitPrice * Quantity.
296
  ```
 
297
  2. set the chunk data for the DB_Description knowledge base
298
  ![DB_Description knowledge base](https://github.com/user-attachments/assets/0e3f1cad-dd67-4d7c-ae2d-b31ca3be664d)
299
  #### Configure Q->SQL Knowledge Base
 
4
  ---
5
 
6
  # Create a Text2SQL agent
7
+
8
  Build a Text2SQL agent leverging RAGFlow's RAG capabilities. Contributed by @TeslaZY.
9
+
10
  ## Scenario
11
+
12
  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:
13
 
14
  - **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.
 
38
  - ExeSQL
39
 
40
  ## Procedure
41
+
42
  ### Preparation of Data
43
 
44
  #### Database Environment
45
+
46
  Mysql-8.0.39
47
 
48
  #### Database Table Creation Statements
 
266
  ![DDL knowledge base](https://github.com/user-attachments/assets/2c073e1b-8fdd-443e-98ca-4fd36f9d93e0)
267
 
268
  #### Configure DB_Description Knowledge Base
269
+
270
  1. the content of the DB_Description text is as follows:
271
+ 2.
272
  ```markdown
273
  ### Customers (Customer Information Table)
274
  The Customers table records detailed information about different customers in the online store. Here is the meaning of each field within this table:
 
301
  - Quantity: The number of units of the product ordered.
302
  - TotalPrice: The total price for this particular item in the order, calculated as UnitPrice * Quantity.
303
  ```
304
+
305
  2. set the chunk data for the DB_Description knowledge base
306
  ![DB_Description knowledge base](https://github.com/user-attachments/assets/0e3f1cad-dd67-4d7c-ae2d-b31ca3be664d)
307
  #### Configure Q->SQL Knowledge Base
docs/{guides/agentic_rag β†’ references}/agent_component_reference/_category_.json RENAMED
@@ -1,6 +1,6 @@
1
  {
2
  "label": "Agent Component Reference",
3
- "position": 1,
4
  "link": {
5
  "type": "generated-index",
6
  "description": "A complete reference for RAGFlow's agent components."
 
1
  {
2
  "label": "Agent Component Reference",
3
+ "position": 3,
4
  "link": {
5
  "type": "generated-index",
6
  "description": "A complete reference for RAGFlow's agent components."
docs/references/agent_component_reference/begin.mdx ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 1
3
+ slug: /begin_component
4
+ ---
5
+
6
+ # Begin component
7
+
8
+ The starting component in a workflow.
9
+
10
+ ---
11
+
12
+ 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.
13
+
14
+ ## Scenarios
15
+
16
+ A **Begin** component is essential in all cases. Every agent includes a **Begin** component, which cannot be deleted.
17
+
18
+ ## Configurations
19
+
20
+ Click the component to display its **Configuration** window. Here, you can set an opening greeting and the input parameters (global variables) for the agent.
21
+
22
+ ### ID
23
+
24
+ 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.
25
+
26
+ ### Opening greeting
27
+
28
+ 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.
29
+
30
+ ### Global variables
31
+
32
+ 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:
33
+
34
+ - **Key**: *Required*
35
+ The unique variable name.
36
+ - **Name**: *Required*
37
+ A descriptive name providing additional details about the variable.
38
+ For example, if **Key** is set to `lang`, you can set its **Name** to `Target language`.
39
+ - **Type**: *Required*
40
+ The type of the variable:
41
+ - **line**: Accepts a single line of text without line breaks.
42
+ - **paragraph**: Accepts multiple lines of text, including line breaks.
43
+ - **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.
44
+ - **file**: Requires the user to upload a file from their device.
45
+ - **integer**: Accepts an integer as input.
46
+ - **boolean**: Requires the user to toggle between on and off.
47
+ - **Optional**: A toggle indicating whether the variable is optional.
48
+
49
+ ## Examples
50
+
51
+ 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:
52
+
53
+ 1. Click the **Agent** tab in the middle top of the page to show the **Agent** page.
54
+ 2. Click **+ Create agent** on the top right of the page to show the **agent template** page.
55
+ 3. On the **agent template** page, hover over the card on **Interperter** and click **Use this template**.
56
+ 4. Name the new agent and click **OK** to enter the workflow editor.
57
+ 5. Click the **Begin** component to display its **Configuration** window.
58
+
59
+ ## Frequently asked questions
60
+
61
+ ### Is the uploaded file in a knowledge base?
62
+
63
+ 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.
64
+
65
+ ### File size limit for uploaded file
66
+
67
+ 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.
68
+
69
+
70
+
docs/references/faq.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- sidebar_position: 3
3
  slug: /faq
4
  ---
5
 
 
1
  ---
2
+ sidebar_position: 10
3
  slug: /faq
4
  ---
5
 
docs/release_notes.md CHANGED
@@ -21,6 +21,7 @@ Released on December 25, 2024.
21
  This release fixes the following issues:
22
 
23
  - The `SCORE not found` and `position_int` errors returned by [Infinity](https://github.com/infiniflow/infinity).
 
24
  - Slow response in question-answering and AI search due to repetitive loading of the embedding model.
25
  - Fails to parse documents with RAPTOR.
26
  - Using the **Table** parsing method results in information loss.
 
21
  This release fixes the following issues:
22
 
23
  - The `SCORE not found` and `position_int` errors returned by [Infinity](https://github.com/infiniflow/infinity).
24
+ - Once an embedding model in a specific knowledge base is changed, embedding models in other knowledge bases can no longer be changed.
25
  - Slow response in question-answering and AI search due to repetitive loading of the embedding model.
26
  - Fails to parse documents with RAPTOR.
27
  - Using the **Table** parsing method results in information loss.
web/src/locales/en.ts CHANGED
@@ -350,7 +350,7 @@ The above is the content you need to summarize.`,
350
  language: 'Language',
351
  emptyResponse: 'Empty response',
352
  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.`,
353
- setAnOpener: 'Set an opener',
354
  setAnOpenerInitial: `Hi! I'm your assistant, what can I do for you?`,
355
  setAnOpenerTip: 'Set an opening greeting for users.',
356
  knowledgeBases: 'Knowledge bases',
@@ -677,7 +677,7 @@ The above is the content you need to summarize.`,
677
  msg: 'Messages',
678
  messagePlaceholder: 'message',
679
  messageMsg: 'Please input message or delete this field.',
680
- addField: 'Add field',
681
  addMessage: 'Add message',
682
  loop: 'Loop',
683
  loopTip:
 
350
  language: 'Language',
351
  emptyResponse: 'Empty response',
352
  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.`,
353
+ setAnOpener: 'Opening greeting',
354
  setAnOpenerInitial: `Hi! I'm your assistant, what can I do for you?`,
355
  setAnOpenerTip: 'Set an opening greeting for users.',
356
  knowledgeBases: 'Knowledge bases',
 
677
  msg: 'Messages',
678
  messagePlaceholder: 'message',
679
  messageMsg: 'Please input message or delete this field.',
680
+ addField: 'Add option',
681
  addMessage: 'Add message',
682
  loop: 'Loop',
683
  loopTip:
web/src/pages/flow/form/begin-form/begin-dynamic-options.tsx CHANGED
@@ -55,7 +55,7 @@ const BeginDynamicOptions = () => {
55
  icon={<PlusOutlined />}
56
  block
57
  >
58
- Add field
59
  </Button>
60
  <Form.ErrorList errors={errors} />
61
  </Form.Item>
 
55
  icon={<PlusOutlined />}
56
  block
57
  >
58
+ Add option
59
  </Button>
60
  <Form.ErrorList errors={errors} />
61
  </Form.Item>