...
The original raw query is transformed into a clean query. For the default knowledge base configuration, this means taking an ambiguous sentence, like
location of food
and turning it into the format of a question, such asWhere is the food located?
so that the text matches the format of the questions that were generated by the ingestion engineWe lookup the embedding vector for the transformed query
We use the embedding vector to perform a query on the knowledge base and find the top K knowledge chunks whose
matching text
(a.k.a the generated question) is the closest to the query textWe use a reranking algorithm to rerank the matched knowledge chunks against the query
We discard all except the top 5 matching knowledge chunks
The matching knowledge chunks are returned. For your standard AI Agents, as determined by the rerankerthese matching knowledge chunks are then fed into the conversation history for the agent as a tool-result, which the agent can then use to formulate and write its response
Loading In Knowledge
There are many different ways to load in knowledge to your agent, which will depend a lot on the different use-cases for your agent.
...