mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
Merge pull request #92 from langbot-app/feat/rerank-model
docs: add rerank model documentation
This commit is contained in:
@@ -55,13 +55,16 @@ For platform-specific feature support, please check [this document](/en/insight/
|
||||
| [ModelScope](https://modelscope.cn/docs/model-service/API-Inference/intro) | ✅ | LLM gateway (MaaS) |
|
||||
| [TBox (Ant TreasureBox)](https://tbox.cn/) | ✅ | LLMOps platform |
|
||||
| [Coze](https://coze.cn) | ✅ | LLMOps platform |
|
||||
| [Cohere](https://cohere.com/) | ✅ | Rerank models |
|
||||
| [Jina](https://jina.ai/) | ✅ | Rerank models |
|
||||
| [Voyage AI](https://voyageai.com/) | ✅ | Rerank models |
|
||||
|
||||
## LLM Application Paradigm Implementation
|
||||
|
||||
| Application Paradigm | Status | Remarks |
|
||||
| --- | --- | --- |
|
||||
| Agent | ✅ | |
|
||||
| RAG | ✅ | Using Chroma as vector database |
|
||||
| RAG | ✅ | Using Chroma as vector database, supports Rerank re-scoring |
|
||||
| MCP | ✅ | Support Stdio and HTTP protocol |
|
||||
|
||||
## System Extensibility
|
||||
|
||||
@@ -29,6 +29,17 @@ Go to your pipeline configuration, under the "AI" tab, choose `Local Agent` as t
|
||||
|
||||
<img width="400px" src="/images/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
### Configure Reranking (Optional)
|
||||
|
||||
After selecting a knowledge base, you can configure a **Rerank Model** below to improve retrieval quality:
|
||||
|
||||
- **Rerank Model**: Select a configured rerank model (if none available, add one in [Model Configuration](/en/usage/models/readme) first)
|
||||
- **Rerank Top-K**: Number of most relevant results to keep after reranking, default is 5
|
||||
|
||||
<Tip>
|
||||
Rerank models are optional. When configured, candidate documents from knowledge base retrieval are re-scored by the rerank model, keeping only the top-K most relevant results before passing them to the LLM, significantly reducing noise from irrelevant content.
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
LangBot's built-in knowledge base can be used only when the runner is set to `Local Agent`. For other runners, refer to their documentation.
|
||||
</Info>
|
||||
|
||||
@@ -45,3 +45,13 @@ The system has integrated the official embedding model provided by seekdb, no pa
|
||||
- On the "Embedding Model" page, select "seekdb-built-in";
|
||||
- Click "Save" to use it immediately;
|
||||
- Then select this model in your knowledge base to take effect.
|
||||
|
||||
### Rerank Model
|
||||
|
||||
Rerank models re-score RAG retrieval results to significantly improve the precision of knowledge base answers. When a knowledge base returns multiple candidate documents, the rerank model uses a cross-encoder to precisely score each document's relevance to the query, selecting only the most relevant content.
|
||||
|
||||
Enter `Model Name` and select `Model Provider`, then submit. After that, select this model in your pipeline's "AI" configuration.
|
||||
|
||||
<Tip>
|
||||
Rerank models are optional. Without one, knowledge base results are used in their original retrieval order. With a rerank model configured, results are re-scored and only the top-K most relevant results are kept.
|
||||
</Tip>
|
||||
|
||||
@@ -55,13 +55,16 @@ LangBot 是一个开源的大语言模型原生即时通信机器人开发平台
|
||||
| [ModelScope](https://modelscope.cn/docs/model-service/API-Inference/intro) | ✅ | 大模型聚合平台 |
|
||||
| [TBox(蚂蚁百宝箱)](https://tbox.cn/) | ✅ | LLMOps 平台 |
|
||||
| [Coze](https://coze.cn) | ✅ | LLMOps 平台 |
|
||||
| [Cohere](https://cohere.com/) | ✅ | Rerank 模型 |
|
||||
| [Jina](https://jina.ai/) | ✅ | Rerank 模型 |
|
||||
| [Voyage AI](https://voyageai.com/) | ✅ | Rerank 模型 |
|
||||
|
||||
## LLM 应用范式实现
|
||||
|
||||
| 应用范式 | 状态 | 备注 |
|
||||
| --- | --- | --- |
|
||||
| Agent | ✅ | |
|
||||
| RAG | ✅ | 使用 Chroma 作为向量数据库 |
|
||||
| RAG | ✅ | 使用 Chroma 作为向量数据库,支持 Rerank 重排序 |
|
||||
| MCP | ✅ | 支持 Stdio 和 HTTP 两种方式 |
|
||||
|
||||
## 系统扩展性
|
||||
|
||||
@@ -29,6 +29,17 @@ LangBot 原生支持 RAG(Retrieval-Augmented Generation,即检索增强生
|
||||
|
||||
<img width="400px" src="/images/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
### 配置重排序(可选)
|
||||
|
||||
选择知识库后,您可以在下方配置**重排序模型**来提升检索质量:
|
||||
|
||||
- **重排序模型**:选择已配置的 Rerank 模型(如未配置,请先到[模型配置](/zh/usage/models/readme)中添加)
|
||||
- **重排序保留数量(Top-K)**:重排序后保留的最相关结果数量,默认为 5
|
||||
|
||||
<Tip>
|
||||
重排序模型是可选的。配置后,知识库检索返回的候选文档会经过重排序模型重新打分,只保留最相关的 Top-K 条,再交给大模型回答,显著减少无关信息干扰。
|
||||
</Tip>
|
||||
|
||||
<Info>
|
||||
仅当运行器为`内置 Agent`时,才可以使用 LangBot 原生知识库,若要在使用其他运行器时使用知识库,请参考所使用的运行器对应产品的文档。
|
||||
</Info>
|
||||
|
||||
@@ -23,7 +23,8 @@ LangBot Models 是 LangBot 官方提供的模型服务。当您使用 LangBot Sp
|
||||
├── API Keys: [sk-xxx]
|
||||
├── LLM 模型: gpt-4o
|
||||
├── LLM 模型: gpt-4o-mini
|
||||
└── 向量模型: text-embedding-3-small
|
||||
├── 向量模型: text-embedding-3-small
|
||||
└── 重排序模型: rerank-v3.5
|
||||
```
|
||||
|
||||
<Tip>
|
||||
@@ -57,6 +58,16 @@ LangBot Models 是 LangBot 官方提供的模型服务。当您使用 LangBot Sp
|
||||
|
||||
### 使用 seekdb 内置嵌入模型(零配置)
|
||||
系统已集成 seekdb 提供的官方嵌入模型,无需填写任何参数。
|
||||
- 在“嵌入模型”页面选择「seekdb-内置」;
|
||||
- 在”嵌入模型”页面选择「seekdb-内置」;
|
||||
- 点击「保存」即可立即使用;
|
||||
- 后续在知识库中选择该模型即可生效。
|
||||
|
||||
### 重排序模型 (Rerank Model)
|
||||
|
||||
重排序模型用于对 RAG 检索结果进行重新评分排序,显著提升知识库回答的精准度。当知识库返回多个候选文档时,重排序模型会使用 cross-encoder 对每个文档与查询的相关性进行精确打分,筛选出最相关的内容。
|
||||
|
||||
填入 `模型名称`、选择 `模型供应商`,然后提交即可。之后请在流水线的”AI 能力”配置中选择此模型。
|
||||
|
||||
<Tip>
|
||||
重排序模型是可选的。不配置时,知识库检索结果将按向量相似度排序直接使用。配置后,检索结果会经过重排序模型重新打分,只保留最相关的 Top-K 条结果。
|
||||
</Tip>
|
||||
|
||||
Reference in New Issue
Block a user