writinwaters commited on
Commit
cb6b883
·
1 Parent(s): 7a57a76

Added descriptions of Message and Keyword agent components (#4512)

Browse files

### What problem does this PR solve?

### Type of change


- [x] Documentation Update

docs/references/agent_component_reference/categorize.mdx CHANGED
@@ -7,7 +7,9 @@ slug: /categorize_component
7
 
8
  The component that classifies user inputs and applies strategies accordingly.
9
 
10
- > The **Categorize** component is usually the downstream of the **Interact** component.
 
 
11
 
12
  ## Scenarios
13
 
@@ -91,12 +93,12 @@ Additional examples that may help the LLM determine which inputs belong in this
91
  Examples are more helpful than the description if you want the LLM to classify particular cases into this category.
92
  :::
93
 
94
- #### To
95
 
96
  Specifies the downstream component of this category.
97
 
98
- - *Once you specify the ID of the downstream component, a link is established between this category and the corresponding component.*
99
- - *If you manually link this category to a downstream component on the canvas, the ID of that component is auto-populated.*
100
 
101
  ## Examples
102
 
 
7
 
8
  The component that classifies user inputs and applies strategies accordingly.
9
 
10
+ ---
11
+
12
+ The **Categorize** component is usually the downstream of the **Interact** component.
13
 
14
  ## Scenarios
15
 
 
93
  Examples are more helpful than the description if you want the LLM to classify particular cases into this category.
94
  :::
95
 
96
+ #### Next step
97
 
98
  Specifies the downstream component of this category.
99
 
100
+ - Once you specify the ID of the downstream component, a link is established between this category and the corresponding component.
101
+ - If you manually link this category to a downstream component on the canvas, the ID of that component is auto-populated.
102
 
103
  ## Examples
104
 
docs/references/agent_component_reference/keyword.mdx ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 6
3
+ slug: /keyword_component
4
+ ---
5
+
6
+ # Keyword component
7
+
8
+ A component that extracts keywords from a user query.
9
+
10
+ ---
11
+
12
+ A **Keyword** component uses the specified LLM to extract keywords from a user query.
13
+
14
+ ## Scenarios
15
+
16
+ A **Keyword** component is essential where you need to prepare keywords for a potential keyword search.
17
+
18
+ ## Configurations
19
+
20
+ ### Input
21
+
22
+ The **Keyword** component relies on input variables to specify its data inputs (queries). Click **+ Add variable** in the **Input** section to add the desired input variables. There are two types of input variables: **Reference** and **Text**.
23
+
24
+ - **Reference**: Uses a component's output or a user input as the data source. You are required to select from the dropdown menu:
25
+ - A component ID under **Component Output**, or
26
+ - A global variable under **Begin input**, which is defined in the **Begin** component.
27
+ - **Text**: Uses fixed text as the query. You are required to enter static text.
28
+
29
+
30
+ ### Model
31
+
32
+ Click the dropdown menu of **Model** to show the model configuration window.
33
+
34
+ - **Model**: The chat model to use.
35
+ - Ensure you set the chat model correctly on the **Model providers** page.
36
+ - You can use different models for different components to increase flexibility or improve overall performance.
37
+ - **Freedom**: A shortcut to **Temperature**, **Top P**, **Presence penalty**, and **Frequency penalty** settings, indicating the freedom level of the model.
38
+ This parameter has three options:
39
+ - **Improvise**: Produces more creative responses.
40
+ - **Precise**: (Default) Produces more conservative responses.
41
+ - **Balance**: A middle ground between **Improvise** and **Precise**.
42
+ - **Temperature**: The randomness level of the model's output.
43
+ Defaults to 0.1.
44
+ - Lower values lead to more deterministic and predictable outputs.
45
+ - Higher values lead to more creative and varied outputs.
46
+ - A temperature of zero results in the same output for the same prompt.
47
+ - **Top P**: Nucleus sampling.
48
+ - Reduces the likelihood of generating repetitive or unnatural text by setting a threshold *P* and restricting the sampling to tokens with a cumulative probability exceeding *P*.
49
+ - Defaults to 0.3.
50
+ - **Presence penalty**: Encourages the model to include a more diverse range of tokens in the response.
51
+ - A higher **presence penalty** value results in the model being more likely to generate tokens not yet been included in the generated text.
52
+ - Defaults to 0.4.
53
+ - **Frequency penalty**: Discourages the model from repeating the same words or phrases too frequently in the generated text.
54
+ - A higher **frequency penalty** value results in the model being more conservative in its use of repeated tokens.
55
+ - Defaults to 0.7.
56
+ - **Max tokens**: Sets the maximum length of the model's output, measured in the number of tokens.
57
+ - Defaults to 512.
58
+ - If disabled, you lift the maximum token limit, allowing the model to determine the number of tokens in its responses.
59
+
60
+ :::tip NOTE
61
+ - It is not necessary to stick with the same model for all components. If a specific model is not performing well for a particular task, consider using a different one.
62
+ - If you are uncertain about the mechanism behind **Temperature**, **Top P**, **Presence penalty**, and **Frequency penalty**, you can simply choose one of the three options of **Freedom**.
63
+ :::
64
+
65
+
66
+ ### Number of keywords
67
+
68
+ An integer specifying the number of keywords to extract from the user query. Defaults to 3. Please note that the number of extracted keywords depends on the LLM's capabilities and the token count in the user query, and may *not* match the integer you set.
69
+
70
+
71
+ ## Examples
72
+
73
+ Explore our general-purpose chatbot agent template, where the **Keyword** component (component ID: **keywords**) is used to extract keywords from financial inputs for a potential stock search in the **akshare** component:
74
+
75
+ 1. Click the **Agent** tab at the top center of the page to access the **Agent** page.
76
+ 2. Click **+ Create agent** on the top right of the page to open the **agent template** page.
77
+ 3. On the **agent template** page, hover over the **General-purpose chatbot** card and click **Use this template**.
78
+ 4. Name your new agent and click **OK** to enter the workflow editor.
79
+ 5. Click on the **Keyword** component to display its **Configuration** window.
docs/references/agent_component_reference/message.mdx ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 7
3
+ slug: /message_component
4
+ ---
5
+
6
+ # Message component
7
+
8
+ A component that sends out a static message.
9
+
10
+ ---
11
+
12
+ A **Message** component sends out a static message. If multiple messages are supplied, it randomly selects one to send.
13
+
14
+ ## Configurations
15
+
16
+ ### Messages
17
+
18
+ The message to send out.
19
+
20
+ Click **+ Add message** to add message options. When multiple messages are supplied, the **Message** component randomly selects one to send.
21
+
22
+ ## Examples
23
+
24
+ Explore our customer service agent template, where the **Message** component (component ID: **What else?**) randomly sends out a message to the user interface if the user inputs is related to personal contact information:
25
+
26
+ 1. Click the **Agent** tab at the top center of the page to access the **Agent** page.
27
+ 2. Click **+ Create agent** on the top right of the page to open the **agent template** page.
28
+ 3. On the **agent template** page, hover over the **Customer service** card and click **Use this template**.
29
+ 4. Name your new agent and click **OK** to enter the workflow editor.
30
+ 5. Click on the **Message** component to display its **Configuration** window.
docs/references/agent_component_reference/retrieval.mdx CHANGED
@@ -70,6 +70,6 @@ Explore our customer service agent template, where the **Retrieval** component (
70
 
71
  1. Click the **Agent** tab at the top center of the page to access the **Agent** page.
72
  2. Click **+ Create agent** on the top right of the page to open the **agent template** page.
73
- 3. On the **agent template** page, hover over the **Interperter** card and click **Use this template**.
74
  4. Name your new agent and click **OK** to enter the workflow editor.
75
  5. Click on the **Retrieval** component to display its **Configuration** window.
 
70
 
71
  1. Click the **Agent** tab at the top center of the page to access the **Agent** page.
72
  2. Click **+ Create agent** on the top right of the page to open the **agent template** page.
73
+ 3. On the **agent template** page, hover over the **Customer service** card and click **Use this template**.
74
  4. Name your new agent and click **OK** to enter the workflow editor.
75
  5. Click on the **Retrieval** component to display its **Configuration** window.
web/src/locales/en.ts CHANGED
@@ -753,7 +753,7 @@ This procedure will improve precision of retrieval by adding more information to
753
  relevantDescription: `A component that uses the LLM to assess whether the upstream output is relevant to the user's latest query. Ensure you specify the next component for each judge result.`,
754
  rewriteQuestionDescription: `A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached.`,
755
  messageDescription:
756
- "A component that sends out a static message. If multiple messages are supplied, it randomly selects one to send. Ensure its downstream is 'Answer', the interface component.",
757
  keywordDescription: `A component that retrieves top N search results from user's input. Ensure the TopN value is set properly before use.`,
758
  switchDescription: `A component that evaluates conditions based on the output of previous components and directs the flow of execution accordingly. It allows for complex branching logic by defining cases and specifying actions for each case or default action if no conditions are met.`,
759
  wikipediaDescription: `A component that searches from wikipedia.org, using TopN to specify the number of search results. It supplements the existing knowledge bases.`,
 
753
  relevantDescription: `A component that uses the LLM to assess whether the upstream output is relevant to the user's latest query. Ensure you specify the next component for each judge result.`,
754
  rewriteQuestionDescription: `A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached.`,
755
  messageDescription:
756
+ "A component that sends out a static message. If multiple messages are supplied, it randomly selects one to send. Ensure its downstream is 'Interact', the interface component.",
757
  keywordDescription: `A component that retrieves top N search results from user's input. Ensure the TopN value is set properly before use.`,
758
  switchDescription: `A component that evaluates conditions based on the output of previous components and directs the flow of execution accordingly. It allows for complex branching logic by defining cases and specifying actions for each case or default action if no conditions are met.`,
759
  wikipediaDescription: `A component that searches from wikipedia.org, using TopN to specify the number of search results. It supplements the existing knowledge bases.`,