Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Aug 28, 2023
1 parent 7e9cac3 commit fbb75c9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开
- [x] 支持手动输入内容
- [x] 支持 url 读取导入
- [x] 支持 CSV 批量导入问答对
- [ ] 支持知识库单独设置向量模型
- [x] 支持知识库单独设置向量模型
- [ ] 源文件存储
3. 多种效果测试渠道
- [x] 知识库单点搜索测试
Expand All @@ -62,7 +62,7 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开
5. 运营功能
- [x] 免登录分享窗口
- [x] Iframe 一键嵌入
- [ ] 统一查阅对话记录
- [x] 统一查阅对话记录,并对数据进行标注

## 👨‍💻 开发

Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# FastGPT

FastGPT is a knowledge-based question answering system based on the LLM language model, providing out-of-the-box capabilities for data processing, model invocation, and more. It also allows for complex question answering scenarios through visual workflow orchestration using Flow!
FastGPT is a knowledge-based question answering system built on the LLM. It offers out-of-the-box data processing and model invocation capabilities. Moreover, it allows for workflow orchestration through Flow visualization, thereby enabling complex question and answer scenarios!

</div>

Expand Down
Binary file added docSite/assets/imgs/flow-kbsearch1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docSite/assets/imgs/flow-kbsearch2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docSite/assets/imgs/flow-kbsearch3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docSite/content/docs/workflow/modules/kb_search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: '知识库搜索'
description: 'FastGPT AI 知识库搜索模块介绍'
icon: 'chat'
draft: false
toc: true
weight: 423
---

## 特点

- 可重复添加(复杂编排时防止线太乱,可以更美观)
- 有外部输入
- 有静态配置
- 触发执行
- 核心模块

![](/imgs/flow-kbsearch1.png)

## 参数说明

### 输入 - 关联的知识库

可以选择一个或多个**相同向量模型**的知识库,用于向量搜索。

### 输入 - 相似度

学名称为距离,两个向量之间距离,可以认为是两个向量的相似度,又可以映射成文本之间的相似度。

需要注意的是,不同的向量模型之间的相似度是不能比较的,因为他们的距离值计算出来差距很大。例如,openai 的 embedding 模型,通常 0.8 以上的才是较为准确的内容,而 M3E 模型则是 0.35。

### 输入 - 单次搜索上限

每次触发搜索模块时,最多取 n 条作为最终引用,又称 topN。需要注意的是,取了 n 条引用不代表对话模型都可以使用,还会受对话模型最大 Tokens 的影响。

### 输出 - 搜索结果

输出部分给了两个 boolean 类型的搜索结果,以便根据搜索结果进行不同的处理,通常会有下方两个处理方式:

| 直接回复特定内容 | 对接普通的 gpt |
| ----------------------------- | ----------------------------- |
| ![](/imgs/flow-kbsearch2.png) | ![](/imgs/flow-kbsearch3.png) |

当然,你也可以连接到 HTTP 模块,从而实现无法从知识搜索到内容时,去进行联网搜索或者维基百科搜索。

### 输出 - 引用内容

以数组格式输出引用,长度可以为 0。意味着,即使没有搜索到内容,这个输出链路也会走通。

0 comments on commit fbb75c9

Please sign in to comment.