要说最近RAG方面火热的项目当属kotaemon,短时间暴涨8k star

一个开源、清晰、强大且可定制的RAG UI

图片

kotaemon的亮点是可定制化RAG UI,核心技术点是混合索引(Vector、Keyword、GraphRAG)、复杂推理Agent(ReAct、ReWOO、MemoryGIST 和 GraphReader)、多模态

混合索引(GraphRAG)

混合索引主要是指:全文和矢量融合,这里还有一个选型就是集成了RAG的新范式:GraphRAG

图片

看代码直接用的微软GraphRAG

图片

检索后重排采用LLMReranker

RERANK_PROMPT_TEMPLATE = """Given the following question and context,

复杂推理Agent

推理目前主要实现了reactrewoo,tools包括google搜索工具、llm工具、wikipedia工具,可以自定义扩展。

图片

react还是经典的Thought、Action、Action Input、Observation模式

zero_shot_react_prompt = PromptTemplate(

rewoo(Reasoning WithOut Observation),该范式将推理过程与外部观察分离

图片

planner的prompt模版

from kotaemon.llms import PromptTemplate

solver的prompt模版

zero_shot_solver_prompt = PromptTemplate(

多模态

多模态体现在丰富的loader上面,多达十几种比如:html_loader.py、excel_loader.py、unstructured_loader.py等,可以借鉴用于其它场景哦图片

图片

多模态测试,AdobeReader

图片

https://github.com/Cinnamon/kotaemon