# Capstone — Build a Campus Help-Desk Assistant, Plus AI Engineering Interview Questions

Source: https://skills101.in/learn/ai-engineering/ai-engineering-project-interview-questions — Skills101 free tutorial (AI Engineering — Building Apps with Large Language Models). Updated 2026-11-09.

Put every lesson together in one portfolio project that companies understand immediately.

![A production LLM app: backend with auth, limits and logging; prompt templates, retrieval, tools, cache and rate limits, and evals and monitoring around the LLM API](https://skills101.in/learn-img/ai-engineering/architecture.svg)

## 1. The project: Campus Help-Desk Assistant

**Users:** students and parents. **Goal:** answer questions about rules, fees, exams and attendance correctly, from official documents, and look up a student's own data safely.

| Part | Lesson | What you build |
|---|---|---|
| Documents → chunks → index | 6, 7 | handbook sections with section numbers; hybrid search |
| Grounded answers with citations | 3, 7 | prompt template v1 in a file; "not in the handbook" path |
| Student data via tools | 8 | `get_attendance(roll)` — only for the logged-in student |
| Structured ticket creation | 4 | out-of-scope questions become tickets with a schema |
| Chat with history and streaming | 5 | last 6 turns + summary; streaming in the web UI |
| Guardrails | 11 | redaction, injection screening, no write tools without approval |
| Cost and limits | 10 | cached system prompt, per-user daily limit, usage logs |
| Evaluation | 9 | 50 real questions with expected sections/labels; run on every change |

**Stack suggestion:** Python (FastAPI) or Spring Boot backend, PostgreSQL + pgvector, a simple React or plain HTML front-end, the Claude API, and GitHub Actions running your eval script.

**README must include:** the problem, architecture diagram, how to run it (including with the free [local stand-in API](https://skills101.in/tutorial-files/llm_stub.py)), evaluation results (e.g. "retrieval hit rate @ 3: 47/50"), known limits, and cost per 1,000 questions.

## 2. A tiny but complete core

The heart of the assistant — routing a question to the right path — fits in a few lines and is easy to test:

```python
def route(question: str, logged_in_roll: int | None) -> str:
    q = question.lower()
    if any(w in q for w in ("my attendance", "my marks", "my result")):
        return "tool:get_attendance" if logged_in_roll else "ask_login"
    if any(w in q for w in ("fee", "attendance", "hall ticket", "exam", "re-evaluation")):
        return "rag:handbook"
    return "ticket:office"

cases = [
    ("What is my attendance in DSA?", 104),
    ("What is my attendance in DSA?", None),
    ("What is the late fee?", None),
    ("Can the canteen open on Sunday?", 104),
]
for question, roll in cases:
    print(f"{question:32s} roll={roll!s:5s} -> {route(question, roll)}")
```

```text
What is my attendance in DSA?    roll=104   -> tool:get_attendance
What is my attendance in DSA?    roll=None  -> ask_login
What is the late fee?            roll=None  -> rag:handbook
Can the canteen open on Sunday?  roll=104   -> ticket:office
```

A rule-based router like this is cheap and predictable; later you can replace it with a model call (classification with structured output) — and your eval set tells you whether that's actually better.

## 3. Interview questions — short answers

1. **What is an LLM?** A neural network trained to predict the next token; instruction-tuned to follow requests.
2. **What is a token / context window?** Word pieces; the maximum input+output the model can handle in one call.
3. **Why do LLMs hallucinate? How do you reduce it?** They generate plausible text, not looked-up facts. Ground with RAG, use tools, allow "I don't know", cite sources, evaluate.
4. **Explain RAG.** Chunk and index documents, retrieve relevant chunks for each question, put them in the prompt, answer with citations.
5. **Chunk size trade-off?** Too big: unfocused and costly; too small: loses context. Use sections/paragraphs with slight overlap; measure.
6. **What are embeddings?** Vectors representing meaning; similar texts are close (cosine similarity).
7. **Vector database?** Stores vectors with metadata and does fast nearest-neighbour search (pgvector, Chroma…).
8. **Keyword vs semantic search?** Exact words (good for codes/names) vs meaning (good for paraphrases); hybrid combines both.
9. **What is tool use / function calling?** The model requests a function with arguments; your code runs it and returns the result.
10. **Agent vs workflow?** The model chooses the steps vs your code fixes the steps; prefer workflows unless steps can't be known.
11. **How do you get reliable JSON?** Structured outputs with a JSON schema / Pydantic, plus your own validation.
12. **How do you evaluate an LLM app?** A versioned test set of real cases; exact/rule/reference scoring, LLM-as-judge validated against humans; compare versions.
13. **What is prompt injection? Defences?** Untrusted text that contains instructions. Tag data, least privilege, output validation, human approval.
14. **How do you cut cost?** Prompt caching, fewer input tokens, shorter outputs, right model per task, batching.
15. **How do you reduce latency?** Streaming, shorter prompts, caching, parallel calls, lighter models for simple tasks.
16. **Fine-tuning vs RAG vs prompting?** Prompting first; RAG for knowledge; fine-tuning (where available) for style or narrow formats — rarely the first step.
17. **What would you log?** Prompt version, model, tokens, cost, latency, stop reason, sources, tool calls, feedback — minimal personal data.
18. **How do you handle personal data?** Minimise and redact, follow the DPDP Act and provider policies, limit retention.
19. **Why keep humans in the loop?** High-stakes or irreversible decisions; accountability; catching model errors.
20. **Describe your project.** Problem → architecture → evals with numbers → a failure you found and fixed → cost and limits.

## Common mistakes

- A demo with no evaluation numbers.
- Keys in the repo; no rate limits on a public demo.
- Claiming the model "understands" or "never makes mistakes".

## Quick recap

- Capstone: RAG + tools + structured tickets + chat + guardrails + cost controls + evals.
- Start rule-based where you can; prove improvements with your eval set.
- Interviews reward numbers, trade-offs and honest limits.


Practice quiz and free certificate: https://skills101.in/learn/ai-engineering/ai-engineering-project-interview-questions