Functions
topK
Function: topK()
topK(
options?):RetrievalStrategy
Defined in: src/memory/retrieval/topK.ts:75
Build the top-K strategy.
Parameters
options?
TopKOptions = {}
Returns
Example
import { defineRAG } from 'agentfootprint';
import { topK } from 'agentfootprint/memory';
const docs = defineRAG({
id: 'product-docs',
store, embedder,
retrieval: topK({ k: 5, threshold: 0.55 }),
});