An internal policy assistant answers the same question correctly on Monday and incorrectly on Friday. The language model has not necessarily changed; a new policy may have failed ingestion, an index might still contain a superseded document or the retrieval query may favor a semantically similar but legally irrelevant passage. Retrieval-augmented generation must be diagnosed as an evidence pipeline, not merely tuned as a prompt.
The pipeline starts when source documents are parsed and versioned, continues through chunking, indexing and access metadata, then uses keyword and vector signals to retrieve candidates at query time. Semantic ranking can improve ordering, but it cannot recover a clause that was omitted during extraction. A grounded answer is trustworthy only when the right evidence entered the index, survived retrieval and can be traced back to an authorized version of its source.
Source-side extraction and query-time retrieval fail in different ways. If a PDF parser disconnects a table heading from its amount, an embedding model cannot recover a relationship that never entered the index. Search indexing and grounding must therefore record source version, parsed layout, chunk boundaries, document IDs and access metadata before ranking candidates. For Microsoft AI-103, the practical decision is whether to repair extraction, source access or retrieval before blaming the generator; later answer generation should not conceal missing evidence behind a fluent paraphrase.
RAG is useful when knowledge is external to the model
RAG is a strong fit for internal policies, product manuals, customer knowledge bases, technical documentation, regulated content and any information that changes frequently. The application retrieves evidence when the question is asked instead of relying on the model to remember information from training.
That does not mean every application needs an index. A one-off task involving a short document may be simpler if the document is supplied directly in the model context. RAG becomes increasingly useful when the content collection is too large to send in full, when many users ask different questions over the same corpus or when new content must become searchable without retraining a model.
It is also different from fine-tuning. Fine-tuning can shape behavior, style or task performance. Retrieval is usually the better mechanism for supplying factual knowledge that must remain current and traceable to source material.
Ingestion quality determines retrieval quality
The retrieval pipeline begins before a query is ever issued. Source documents need to be collected, parsed and transformed into representations that search can use. Poor extraction creates poor retrieval. A PDF with broken reading order, missing headings or duplicated footer text can contaminate the index long before the model sees a prompt.
Chunking is one of the most important design choices. Chunks that are too large can contain several unrelated topics and dilute relevance. Chunks that are too small may lose the context needed to answer a question. The best strategy depends on document structure. Technical manuals, contracts, product catalogs and support tickets may all need different boundaries.
Metadata should be preserved wherever it helps filtering or provenance. Product, region, document type, effective date, security label and source URL can make retrieval more precise and give the application a way to enforce access boundaries before content reaches the model.
Vector search is one retrieval signal, not the entire answer
Vector search represents text as embeddings and retrieves items whose meaning is close to the query even when the wording differs. This is useful for natural-language questions because a user does not need to type the same keywords that appear in the source.
Keyword search remains valuable. Exact product names, error codes, policy identifiers and technical acronyms often benefit from lexical matching. Hybrid retrieval combines vector and text signals so the system can capture both semantic similarity and exact terms. Semantic ranking can then improve ordering among the candidate results.
The architecture should be evaluated on the corpus rather than chosen by slogan. Some datasets are dominated by exact identifiers and do well with lexical search. Others contain varied natural language and benefit strongly from embeddings. Many enterprise systems use both.
Retrieval must return evidence that is useful to generation
A search engine can return a technically relevant chunk that still fails to answer the user’s question. Good RAG design therefore evaluates retrieval separately from final-answer quality. Did the system find the correct document? Did it retrieve the relevant passage? Was the needed evidence ranked high enough to fit inside the generation context?
Query transformation can help when user language does not align with indexed language. The application may rewrite a conversational question into a focused search query or generate several subqueries for different aspects of a complex request. Agentic retrieval can push this further by using a model to decompose a question, search in parallel and return structured grounding data.
More retrieval is not always better. Sending too many weak passages increases token usage and can distract the model. The objective is high-value evidence, not maximum volume.
Grounding prompts should make evidence boundaries explicit
After retrieval, the application has to tell the model how to use the evidence. A useful prompt distinguishes source material from instructions and makes clear whether the model should answer only from retrieved content, acknowledge uncertainty or request more information when evidence is insufficient.
This separation is also a security measure. Retrieved content is untrusted data. A document can contain text that looks like an instruction to the model. The application should not silently grant retrieved text the same authority as system instructions or user intent.
When the use case requires traceability, the application can carry source identifiers through generation so answers can be connected back to documents or passages. Provenance becomes particularly important in policy, compliance and support scenarios where a reader needs to verify the basis of a claim.
Security has to exist at retrieval time, not after generation
If users have different permissions, the index or retrieval layer must prevent unauthorized content from being retrieved in the first place. Asking the model to hide restricted information after it has already been placed in context is a weak control.
Identity, RBAC, document-level metadata and filtered queries can be combined so the retrieval path respects organizational boundaries. Private networking may also be required when search indexes and data sources must not be exposed over public networks.
Authorization belongs in the retrieval contract, not in the final prompt. An ingestion identity may index material from multiple departments, while an end-user query must still return only permitted passages. Test revoked access, cached results and child chunks after a document’s permissions change; a managed identity alone does not solve user-level security trimming.
RAG evaluation needs more than an answer-quality score
A RAG system can fail in several different places. The source data may be missing. The parser may corrupt the document. The index may be stale. The query may retrieve the wrong chunks. The right chunks may be retrieved but ranked too low. The model may ignore the evidence or fabricate beyond it.
Document processing also influences what a model can cite. A table may be legible to a person while ordinary text extraction separates its labels from values; Content Understanding can provide a richer structured representation where appropriate. Once that evidence reaches retrieval, test the complete outcome: does the search result include the correct passage, does the generated answer use it faithfully and can an operator explain a failure from the trace? Those distinctions belong in AI evaluation, not just a single response-quality score.
A strong retrieval evaluation should include a current policy, a superseded policy with overlapping language and a document the requesting identity cannot access. If the retriever returns the outdated paragraph first, fluent generation can still yield a wrong answer; if it returns a restricted document and filters access only after generation, a convincing citation can still conceal a security failure. Log the document ID and revision, chunk position, ACL decision, retrieval rank and the final cited passage. Compare keyword-only, vector-only and hybrid candidate sets on the same question group before claiming that a larger embedding model improves the answer. The useful benchmark separates source freshness, permission correctness, recall of the supporting passage, and whether the model actually follows that passage. A smooth answer to a test question is not sufficient evidence of a secure RAG system.
Separating these stages makes troubleshooting much faster. Retrieval metrics can ask whether the expected evidence appears in the top results. Generation metrics can assess groundedness, relevance and completeness. Operational telemetry can watch index health, ingestion failures, search latency and token cost.
Evaluation sets should include questions whose answers are present, absent, ambiguous and distributed across multiple documents. A system that only sees easy single-document questions during testing is not prepared for real enterprise traffic.
Classic RAG and agentic retrieval serve different complexity levels
A traditional RAG application often follows a predictable sequence: convert the query, retrieve results, build context and call the model. It is simple, testable and appropriate for many knowledge assistants.
Agentic retrieval becomes attractive when a question must be decomposed, multiple sources queried or follow-up searches chosen dynamically. That flexibility can improve difficult research tasks, but it also adds latency, model calls and new failure modes. The architecture should justify those costs with measurable gains.
When an answer is wrong, diagnose the evidence path in order. Did the document enter the corpus, did extraction preserve the relevant section, did the query select that section, and did generation use it faithfully? Each layer has a different owner and a different corrective action. Rewriting the prompt is usually wasted work when the authoritative passage never reached retrieval.
The exam skill is choosing the right retrieval architecture
For AI-103, candidates should be able to reason from requirements. If freshness matters, retrieval is favored over relying on training knowledge. If exact codes matter, hybrid search may outperform pure vectors. If private data is involved, identity and filtering become part of the search design. If a complex question spans sources, agentic retrieval may be justified.
That is a stronger mental model than memorizing a sequence of portal clicks. RAG is a pipeline, and every architectural choice changes the quality, cost, latency and security of the final answer. The best design makes those tradeoffs visible and gives the team enough observability to improve them over time.
Chunking and metadata should reflect the way users ask questions
A technically neat chunking strategy can still perform poorly if it does not match user intent. Product manuals may work well when chunks follow headings and procedures. Policies may need sections that preserve exceptions and definitions. Support knowledge may need issue, cause and resolution kept together so retrieval does not separate a symptom from the fix.
Metadata can narrow the search space before similarity ranking. Product version, geography, effective date or document status can prevent an excellent semantic match from returning the wrong policy generation. This is especially important where retired and current content coexist.
Testing should therefore use real question patterns. Engineers can inspect which chunks are returned, whether filters remove the correct content and whether the model receives enough context to answer without speculation. Retrieval tuning is an empirical process, not a one-time indexing choice.
Indexes are only useful when the organization knows how quickly new or changed information must appear. Some knowledge bases can refresh nightly; operational or policy data may need near-real-time ingestion. The required freshness affects pipeline design, cost and monitoring.
Teams should track ingestion lag and failed updates so a fluent model response is not mistaken for a current answer when the underlying index is stale.