mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
UI updates (#9836)
### What problem does this PR solve? ### Type of change - [x] Documentation Update
This commit is contained in:
@ -9,12 +9,12 @@ Key concepts, basic operations, a quick view of the agent editor.
|
||||
|
||||
---
|
||||
|
||||
## Key concepts
|
||||
|
||||
:::danger DEPRECATED!
|
||||
A new version is coming soon.
|
||||
:::
|
||||
|
||||
## Key concepts
|
||||
|
||||
Agents and RAG are complementary techniques, each enhancing the other’s capabilities in business applications. RAGFlow v0.8.0 introduces an agent mechanism, featuring a no-code workflow editor on the front end and a comprehensive graph-based task orchestration framework on the back end. This mechanism is built on top of RAGFlow's existing RAG solutions and aims to orchestrate search technologies such as query intent classification, conversation leading, and query rewriting to:
|
||||
|
||||
- Provide higher retrievals and,
|
||||
@ -33,55 +33,19 @@ Before proceeding, ensure that:
|
||||
|
||||
Click the **Agent** tab in the middle top of the page to show the **Agent** page. As shown in the screenshot below, the cards on this page represent the created agents, which you can continue to edit.
|
||||
|
||||

|
||||

|
||||
|
||||
We also provide templates catered to different business scenarios. You can either generate your agent from one of our agent templates or create one from scratch:
|
||||
|
||||
1. Click **+ Create agent** to show the **agent template** page:
|
||||
|
||||

|
||||

|
||||
|
||||
2. To create an agent from scratch, click the **Blank** card. Alternatively, to create an agent from one of our templates, hover over the desired card, such as **General-purpose chatbot**, click **Use this template**, name your agent in the pop-up dialogue, and click **OK** to confirm.
|
||||
2. To create an agent from scratch, click **Create Agent**. Alternatively, to create an agent from one of our templates, click the desired card, such as **Deep Research**, name your agent in the pop-up dialogue, and click **OK** to confirm.
|
||||
|
||||
*You are now taken to the **no-code workflow editor** page. The left panel lists the components (operators): Above the dividing line are the RAG-specific components; below the line are tools. We are still working to expand the component list.*
|
||||
*You are now taken to the **no-code workflow editor** page.*
|
||||
|
||||

|
||||

|
||||
|
||||
3. General speaking, now you can do the following:
|
||||
- Drag and drop a desired component to your workflow,
|
||||
- Select the knowledge base to use,
|
||||
- Update settings of specific components,
|
||||
- Update LLM settings
|
||||
- Sets the input and output for a specific component, and more.
|
||||
4. Click **Save** to apply changes to your agent and **Run** to test it.
|
||||
|
||||
## Components
|
||||
|
||||
Please review the flowing description of the RAG-specific components before you proceed:
|
||||
|
||||
| Component | Description |
|
||||
|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **Retrieval** | A component that retrieves information from specified knowledge bases and returns 'Empty response' if no information is found. Ensure the correct knowledge bases are selected. |
|
||||
| **Generate** | A component that prompts the LLM to generate responses. You must ensure the prompt is set correctly. |
|
||||
| **Interact** | A component that serves as the interface between human and the bot, receiving user inputs and displaying the agent's responses. |
|
||||
| **Categorize** | A component that uses the LLM to classify user inputs into predefined categories. Ensure you specify the name, description, and examples for each category, along with the corresponding next component. |
|
||||
| **Message** | 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. |
|
||||
| **Rewrite** | A component that rewrites a user query from the **Interact** component, based on the context of previous dialogues. |
|
||||
| **Keyword** | A component that extracts keywords from a user query, with TopN specifying the number of keywords to extract. |
|
||||
|
||||
:::caution NOTE
|
||||
|
||||
- Ensure **Rewrite**'s upstream component is **Relevant** and downstream component is **Retrieval**.
|
||||
- Ensure the downstream component of **Message** is **Interact**.
|
||||
- The downstream component of **Begin** is always **Interact**.
|
||||
|
||||
:::
|
||||
|
||||
## Basic operations
|
||||
|
||||
| Operation | Description |
|
||||
|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Add a component | Drag and drop the desired component from the left panel onto the canvas. |
|
||||
| Delete a component | On the canvas, hover over the three dots (...) of the component to display the delete option, then select it to remove the component. |
|
||||
| Copy a component | On the canvas, hover over the three dots (...) of the component to display the copy option, then select it to make a copy the component. |
|
||||
| Update component settings | On the canvas, click the desired component to display the component settings. |
|
||||
3. Click the **+** button on the **Begin** component to select the desired components in your workflow.
|
||||
4. Click **Save** to apply changes to your agent.
|
||||
|
||||
@ -10,4 +10,6 @@ You can use iframe to embed an agent into a third-party webpage.
|
||||
1. Before proceeding, you must [acquire an API key](../models/llm_api_key_setup.md); otherwise, an error message would appear.
|
||||
2. On the **Agent** page, click an intended agent to access its editing page.
|
||||
3. Click **Management > Embed into webpage** on the top right corner of the canvas to show the **iframe** window:
|
||||
4. Copy the iframe and embed it into a specific location on your webpage.
|
||||
4. Copy the iframe and embed it into your webpage.
|
||||
|
||||

|
||||
@ -1,109 +0,0 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
slug: /general_purpose_chatbot
|
||||
---
|
||||
|
||||
# Create chatbot
|
||||
|
||||
Create a general-purpose chatbot.
|
||||
|
||||
---
|
||||
|
||||
:::danger DEPRECATED!
|
||||
A new version is coming soon.
|
||||
:::
|
||||
|
||||
Chatbot is one of the most common AI scenarios. However, effectively understanding user queries and responding appropriately remains a challenge. RAGFlow's general-purpose chatbot agent is our attempt to tackle this longstanding issue.
|
||||
|
||||
This chatbot closely resembles the chatbot introduced in [Start an AI chat](../chat/start_chat.md), but with a key difference - it introduces a reflective mechanism that allows it to improve the retrieval from the target knowledge bases by rewriting the user's query.
|
||||
|
||||
This document provides guides on creating such a chatbot using our chatbot template.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. Ensure you have properly set the LLM to use. See the guides on [Configure your API key](../models/llm_api_key_setup.md) or [Deploy a local LLM](../models/deploy_local_llm.mdx) for more information.
|
||||
2. Ensure you have a knowledge base configured and the corresponding files properly parsed. See the guide on [Configure a knowledge base](../dataset/configure_knowledge_base.md) for more information.
|
||||
3. Make sure you have read the [Introduction to Agentic RAG](./agent_introduction.md).
|
||||
|
||||
## Create a chatbot agent from template
|
||||
|
||||
To create a general-purpose chatbot agent using our template:
|
||||
|
||||
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 **General-purpose chatbot** and click **Use this template**.
|
||||
*You are now directed to the **no-code workflow editor** page.*
|
||||
|
||||

|
||||
|
||||
:::tip NOTE
|
||||
RAGFlow's no-code editor spares you the trouble of coding, making agent development effortless.
|
||||
:::
|
||||
|
||||
## Understand each component in the template
|
||||
|
||||
Here’s a breakdown of each component and its role and requirements in the chatbot template:
|
||||
|
||||
- **Begin**
|
||||
- Function: Sets an opening greeting for users.
|
||||
- Purpose: Establishes a welcoming atmosphere and prepares the user for interaction.
|
||||
|
||||
- **Interact**
|
||||
- Function: Serves as the interface between human and the bot.
|
||||
- Role: Acts as the downstream component of **Begin**.
|
||||
|
||||
- **Retrieval**
|
||||
- Function: Retrieves information from specified knowledge base(s).
|
||||
- Requirement: Must have `knowledgebases` set up to function.
|
||||
|
||||
- **Relevant**
|
||||
- Function: Assesses the relevance of the retrieved information from the **Retrieval** component to the user query.
|
||||
- Process:
|
||||
- If relevant, it directs the data to the **Generate** component for final response generation.
|
||||
- Otherwise, it triggers the **Rewrite** component to refine the user query and redo the retrival process.
|
||||
|
||||
- **Generate**
|
||||
- Function: Prompts the LLM to generate responses based on the retrieved information.
|
||||
- Note: The prompt settings allow you to control the way in which the LLM generates responses. Be sure to review the prompts and make necessary changes.
|
||||
|
||||
- **Rewrite**:
|
||||
- Function: Refines a user query when no relevant information from the knowledge base is retrieved.
|
||||
- Usage: Often used in conjunction with **Relevant** and **Retrieval** to create a reflective/feedback loop.
|
||||
|
||||
## Configure your chatbot agent
|
||||
|
||||
1. Click **Begin** to set an opening greeting:
|
||||

|
||||
|
||||
2. Click **Retrieval** to select the right knowledge base(s) and make any necessary adjustments:
|
||||

|
||||
|
||||
3. Click **Generate** to configure the LLM's summarization behavior:
|
||||
3.1. Confirm the model.
|
||||
3.2. Review the prompt settings. If there are variables, ensure they match the correct component IDs:
|
||||

|
||||
|
||||
4. Click **Relevant** to review or change its settings:
|
||||
*You may retain the current settings, but feel free to experiment with changes to understand how the agent operates.*
|
||||

|
||||
|
||||
5. Click **Rewrite** to select a different model for query rewriting or update the maximum loop times for query rewriting:
|
||||

|
||||

|
||||
|
||||
:::danger NOTE
|
||||
Increasing the maximum loop times may significantly extend the time required to receive the final response.
|
||||
:::
|
||||
|
||||
1. Update your workflow where you see necessary.
|
||||
|
||||
2. Click to **Save** to apply your changes.
|
||||
*Your agent appears as one of the agent cards on the **Agent** page.*
|
||||
|
||||
## Test your chatbot agent
|
||||
|
||||
1. Find your chatbot agent on the **Agent** page:
|
||||

|
||||
|
||||
2. Experiment with your questions to verify if this chatbot functions as intended:
|
||||

|
||||
Reference in New Issue
Block a user