成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!

發(fā)布于 2024-9-6 15:19
瀏覽
0收藏

要說(shuō)最近RAG方面火熱的項(xiàng)目當(dāng)屬kotaemon,短時(shí)間暴漲8k star

??一個(gè)開(kāi)源、清晰、強(qiáng)大且可定制的RAG UI??

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

kotaemon的亮點(diǎn)是可定制化RAG UI,核心技術(shù)點(diǎn)是混合索引(Vector、Keyword、GraphRAG)、復(fù)雜推理Agent(ReAct、ReWOO、MemoryGIST 和 GraphReader)、多模態(tài)


混合索引(GraphRAG)

混合索引主要是指:全文和矢量融合,這里還有一個(gè)選型就是集成了RAG的新范式:GraphRAG

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

看代碼直接用的微軟GraphRAG

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

檢索后重排采用LLMReranker

RERANK_PROMPT_TEMPLATE = """Given the following question and context,
return YES if the context is relevant to the question and NO if it isn't.


> Question: {question}
> Context:
>>>
{context}
>>>
> Relevant (YES / NO):"""

復(fù)雜推理Agent

推理目前主要實(shí)現(xiàn)了reactrewoo,tools包括google搜索工具、llm工具、wikipedia工具,可以自定義擴(kuò)展。

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

react還是經(jīng)典的Thought、Action、Action Input、Observation模式

zero_shot_react_prompt = PromptTemplate(
    template="""Answer the following questions as best you can. Give answer in {lang}. You have access to the following tools:
{tool_description}
Use the following format:


Question: the input question you must answer
Thought: you should always think about what to do


Action: the action to take, should be one of [{tool_names}]


Action Input: the input to the action, should be different from the action input of the same action in previous steps.


Observation: the result of the action


... (this Thought/Action/Action Input/Observation can repeat N times)
#Thought: I now know the final answer
Final Answer: the final answer to the original input question


Begin! After each Action Input.


Question: {instruction}
Thought:{agent_scratchpad}
    """
)

rewoo(Reasoning WithOut Observation),該范式將推理過(guò)程與外部觀察分離

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

planner的prompt模版

from kotaemon.llms import PromptTemplate


zero_shot_planner_prompt = PromptTemplate(
    template="""You are an AI agent who makes step-by-step plans to solve a problem under the help of external tools.
For each step, make one plan followed by one tool-call, which will be executed later to retrieve evidence for that step.
You should store each evidence into a distinct variable #E1, #E2, #E3 ... that can be referred to in later tool-call inputs.


##Available Tools##
{tool_description}


##Output Format (Replace '<...>')##
#Plan1: <describe your plan here>
#E1: <toolname>[<input here>] (eg. Search[What is Python])
#Plan2: <describe next plan>
#E2: <toolname>[<input here, you can use #E1 to represent its expected output>]
And so on...


##Your Task##
{task}


##Now Begin##
"""
)

solver的prompt模版

zero_shot_solver_prompt = PromptTemplate(
    template="""You are an AI agent who solves a problem with my assistance. I will provide step-by-step plans(#Plan) and evidences(#E) that could be helpful.
Your task is to briefly summarize each step, then make a short final conclusion for your task. Give answer in {lang}.


##My Plans and Evidences##
{plan_evidence}


##Example Output##
First, I <did something> , and I think <...>; Second, I <...>, and I think <...>; ....
So, <your conclusion>.


##Your Task##
{task}


##Now Begin##
"""
)

多模態(tài)

多模態(tài)體現(xiàn)在豐富的loader上面,多達(dá)十幾種比如:html_loader.py、excel_loader.py、unstructured_loader.py等,可以借鑒用于其它場(chǎng)景哦


kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

多模態(tài)測(cè)試,AdobeReader

kotaemon核心GraphRAG、Agent、多模態(tài)代碼解讀!-AI.x社區(qū)

https://github.com/Cinnamon/kotaemon

本文轉(zhuǎn)載自?? PaperAgent??,作者: PaperAgent

標(biāo)簽
已于2024-9-6 17:11:13修改
收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦
主站蜘蛛池模板: 欧美性生活一区二区三区 | 久久久入口 | www.一区二区三区.com | 91国内精精品久久久久久婷婷 | 一区二区三区四区不卡视频 | 欧洲视频一区 | 国产激情视频网站 | 精品一区二区视频 | 国产欧美一区二区在线观看 | 久久高清国产 | 免费在线视频一区二区 | 亚洲欧美一区二区三区国产精品 | 国产精品久久久久久妇女6080 | 国产99小视频 | 国产视频久久久 | 久久久久久久91 | 在线一区二区三区 | 亚洲精品成人av久久 | 爱爱免费视频网站 | 日本视频在线播放 | 日韩欧美一区二区三区在线播放 | 成人免费视频网站在线看 | 国产成人精品一区二 | 国产1区2区| 欧美日韩在线精品 | 18性欧美 | 国产99久久精品一区二区永久免费 | 91精品一区二区三区久久久久久 | 国产精品免费大片 | 亚洲午夜精品久久久久久app | 97久久久| 成年人的视频免费观看 | 99这里只有精品视频 | 一级在线观看 | 欧美一区二区三区在线免费观看 | 日本久久www成人免 成人久久久久 | 久久成人国产 | 黄色a视频| 黄网站在线播放 | 中文字幕日韩欧美一区二区三区 | 亚洲精品一区中文字幕 |