Package com.axelor.ai.knowledge
Class KnowledgeRetriever
java.lang.Object
com.axelor.ai.knowledge.KnowledgeRetriever
Queries the vector store at chat time to retrieve relevant chunks for an agent.
For each knowledge base linked to the agent (plus any global knowledge bases), this retriever embeds the user query, performs a filtered similarity search, and returns de-duplicated chunks with metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA retrieved text chunk with metadata. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve relevant chunks for an agent given a user query: from the knowledge bases the user may use, the chunksaccessmay read.retrieveFromKnowledgeBase(AiKnowledgeBase kb, String query, Access access) Retrieve relevant chunks from a single knowledge base, thoseaccessmay read.
-
Method Details
-
retrieve
Retrieve relevant chunks for an agent given a user query: from the knowledge bases the user may use, the chunksaccessmay read. -
retrieveFromKnowledgeBase
public List<KnowledgeRetriever.RetrievedChunk> retrieveFromKnowledgeBase(AiKnowledgeBase kb, String query, Access access) Retrieve relevant chunks from a single knowledge base, thoseaccessmay read.
-