자료 : https://www.youtube.com/playlist?list=PLfaIDFEXuae2LXbO1_PKyVJiQ23ZztA0x
Routing (Logical Routing + Semantic Routing)
routing the question (possibily decomposed in th previous step) to the relevant DBs or prompts.
1. Logical Routing
(DBs could be Graph DB, Relational DB, Vectorstore)
feed the LLM with the knowledge of available DBs → make the LLM to reason and choose which DB to retrieve from
classification + function calling to produce structured output

llm.with_structured_output()

structured output → function schema → bind to LLM
2. Semantic Routing
embed questions & embed prompts → choose a prompt relevant to the query based on similarity

Query Construction
(다시 듣기!)
Unstructured NL query + structured function schema (structured schema of the chosen DB) → structured query
'Studying AI' 카테고리의 다른 글
RAG from scratch (4) (0) | 2024.06.04 |
---|---|
RAG from scratch (2) (0) | 2024.06.02 |
RAG from scratch (1) (0) | 2024.05.31 |