Miscellaneous updates (#4228)

### What problem does this PR solve?


### Type of change


- [x] Documentation Update
This commit is contained in:
writinwaters 2024-12-25 20:21:38 +08:00 committed by GitHub
parent a3eeb5de32
commit 85511cb1fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 64 additions and 11 deletions

View File

@ -0,0 +1,8 @@
{
"label": "Agent Component Reference",
"position": 1,
"link": {
"type": "generated-index",
"description": "A complete reference for RAGFlow's agent components."
}
}

View File

@ -5,6 +5,12 @@ slug: /agent_introduction
# Introduction to agents
Key concepts, basic operations, a quick view of the agent editor.
---
## Key concepts
Agents and RAG are complementary techniques, each enhancing the others 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,
@ -23,7 +29,7 @@ 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.
![agents](https://github.com/user-attachments/assets/5e10758b-ec43-49ae-bf91-ff7d04c56e9d)
![agent_mainpage](https://github.com/user-attachments/assets/5c0bb123-8f4e-42ea-b250-43f640dc6814)
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:
@ -35,7 +41,7 @@ We also provide templates catered to different business scenarios. You can eithe
*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.*
![workflow_editor](https://github.com/user-attachments/assets/9fc6891c-7784-43b8-ab4a-3b08a9e551c4)
![workflow_editor](https://github.com/user-attachments/assets/47b4d5ce-b35a-4d6b-b483-ba495a75a65d)
4. General speaking, now you can do the following:
- Drag and drop a desired component to your workflow,
@ -58,7 +64,7 @@ Please review the flowing description of the RAG-specific components before you
| **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. |
| **Relevant** | 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. |
| **Rewrite** | 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. Ensure its upstream is **Relevant** and downstream is **Retrieval**. |
| **Keyword** | A component that retrieves top N search results from wikipedia.org. Ensure the TopN value is set properly before use. |
| **Keyword** | A component that extracts keywords from a user query, with TopN specifying the number of keywords to extract. |
:::caution NOTE

View File

@ -883,6 +883,10 @@ Failure:
---
## CHUNK MANAGEMENT WITHIN DATASET
---
### Add chunk
**POST** `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks`
@ -936,9 +940,7 @@ Success:
"content": "ragflow content",
"create_time": "2024-10-16 08:05:04",
"create_timestamp": 1729065904.581025,
"dataset_id": [
"c7ee74067a2c11efb21c0242ac120006"
],
"dataset_id": "c7ee74067a2c11efb21c0242ac120006",
"document_id": "5c5999ec7be811ef9cab0242ac120005",
"id": "d78435d142bd5cf6704da62c778795c5",
"important_keywords": []

View File

@ -1,4 +1,4 @@
from scipy.special import kwargs---
---
sidebar_position: 2
slug: /python_api_reference
---
@ -641,6 +641,10 @@ print("Async bulk parsing cancelled.")
---
## CHUNK MANAGEMENT WITHIN DATASET
---
### Add chunk
```python
@ -1436,11 +1440,11 @@ The parameters in `begin` component.
#### Examples
```python
from ragflow_sdk import RAGFlow
from ragflow_sdk import RAGFlow, Agent
rag_object = RAGFlow(api_key="<YOUR_API_KEY>", base_url="http://<YOUR_BASE_URL>:9380")
AGENT_ID = "AGENT_ID"
session = create_session(AGENT_ID,rag_object)
session = Agent.create_session(AGENT_ID, rag_object)
```
---
@ -1513,11 +1517,11 @@ A list of `Chunk` objects representing references to the message, each containin
#### Examples
```python
from ragflow_sdk import RAGFlow,Agent
from ragflow_sdk import RAGFlow, Agent
rag_object = RAGFlow(api_key="<YOUR_API_KEY>", base_url="http://<YOUR_BASE_URL>:9380")
AGENT_id = "AGENT_ID"
session = Agent.create_session(AGENT_id,rag_object)
session = Agent.create_session(AGENT_id, rag_object)
print("\n===== Miss R ====\n")
print("Hello. What can I do for you?")

View File

@ -7,6 +7,39 @@ slug: /release_notes
Key features, improvements and bug fixes in the latest releases.
## v0.15.1
Released on December 25, 2024.
### Upgrades
- Upgrades RAGFlow's document engine [Infinity](https://github.com/infiniflow/infinity) to v0.5.2.
- Enhances the log display of document parsing status.
### Fixed issues
This release fixes the following issues:
- The `SCORE not found` and `position_int` errors returned by [Infinity](https://github.com/infiniflow/infinity).
- 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.
- Miscellaneous API issues.
### Related APIs
#### HTTP APIs
Adds an optional parameter `"user_id"` to the following APIs:
- [Create session with chat assistant](https://ragflow.io/docs/dev/http_api_reference#create-session-with-chat-assistant)
- [Update chat assistant's session](https://ragflow.io/docs/dev/http_api_reference#update-chat-assistants-session)
- [List chat assistant's sessions](https://ragflow.io/docs/dev/http_api_reference#list-chat-assistants-sessions)
- [Create session with agent](https://ragflow.io/docs/dev/http_api_reference#create-session-with-agent)
- [Converse with chat assistant](https://ragflow.io/docs/dev/http_api_reference#converse-with-chat-assistant)
- [Converse with agent](https://ragflow.io/docs/dev/http_api_reference#converse-with-agent)
- [List agent sessions](https://ragflow.io/docs/dev/http_api_reference#list-agent-sessions)
## v0.15.0
Released on December 18, 2024.