Package com.tnsai.rag
Interface ChatKnowledgeContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The DIRECT part of an agent's chat knowledge, given fresh on every chat
turn. SEQUENTIAL entries are ignored by chat; see
KnowledgeDeclarations.chatScope(List).
Prepared once at agent initialization by
RetrievalSpi.prepareChatKnowledge(java.lang.Object, java.util.List<com.tnsai.rag.KnowledgeEntry>, com.tnsai.llm.LLMClient). SEARCH knowledge is not part of
it: SEARCH runs through the agent's ChatKnowledgeBinding, and its
evidence goes where the first SEARCH entry was declared, so every block
reaches the model in declaration order.
- Since:
- 0.18.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordOne turn's blocks, split at the first SEARCH entry. -
Method Summary
Modifier and TypeMethodDescriptionnext(ChatRetrievalContext context) Gives this turn's blocks: each DIRECT source whole.
-
Method Details
-
next
Gives this turn's blocks: each DIRECT source whole.- Parameters:
context- the turn's retrieval context; its document filters apply to DIRECT sources and its cancellation token to loading- Returns:
- the blocks around the SEARCH evidence, in declaration order
-