MODULE 09 · LESSON 9.5
Search and answer with evidence
Answer policy questions with retrieved evidence and explicit uncertainty.
Lesson 52 of 86 · FabrCore 2.0
Overview
IKnowledgeSearchService retrieves scoped evidence for an agent or plugin. Retrieval supports an answer; it does not prove the model's conclusion. The UI should expose source references so the user can inspect the evidence behind a recommendation.
Retrieval returns support, not a final conclusion
IKnowledgeSearchService searches within a trusted scope and returns relevant evidence. The agent uses those results to compose an answer. It should distinguish the source's statement from its own interpretation and expose references the user can inspect. A search score alone does not establish that a passage answers the user's exact question.
Missing evidence is a valid result
A policy question can be unsupported, ambiguous or outside the caller's scope. In those cases the assistant should explain what it could not establish and request missing context rather than invent a rule. Keep business status queries tied to the authoritative request store; policy retrieval does not tell you whether a particular printer was actually restarted.
Build an evidence-backed answer
- Query the intended scope through the service or configured plugin and include bounded excerpts/citations in the model context.
- Ask a policy question with known evidence, then one the corpus cannot answer. Require the assistant to distinguish evidence from inference.
- Inspect graph/vector results, metadata and caches. Re-evaluate after changing extraction instructions, model aliases or ingestion tuning.
using FabrCore.Services.GraphRag;
using FabrCore.Services.GraphRag.Services;
using FabrCore.Services.GraphRag.Administration;
using FabrCore.Services.GraphRag.Administration.Models;
using FabrCore.Services.GraphRag.Audit;
using FabrCore.Services.GraphRag.Models;
var request = new KnowledgeIngestionRequest(
FileName: fileName,
ScopeKey: trustedScope,
MarkdownContent: markdown,
ExtractionInstructions: instructions)
{
ForceReingestion = false
};
var result = await ingestion.IngestDocumentAsync(request, ct);
Compare supported and unsupported questions
- Ask “How many failed restarts permit escalation?” against the small policy from lesson 9.4. Expect an answer citing the actual rule and a source reference that opens the matching evidence.
- Ask about a policy absent from that document. Expect an explicit lack of support, not a confident new rule.
- Repeat the supported question under a principal/scope without access. The restricted evidence should not appear in the retrieved context or citations.
The test evaluates grounded answering and scope enforcement together. Successful retrieval is necessary but does not by itself prove the model interpreted the evidence correctly.
If the result is different
Do not treat a semantically similar result as an exact policy match. Confirm scope, source freshness and source spans before tuning the prompt.
Go deeper
Explore the related documentation.