You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What problem does this PR solve?
Update icons for docs.
Trailing spaces are auto truncated by the editor, does not affect real
content.
### Type of change
- [x] Documentation Update
Copy file name to clipboardExpand all lines: docs/basics/rag.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ sidebar_position: 1
3
3
slug: /what-is-rag
4
4
---
5
5
6
-
# What is Retreival-Augmented-Generation (RAG)?
6
+
# What is Retreival-Augmented-Generation (RAG)?
7
7
8
8
Since large language models (LLMs) became the focus of technology, their ability to handle general knowledge has been astonishing. However, when questions shift to internal corporate documents, proprietary knowledge bases, or real-time data, the limitations of LLMs become glaringly apparent: they cannot access private information outside their training data. Retrieval-Augmented Generation (RAG) was born precisely to address this core need. Before an LLM generates an answer, it first retrieves the most relevant context from an external knowledge base and inputs it as "reference material" to the LLM, thereby guiding it to produce accurate answers. In short, RAG elevates LLMs from "relying on memory" to "having evidence to rely on," significantly improving their accuracy and trustworthiness in specialized fields and real-time information queries.
9
9
@@ -86,22 +86,22 @@ They are highly consistent at the technical base (e.g., vector retrieval, keywor
86
86
87
87
RAG has demonstrated clear value in several typical scenarios:
88
88
89
-
1. Enterprise Knowledge Q&A and Internal Search
89
+
1. Enterprise Knowledge Q&A and Internal Search
90
90
By vectorizing corporate private data and combining it with an LLM, RAG can directly return natural language answers based on authoritative sources, rather than document lists. While meeting intelligent Q&A needs, it inherently aligns with corporate requirements for data security, access control, and compliance.
91
-
2. Complex Document Understanding and Professional Q&A
91
+
2. Complex Document Understanding and Professional Q&A
92
92
For structurally complex documents like contracts and regulations, the value of RAG lies in its ability to generate accurate, verifiable answers while maintaining context integrity. Its system accuracy largely depends on text chunking and semantic understanding strategies.
93
-
3. Dynamic Knowledge Fusion and Decision Support
93
+
3. Dynamic Knowledge Fusion and Decision Support
94
94
In business scenarios requiring the synthesis of information from multiple sources, RAG evolves into a knowledge orchestration and reasoning support system for business decisions. Through a multi-path recall mechanism, it fuses knowledge from different systems and formats, maintaining factual consistency and logical controllability during the generation phase.
95
95
96
96
## The future of RAG
97
97
98
98
The evolution of RAG is unfolding along several clear paths:
99
99
100
-
1. RAG as the data foundation for Agents
100
+
1. RAG as the data foundation for Agents
101
101
RAG and agents have an architecture vs. scenario relationship. For agents to achieve autonomous and reliable decision-making and execution, they must rely on accurate and timely knowledge. RAG provides them with a standardized capability to access private domain knowledge and is an inevitable choice for building knowledge-aware agents.
102
-
2. Advanced RAG: Using LLMs to optimize retrieval itself
102
+
2. Advanced RAG: Using LLMs to optimize retrieval itself
103
103
The core feature of next-generation RAG is fully utilizing the reasoning capabilities of LLMs to optimize the retrieval process, such as rewriting queries, summarizing or fusing results, or implementing intelligent routing. Empowering every aspect of retrieval with LLMs is key to breaking through current performance bottlenecks.
104
-
3. Towards context engineering 2.0
104
+
3. Towards context engineering 2.0
105
105
Current RAG can be viewed as Context Engineering 1.0, whose core is assembling static knowledge context for single Q&A tasks. The forthcoming Context Engineering 2.0 will extend with RAG technology at its core, becoming a system that automatically and dynamically assembles comprehensive context for agents. The context fused by this system will come not only from documents but also include interaction memory, available tools/skills, and real-time environmental information. This marks the transition of agent development from a "handicraft workshop" model to the industrial starting point of automated context engineering.
106
106
107
107
The essence of RAG is to build a dedicated, efficient, and trustworthy external data interface for large language models; its core is Retrieval, not Generation. Starting from the practical need to solve private data access, its technical depth is reflected in the optimization of retrieval for complex unstructured data. With its deep integration into agent architectures and its development towards automated context engineering, RAG is evolving from a technology that improves Q&A quality into the core infrastructure for building the next generation of trustworthy, controllable, and scalable intelligent applications.
Copy file name to clipboardExpand all lines: docs/develop/mcp/launch_mcp_server.md
+33-30Lines changed: 33 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
---
2
2
sidebar_position: 1
3
3
slug: /launch_mcp_server
4
+
sidebar_custom_props: {
5
+
categoryIcon: LucideTvMinimalPlay
6
+
}
4
7
---
5
8
6
9
# Launch RAGFlow MCP server
@@ -9,13 +12,13 @@ Launch an MCP server from source or via Docker.
9
12
10
13
---
11
14
12
-
A RAGFlow Model Context Protocol (MCP) server is designed as an independent component to complement the RAGFlow server. Note that an MCP server must operate alongside a properly functioning RAGFlow server.
15
+
A RAGFlow Model Context Protocol (MCP) server is designed as an independent component to complement the RAGFlow server. Note that an MCP server must operate alongside a properly functioning RAGFlow server.
13
16
14
-
An MCP server can start up in either self-host mode (default) or host mode:
17
+
An MCP server can start up in either self-host mode (default) or host mode:
15
18
16
-
-**Self-host mode**:
19
+
-**Self-host mode**:
17
20
When launching an MCP server in self-host mode, you must provide an API key to authenticate the MCP server with the RAGFlow server. In this mode, the MCP server can access *only* the datasets of a specified tenant on the RAGFlow server.
18
-
-**Host mode**:
21
+
-**Host mode**:
19
22
In host mode, each MCP client can access their own datasets on the RAGFlow server. However, each client request must include a valid API key to authenticate the client with the RAGFlow server.
20
23
21
24
Once a connection is established, an MCP server communicates with its client in MCP HTTP+SSE (Server-Sent Events) mode, unidirectionally pushing responses from the RAGFlow server to its client in real time.
@@ -29,9 +32,9 @@ Once a connection is established, an MCP server communicates with its client in
29
32
If you wish to try out our MCP server without upgrading RAGFlow, community contributor [yiminghub2024](https://github.com/yiminghub2024) 👏 shares their recommended steps [here](#launch-an-mcp-server-without-upgrading-ragflow).
30
33
:::
31
34
32
-
## Launch an MCP server
35
+
## Launch an MCP server
33
36
34
-
You can start an MCP server either from source code or via Docker.
37
+
You can start an MCP server either from source code or via Docker.
35
38
36
39
### Launch from source code
37
40
@@ -48,7 +51,7 @@ uv run mcp/server/server.py --host=127.0.0.1 --port=9382 --base-url=http://127.0
48
51
# uv run mcp/server/server.py --host=127.0.0.1 --port=9382 --base-url=http://127.0.0.1:9380 --mode=host
49
52
```
50
53
51
-
Where:
54
+
Where:
52
55
53
56
-`host`: The MCP server's host address.
54
57
-`port`: The MCP server's listening port.
@@ -94,7 +97,7 @@ The MCP server is designed as an optional component that complements the RAGFlow
94
97
# - --no-json-response # Disables JSON responses for the streamable-HTTP transport
95
98
```
96
99
97
-
Where:
100
+
Where:
98
101
99
102
-`mcp-host`: The MCP server's host address.
100
103
-`mcp-port`: The MCP server's listening port.
@@ -119,13 +122,13 @@ Run `docker compose -f docker-compose.yml up` to launch the RAGFlow server toget
119
122
docker-ragflow-cpu-1 | Starting MCP Server on 0.0.0.0:9382 with base URL http://127.0.0.1:9380...
120
123
docker-ragflow-cpu-1 | Starting 1 task executor(s) on host 'dd0b5e07e76f'...
As MCP technology is still at early stage and no official best practices forauthentication or authorization have been established, RAGFlow currently uses [API key](./acquire_ragflow_api_key.md) to validate identity for the operations described earlier. However,in public environments, this makeshift solution could expose your MCP server to potential network attacks. Therefore, when running a local SSE server, it is recommended to bind only to localhost (`127.0.0.1`) rather than to all interfaces (`0.0.0.0`).
200
+
As MCP technology is still at early stage and no official best practices forauthentication or authorization have been established, RAGFlow currently uses [API key](./acquire_ragflow_api_key.md) to validate identity for the operations described earlier. However,in public environments, this makeshift solution could expose your MCP server to potential network attacks. Therefore, when running a local SSE server, it is recommended to bind only to localhost (`127.0.0.1`) rather than to all interfaces (`0.0.0.0`).
198
201
199
202
For further guidance, see the [official MCP documentation](https://modelcontextprotocol.io/docs/concepts/transports#security-considerations).
200
203
201
204
## Frequently asked questions
202
205
203
206
### When to use an API key for authentication?
204
207
205
-
The use of an API key depends on the operating mode of your MCP server.
208
+
The use of an API key depends on the operating mode of your MCP server.
206
209
207
-
- **Self-host mode** (default):
208
-
When starting the MCP server in self-host mode, you should provide an API key when launching it to authenticate it with the RAGFlow server:
209
-
- If launching from source, include the API key in the command.
210
+
- **Self-host mode** (default):
211
+
When starting the MCP server in self-host mode, you should provide an API key when launching it to authenticate it with the RAGFlow server:
212
+
- If launching from source, include the API key in the command.
210
213
- If launching from Docker, update the API key in**docker/docker-compose.yml**.
211
-
- **Host mode**:
214
+
- **Host mode**:
212
215
If your RAGFlow MCP server is working in host mode, include the API key in the `headers` of your client requests to authenticate your client with the RAGFlow server. An example is available [here](https://github.com/infiniflow/ragflow/blob/main/mcp/client/client.py).
0 commit comments