基于文档的快捷问答开源项目调研

基于文档的快捷问答开源项目调研
项目名称ChatFilesh2oGPT pdfGPT
简介项目是一个前端工程,使用supabase后端服务和数据库,每个聊天窗口对应一份文档。Apachae V2开源项目,功能强大,支持查询和总结私人文档,以及与本地私有GPT LLM聊天,有丰富的自定义配置项。轻量级PDF智能聊天,文档数据保存在本地服务器,在聊天时将文档拆分向量化,并且计算相似度,在内存中使用向量数据,不会持久化保存。
示例工程地址https://lkt-chatfiles.vercel.app/zhhttps://gpt.h2o.ai/https://bhaskartripathi-pdfgpt-turbo.hf.space/
编程语言typescriptpythonpython
支持文件格式word、pdf、txt、markdownpdf、excel、word、images、text、markdown、etcpdf
核心流程文档上传上传到本地服务器上传到本地服务器上传到本地服务器
文档拆分使用langchain的文本分割器,按照字数拆分使用langchain的文本分割器,按照字数拆分自己编写拆分算法将文本拆分为指定长度的文本块,拆分逻辑跟langchain的文本分割器类似
文档向量化使用openai接口将文本向量化使用向量模型(instructor-large或all-MiniLM-L6-v2)将文本向量化使用google的 Universal Sentence Encoder接口将文本材料进行向量化
相似度匹配获取supabase向量存储对象执行向量保存和相似度搜索,通过余弦距离计算相似度值。使用Chroma或Weaviate向量数据库执行向量保存和相似度搜索,通过余弦距离计算相似度得分。使用k-邻近算法计算相似度值,底层使用的是欧氏距离。
文本召回相似度匹配时返回文本材料相似度匹配时返回文本材料相似度匹配时返回文本材料
文本召回相似度匹配时返回文本材料相似度匹配时返回文本材料相似度匹配时返回文本材料
组装提示词相关上下文、用户问题、系统提示词(The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.)不支持用户自定义配置相关上下文、用户问题、系统提示词Pre-Prompt(添加在上下文之前)、系统提示词Prompt(添加在上下文之后)支持用户自定义配置相关上下文、用户问题、系统提示词(Instructions: Compose a comprehensive reply to the query using the search results given. Cite each reference using [Page Number] notation (every result has this number at the beginning). Citation should be done at the end of each sentence. If the search results mention multiple subjects with the same name, create separate answers for each. Only include information found in the results and don't add any additional information. Make sure the answer is correct and don't output false content. If the text does not relate to the query, simply state 'Text Not Found in PDF'. Ignore outlier search results which has nothing to do with the question. Only answer what is asked. The answer should be short and concise. Answer step-by-step. )不支持用户自定义配置
提问gpt支持openai,azure openai大语言模型支持LLaMa2, Mistral, Falcon, Vicuna, WizardLM.支持openai大语言模型
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值