On this page
What you'll build and why it impresses
Most RAGRetrieval-augmented generation. Fetching relevant documents and putting them in the model's context before it answers. Read the full explanation portfolio projects stop at "it answers questions from my documents". That proves you can wire an API, not that you can make a retrieval system trustworthy.
This project asks for the harder artifact: an assistant over a real document set, with separate evals for retrieval and for the answer, a failure analysis that shows which part is responsible when it is wrong, and a rollout decision. That is what an AI product interview probes: can you tell the difference between a retrieval problem and a generation problem, and do you know what to measure before changing either?
It is also a strong FDEForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation project. Customer RAG systems fail on messy documents, permissions and unanswerable questions, and the person who can diagnose those failures is more useful than the person who can only build the happy path.
The brief
Product. A question-answering assistant over a set of documents a real team would use. Good choices: a public help centre, a product's documentation, a set of policies, or a small corpus of research papers. Avoid a single tidy document; the interesting failures come from many overlapping sources.
Users. Pick one audience and one job. For example: a new employee asking about internal policy, a support agent checking a troubleshooting step, or a customer asking about returns. Write the job to be done in one sentence.
Requirements.
- Answers cite the passages they used.
- The assistant refuses when the documents do not contain the answer.
- Retrieval and answer quality are measured separately.
- Every change is compared against a baseline on the same eval set.
Constraints. One weekend for the build, one for evaluation and write-up. Use an off-the-shelf model and a simple vector store; do not spend the time on infrastructure.
Out of scope. Authentication, a polished UI, real customer data, and fine-tuning. A command-line interface or a minimal web page is enough.
Steps
Define the task and the corpus. Choose 20–50 documents. Write 30 real questions, including:
- questions answered by one passage;
- questions that need two passages combined;
- questions with a near-miss passage that looks relevant but is not;
- questions the corpus cannot answer;
- questions where the correct answer changed between document versions.
Build the baseline. Chunk the documents, embed them, retrieve the top few passages, and generate an answer with citations. Keep the chunking strategy and prompt in version control. Record the exact configuration.
Evaluate retrieval first. For each question, label which passages are relevant. Measure recall at k (did the right passage appear?) and, if you have the labels, precision. Read the misses: is the chunk too small, too large, missing metadata, or semantically mismatched? See measure retrieval quality and how to chunk documents.
Evaluate the answer separately. With the same retrieved passages, grade:
- Groundedness: is every claim supported by the cited passage?
- Answer relevance: does it answer the question asked?
- Refusal correctness: does it refuse when the answer is absent, and answer when it is present?
- Citation correctness: do the citations point to the passage that supports the claim?
Use code checks for citation presence and format, a judge for groundedness, and your own labels for a sample. Read measure groundedness.
Run the failure analysis. For every wrong answer, assign the cause: retrieval miss, chunk boundary, generation error, citation error, or bad question. This is the most valuable table in the project. It tells you what to fix and prevents you from "fixing" generation when retrieval is the problem.
Make two improvements. Examples: hybrid search, reranking, better chunking with metadata, query rewriting, a stricter refusal prompt, or a citation-required answer format. Change one thing at a time and rerun the same eval set.
Write the decision memo and demo. Report the baseline, the two changes, the deltas, the remaining failures and the cost per query. End with a recommendation: ship to a small group, keep iterating, or stop because the corpus cannot support the use case.
Acceptance criteria
- A working assistant over 20+ documents, with citations and refusal behaviour.
- 30+ questions covering answerable, multi-passage, near-miss and unanswerable cases.
- A labelled retrieval set with recall at k reported.
- Separate answer metrics for groundedness, relevance, refusal and citation correctness.
- A failure table that assigns each error to retrieval, generation or the question.
- Two controlled improvements measured on the same set.
- A one-page memo with the launch recommendation, cost per query and limitations.
- A 60-second demo that shows a failure and the fix, not just the happy path.
How to present it
The 60-second demo: ask a question the baseline gets wrong. Show the retrieved passages, then the answer, then the failure table that explains why. Show the improvement and the new number. Close with the decision.
The write-up: lead with the split between retrieval and answer quality. Most readers expect a RAG demo; the differentiator is that you can say which half failed and what you changed.
For an FDE interview: add the customer context: whose documents, what permissions, what happens when the documents change, and how you would hand it over.
What interviewers will probe
- How do you know retrieval is good enough? Recall at k on labelled questions, plus a read of the misses. Link to measure retrieval quality.
- How do you know the answer is grounded? A validated judge plus citation checks, with human labels on a sample. See measure groundedness.
- What do you do when the answer is not in the documents? Refuse, explain what is missing, and offer a route to a human. Test it with unanswerable questions.
- Why not just use a longer context window? Cost, latency, lost-in-the-middle effects, and the need to cite. See RAG or long context.
- What changes when the documents update? Re-index, version the corpus, and rerun the eval set. A stale index is a quality regression.
- What would you monitor in production? Retrieval misses, refusal rate, citation failures, user corrections and cost per query.
Variations
Easier: one document set, 20 questions, retrieval recall only, no judge. Still separate retrieval from answer quality.
Harder: add permissions so different users see different passages; add a multilingual slice; test a document update mid-stream; compare two chunking strategies with confidence intervals; or add a re-ranker and measure the cost-quality trade-off.
Team version: one person owns retrieval, another owns generation and judging, a third owns the failure analysis and memo. Present the disagreement between retrieval and generation as the finding.