Skip to content
Forward Deployed

Forward Deployed
Lessons and contents
Final Week ReviewLesson 6 of 22
22 lessons
Interview

RAG and Enterprise Data

Source
From the Forward Deployed library
By
Sourav Banerjee
Last updated
4 Nov 2026

Report an issue

Interview Review

1. What the Interviewer Is Testing

  • Can you distinguish enterprise knowledge from live transactional data?
  • Can you explain ingestion and retrieval as separate flows?
  • Can you diagnose missing evidence, noisy retrieval, and unsupported answers?
  • Can you enforce permissions before information reaches the model?

2. Core Mental Model

  • Retrieval-augmented generation (RAG) supplies relevant evidence for the model’s answer.
Diagram: Sources; Parse; Chunk; Embed and index with permissions, metadata, and versions; Identity and question; Authorised search; Retrieve candidates; Rerank if useful; Select context; Supported answer; Cite evidenceDiagram: Sources; Parse; Chunk; Embed and index with permissions, metadata, and versions; Identity and question; Authorised search; Retrieve candidates; Rerank if useful; Select context; Supported answer; Cite evidence

Three questions guide debugging:

Diagram: Evidence exists in the index?; Retrieved and retained?; Used correctly in the answer?Diagram: Evidence exists in the index?; Retrieved and retained?; Used correctly in the answer?

3. Essential Concepts

1. Data Choice: Knowledge vs Live State

  • Use RAG for maintained policies, manuals, and enterprise reference material.
  • Query current transactional state through approved APIs or tools when freshness requires it.

“Does the answer depend on reference knowledge or current state in an enterprise system?”

Diagram: What is the refund policy?; Policy retrieval; Has refund 123 completed?; Refund API or toolDiagram: What is the refund policy?; Policy retrieval; Has refund 123 completed?; Refund API or tool
  • Some requests need both: retrieve eligibility policy and read the current order before recommending a refund.

2. Parse and Maintain Sources: Make Evidence Usable

  • Extract content faithfully, including headings, tables, and scanned text where needed.
  • Carry source identifiers, versions, timestamps, and access metadata into the index.

“Before tuning retrieval, I’d check whether the relevant content was parsed and indexed correctly.”

Diagram: Policy source; Parsed content; Indexed evidence; Source update, deletion, or permission change; Refresh indexDiagram: Policy source; Parsed content; Indexed evidence; Source update, deletion, or permission change; Refresh index
  • An answer cannot reliably use evidence that was omitted, corrupted, or left outdated during ingestion.

3. Chunking: Keep Enough Meaning Together

  • Split content into searchable units while preserving context.
  • Prefer meaningful boundaries such as sections when practical.

“I’d choose chunking based on document structure and the questions users ask, then evaluate the result.”

Diagram: Chunk too small; Conditions or references lost; Chunk too large; Noise and context cost; Useful chunk; Rule and relevant exceptionsDiagram: Chunk too small; Conditions or references lost; Chunk too large; Noise and context cost; Useful chunk; Rule and relevant exceptions
  • No chunk size is universally correct.
  • Preserve the link to the source and surrounding content.

4. Embeddings and Search: Match Meaning and Exact Terms

  • Embeddings represent content for similarity search.
  • Vector search helps with related meaning; keyword search helps with exact identifiers and terms.
  • Hybrid search combines signals from both.

“For policy language and exact product codes, I’d compare vector, keyword, and hybrid retrieval on representative questions.”

Diagram: Return damaged goods; Meaning-based matching; Policy SKU-781; Exact-term matching; Both signals needed; Evaluate hybrid searchDiagram: Return damaged goods; Meaning-based matching; Policy SKU-781; Exact-term matching; Both signals needed; Evaluate hybrid search
  • Embedding similarity is a relevance signal, not proof that a statement is correct.

5. Metadata and Permissions: Narrow the Search Safely

  • Use trusted identity, tenant, and access scope to constrain retrieval.
  • Metadata can also select the correct region, product, language, or policy version.

“Only authorised evidence should enter context, and the policy version must match the customer's case.”

Diagram: Trusted identity; Allowed scope; Search eligible content; Authorised contextDiagram: Trusted identity; Allowed scope; Search eligible content; Authorised context
  • Enforce access before content reaches the model.
  • Handle permission changes and tenant-scoped caches; retrieved document instructions do not become authority to bypass controls.

6. Reranking and Context Selection: Keep the Best Evidence

  • Reranking reorders retrieved candidates using an additional relevance assessment.
  • Context selection then chooses what fits the answer's evidence needs and model budget.

“If relevant evidence is buried among candidates, reranking may help; it cannot recover a document that was never retrieved.”

Diagram: Candidate set; Optional rerank; Select evidence; ContextDiagram: Candidate set; Optional rerank; Select evidence; Context
  • Deduplicate and preserve important exceptions.
  • More context can add noise, latency, and cost.

7. Recall vs Precision: Find Enough Without Too Much Noise

  • Recall: how much relevant evidence did we find?
  • Precision: how much of the retrieved evidence is relevant?
  • Define the evidence labels and retrieval cutoff in evaluation.

“If we miss the answer document, I’d investigate recall; if we retrieve lots of irrelevant material, I’d inspect precision and ranking.”

Diagram: Missing relevant evidence; Recall concern; Many irrelevant results; Precision concernDiagram: Missing relevant evidence; Recall concern; Many irrelevant results; Precision concern
  • Evaluate representative questions, including exact terms, ambiguous requests, restricted documents, and missing-answer cases.

8. Groundedness: Support the Answer With Evidence

  • Require the answer's claims to be supported by the selected context.
  • Cite actual supporting sources and acknowledge missing or conflicting evidence.

“I’d check whether each important claim is supported; a citation alone doesn’t show that.”

Diagram: Enough relevant evidence; Supported answer with source; Insufficient evidence; Clarify, explain limit, or escalateDiagram: Enough relevant evidence; Supported answer with source; Insufficient evidence; Clarify, explain limit, or escalate
  • Groundedness is not the same as truth: a faithfully quoted outdated policy can still be wrong for today's case.

9. Diagnose by Stage: Do Not Blame the Model First

  • Inspect the evidence path before changing models or prompts.
Diagram: Check source exists and is current; Check parsing and indexing; Check access and version filters; Check retrieval and ranking; Check final context; Check answer uses evidence correctlyDiagram: Check source exists and is current; Check parsing and indexing; Check access and version filters; Check retrieval and ranking; Check final context; Check answer uses evidence correctly

“I’d trace the question from source to final context so we can locate whether this is a data, retrieval, or generation problem.”

4. Requirement → Component Reasoning

Requirement Component / pattern Why Main trade-off
Answer from maintained documents Ingestion + searchable index Make knowledge available for retrieval Refresh and parsing effort
Match varied wording Embeddings + vector search Find related meanings Exact terms may need another signal
Find exact IDs and names Keyword or hybrid search Preserve lexical matching Ranking configuration
Respect tenant/user access Trusted access filtering/enforcement Keep unauthorised evidence out Identity and permission integration
Use the right policy version Metadata/version selection Match context to case Correct metadata maintenance
Reduce noisy candidates Reranking + context selection Improve evidence ordering Extra latency/cost
Check current refund status Live API/tool Read current system state Dependency failure
Explain an answer's basis Supporting citations + evidence records Make claims inspectable Source tracking and retention

Support Example

Diagram: Refund question; Identify user and authorised order; Retrieve policy; Supported eligibility recommendation; Read live order; Policy decides; Executor acts if allowedDiagram: Refund question; Identify user and authorised order; Retrieve policy; Supported eligibility recommendation; Read live order; Policy decides; Executor acts if allowed
  • RAG supplies evidence; it does not authorise or execute the refund.

5. Important Distinctions and Gotchas

  1. Ingestion vs query: prepare searchable evidence vs retrieve it for a request. Query tuning cannot fix missing source content.
  2. Recall vs precision: retrieve enough relevant evidence vs avoid irrelevant evidence. Increasing the result count may help one and hurt the other.
  3. Retrieval vs reranking: find candidates vs reorder those candidates. Reranking cannot rescue absent evidence.
  4. Groundedness vs correctness: supported by selected evidence vs correct for the actual case. Verify source freshness and applicability.
  5. Citation vs support: a cited document may not support the claim. Check the actual evidence and enforce permissions before context construction.

6. Trigger → Concept Table

Hear… Think… Investigate…
“Correct document never appears” Recall / ingestion Parsing, indexing, query, filters, search
“Many unrelated chunks” Precision / ranking Search signals, chunking, reranking
“Exact order/product code” Keyword signal Exact matching and hybrid retrieval
“Different employee permissions” Access enforcement Trusted scope and permission changes
“Old policy answer” Freshness/version Update pipeline and metadata
“Right evidence, wrong answer” Generation / context Selected context and claim support
“Current refund status” Live tool System-of-record access

7. Interview Phrases

“I’d separate ingestion from the query path so we can reason about freshness and retrieval independently.”

“I’d compare search strategies on real questions, including exact identifiers and paraphrases.”

“Permissions must be enforced before restricted information enters the model context.”

“I’d inspect the final context before deciding the model is the problem.”

“If the evidence is insufficient, the system should acknowledge that rather than invent an answer.”

8. Practice Questions

  1. A correct policy document is never retrieved. Walk through your diagnosis before changing the model.
  2. The right document is retrieved with many irrelevant chunks. Which stage and metrics would you inspect?
  3. A policy answer is well cited but uses last year's rules. What failed, and what requirement would prevent recurrence?
  4. Two employees have different access rights. How do ingestion metadata, query identity, and cache scope preserve those boundaries?
  5. Design the evidence paths for a question asking both refund eligibility and current refund status. Where does RAG stop and the live tool begin?

Sources (checked 27 Sep 2026)

Rate your confidence and keep notes on the module page.