Class RagEngineKnowledgeRetriever
Serves the data sources of a RagEngine (or a DocumentRag) as a knowledge source: each matching partition becomes a passage, with its document name, page and source link when the engine recorded them.
public sealed class RagEngineKnowledgeRetriever : IKnowledgeRetriever
- Inheritance
-
RagEngineKnowledgeRetriever
- Implements
- Inherited Members
Examples
var retriever = new RagEngineKnowledgeRetriever(documentRag);
var agent = Agent.CreateBuilder(model)
.WithKnowledge(new AgentKnowledge(retriever))
.Build();
Constructors
- RagEngineKnowledgeRetriever(RagEngine, float)
Creates a retriever over
engine.
Properties
- DefaultMinScore
Gets the relevance floor used when a query states none.
- Engine
Gets the engine searched.
Methods
- RetrieveAsync(KnowledgeQuery, CancellationToken)
Returns the passages that best match
query, best first.