A useful AI engineering portfolio shows how you handle inputs, evaluate outputs, and operate a system when a dependency fails. One project can demonstrate all three. Build a document question-answering app on a small collection of public or self-authored documents and make the evidence visible in the answer.
Stage 1. Learn enough Python to work with data
Read a folder of text or JSON files, assign stable IDs, and add a small command-line tool that can load and search them. Use the Python tutorial as a reference. Write tests for empty files, duplicate IDs and malformed input. The goal is a repeatable ingestion process that another developer can run from the README.
Stage 2. Establish a retrieval baseline
Start with keyword search. Create 15 to 20 evaluation questions, mark which document section contains the expected answer, and include some unanswerable questions. Save the results of the first baseline. Then try embeddings and compare the proportion of questions where the top three results contain the expected section. The Sentence Transformers semantic search guide shows how dense retrieval works.
Track failure cases by cause. Missing the right section can mean the source document was never ingested, chunks lost their heading, or the search ranked weaker matches first. Fixing the right layer is easier when the stages have separate outputs.
Stage 3. Evaluate the generated answers
Pass the retrieved passages to a model with stable reference IDs. Ask it to answer only from those passages and identify the evidence. Score each result on factual correctness, whether the citation supports it, and whether it acknowledges insufficient evidence. Review the answers yourself before trying to automate grading. The Hugging Face LLM Course provides background on model behavior.
For a concrete failure case, use two policy documents that give different answers because they apply to different dates. Check whether the answer names the date and cites the correct version. Keep the test after you fix the bug.
Stage 4. Deploy and document failure behavior
Put the demo behind a simple UI. Include a timeout, a clear message when the model is unavailable, and a limit on request size. Log aggregate timing and errors without saving sensitive prompts. Publish the supported inputs and list cases where readers should avoid relying on the output.
What to put in the portfolio
- A runnable baseline, a small evaluation set, and screenshots or sample outputs.
- A table with the version, retrieval success, citation accuracy, failure count and latency for each experiment.
- One failure you fixed and one design tradeoff you chose, with links to the relevant commits.
- A clear distinction between what the demo measures and what a production launch would still require.
If you are still learning to build APIs, start with the beginner web development project and add retrieval once the basics are working.



