RetrievalSettings
constructor(storage: SearchStorage<TextDocument, SimilaritySearchRequest>, queryExtractor: QueryExtractor = LastUserMessageQueryExtractor(), searchStrategy: SearchStrategy = SimilaritySearchStrategy(), promptAugmenter: PromptAugmenter = SystemPromptAugmenter(), enableAutomaticRetrieval: Boolean = true, namespace: String? = null)(source)
Parameters
storage
The retrieval storage to search for relevant memory records.
queryExtractor
The extractor that defines how to derive the search query from the prompt. Defaults to LastUserMessageQueryExtractor, which uses the last user message content.
searchStrategy
The strategy that defines how to search the retrieval store.
promptAugmenter
The augmenter that defines how retrieved context is inserted into the prompt.
enableAutomaticRetrieval
When true (default), retrieval and prompt augmentation happen automatically before each LLM call. When false, the storage and strategy are still accessible for manual use inside graph strategy nodes via ai.koog.agents.longtermmemory.feature.withLongTermMemory.
namespace
Namespace (table/collection name) for a request.