Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Traditional RAG is usually the better starting point in .NET when one predictable retrieval pass supplies enough evidence. Consider agentic RAG when a system must decide whether to search, refine a query, choose among retrieval tools, or retrieve again after examining results. The extra reasoning is worthwhile only if evaluation shows a meaningful task-quality gain that justifies its added calls, latency, cost, and operational complexity.
What is the difference between agentic RAG and traditional RAG?
These labels do not describe one universally standardized taxonomy. The useful distinction is who controls retrieval and whether the workflow can repeat it:
- Traditional RAG: the application follows a predetermined path—typically retrieving context for a query, then giving that context to a model to generate an answer.
- Agentic RAG: an LLM-driven agent can choose or repeat retrieval actions through tools or function calls, using intermediate results to decide what to do next.
Agentic RAG is not inherently more accurate. It provides more flexible control flow; whether that flexibility improves answers depends on the workload and must be measured.
When should I use each approach?
| Decision factor | Traditional RAG tends to fit when… | Agentic RAG may fit when… |
|---|---|---|
| Query pattern | One query and one retrieval pass usually find the needed evidence. | Questions require decomposition, conditional searches, or follow-up retrieval. |
| Retrieval control | The application should own a deterministic retrieval policy. | The agent needs to select a search tool or decide whether to retrieve again. |
| Latency and cost | The request budget favors fewer model and search calls. | Measured quality gains on harder tasks justify more calls and tokens. |
| Debugging and failure handling | A short, stable pipeline is easier to trace and give a simple fallback. | The team can govern tool choices, intermediate results, loops, and unresolved answers. |
A hybrid is also possible: run ordinary retrieval for common questions and permit bounded agent-directed follow-up when the first result is inadequate or a query class needs it. Treat this as an architecture to test, not a guaranteed Semantic Kernel feature or quality improvement.
#1 Best Overall
How do I add RAG to a Semantic Kernel agent in C#?
Semantic Kernel’s documented TextSearchProvider makes the control-flow difference concrete. Its default BeforeAIInvoke behavior searches before each agent invocation, using the message passed to the agent. With OnDemandFunctionCalling, the agent can choose a search string and invoke search when needed. The documented on-demand configuration requires UseImmutableKernel = true.
The implementation sequence in Microsoft’s example is:
- Configure an embedding generator and a vector store.
- Create a
TextSearchStorewith a collection name and vector dimensions. - Upsert the source text.
- Create the Semantic Kernel agent and an agent thread.
- Add a
TextSearchProviderto the thread’s context providers. - For agent-directed retrieval, set
SearchTimetoTextSearchProviderOptions.RagBehavior.OnDemandFunctionCallingand set the agent’sUseImmutableKernelproperty totrue.
The mode switch looks like this in the documented API shape:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
var options = new TextSearchProviderOptions
{
SearchTime = TextSearchProviderOptions.RagBehavior.OnDemandFunctionCalling,
};
var provider = new TextSearchProvider(textSearch, options: options);
var agent = new ChatCompletionAgent
{
Kernel = kernel,
UseImmutableKernel = true,
};
agentThread.AIContextProviders.Add(provider);
This is an implementation sketch, not a standalone program: it omits initialization, credentials, and surrounding setup. The constructors and supported APIs can change, so compile against the specific Semantic Kernel package version in use. Microsoft’s article, “Adding Retrieval Augmented Generation (RAG) to Semantic Kernel Agents,” dated May 22, 2025, called the functionality experimental and subject to change; that dated warning does not establish the status of every package in 2026. Check the documentation and package release notes for the version you intend to deploy.
What should I know about the .NET RAG samples?
Microsoft’s Semantic Kernel Vector Store RAG Demo is a useful predetermined-retrieval baseline: it ingests PDF text into a vector store and uses retrieval to supplement the model prompt. It lets developers select among Azure AI Search, Azure DocumentDB, Cosmos NoSQL, in-memory storage, Qdrant, Redis, and Weaviate, as well as OpenAI or Azure OpenAI for chat and embeddings. It is a code sample, not a performance comparison or a ranking of those backends.
The sample uses TextSearchStore<string>, an InMemoryVectorStore, and an embedding generator configured for 1536 dimensions. Its default maximum result count, Top, is 3. These are example settings, not universal recommendations: match embedding dimensions and deployment, collection schema, and existing data to the chosen model and store, then tune the result count against the corpus.
Microsoft Learn’s Semantic Kernel vector-store samples note that not all databases natively support Skip for vector search; some connectors may fetch Skip + Top results and skip client-side. They also describe matching a data model to an existing collection schema for interoperability with systems such as LangChain. A vector-store abstraction therefore does not remove every backend-specific schema, paging, or performance difference.
Microsoft’s separate Agent Framework sample uses Qdrant with a custom document schema and lists .NET 10 SDK or later and Azure OpenAI deployments among its prerequisites. It says the backend can be swapped for one with a Microsoft.Extensions.VectorStore implementation. This is an Agent Framework example, not a Semantic Kernel sample, and does not establish that the frameworks’ APIs are interchangeable.
How much latency can extra agent tool calls add?
Microsoft Architecture Center’s 2026 agentic RAG guidance gives illustrative design examples, not a controlled benchmark or service-level guarantee:
| Example request pattern | Illustrative latency in the guidance | Qualification |
|---|---|---|
| Standard RAG: one search and one generation | 2–3 seconds | Design example only; not a prediction for a particular deployment. |
| Agentic RAG: three to five tool calls | 8–15 seconds | Design example only; not a prediction for a particular deployment. |
The guidance explains the mechanism: “Each tool call adds a round trip to the search service plus the time for the model to reason about the results.” Actual end-to-end latency depends on the model, region, search service, concurrency, corpus, and request mix. Measure those conditions in the deployment rather than treating the example ranges as expected results.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What metrics should I use to evaluate agentic RAG in production?
Build a representative, versioned query set with expected relevant documents, acceptable answers, and—where applicable—expected tool choices. Compare both approaches using the same corpus, chunking, embeddings, index, result limit, model, prompt, and test set. Record configuration and version for each run so observed changes can be attributed.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →- Answer and task quality: correctness or task success, grounding in retrieved evidence, and citation or source correctness if the product presents citations.
- Retrieval quality: whether expected evidence appears in the retrieved set and whether irrelevant context crowds it out.
- Tool-selection accuracy: how often the agent chooses the expected retrieval or other tool for a query.
- Retrieval efficiency: tool calls per request, searches per answered query, and retrievals that add no useful evidence.
- End-to-end latency: median and tail latency, separated into model reasoning, tool execution or search, and result processing.
- Cost per request: all model calls and token use, plus search and other service calls; compare incremental cost with measured quality change.
- Reliability and operations: timeouts, failed or malformed tool calls, unresolved responses, loop-limit hits, fallback frequency, and trace completeness.
- Security: validate tool parameters, restrict access to required data and actions, and prevent credentials from being exposed through tool results.
Microsoft Architecture Center specifically recommends tool-selection accuracy, retrieval efficiency, end-to-end latency, and cost per request for agentic RAG evaluation. It also highlights reliability, observability, and security concerns, including poor tool choice, reasoning loops, and failure to reach an answer. Trace each action and result, validate parameters, and apply least privilege. Standard RAG quality measures remain relevant; the guidance does not prescribe one universal dataset or threshold. Set release thresholds according to the consequences of errors and the experience users need.
Best Value
How should I choose a vector store?
The cited Microsoft examples demonstrate multiple configurable backends, not a universally best choice. Compare candidates against the actual corpus and operating requirements, including:
- Relevance for the queries users actually ask.
- Filtering and metadata behavior, schema requirements, and compatibility with existing collections.
- Indexing, updates, paging support, and connector-specific behavior.
- Operational fit, security, deployment geography, and measured latency and cost.
Use the same representative evaluation set and application conditions when comparing stores. A framework’s vector-store interface can simplify integration, but it does not make backend behavior identical.
What is the practical decision rule?
Start with traditional RAG if a single retrieval pass meets the task’s quality needs. Introduce agent-directed retrieval only for query patterns where follow-up search or tool choice is plausibly useful, then compare it with the baseline on the same versioned evaluation set. Keep it only if its measured improvement is worth the added latency, cost, and controls required to operate it safely.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

