AI EngineeringInterview preparation
Intermediate·Concept·2 min read

Project 3 — PDF RAG assistant

Practice this question

Requirements

Upload approved PDFs, track ingestion, ask questions, return source references, and abstain when evidence is missing.

Architecture

Upload → parse/chunk/embed → index; question → retrieve → model → validated cited answer. Parsing preserves source coordinates.

Technologies

Node API, queue, PDF parser or Python worker, embedding API/model, one vector store, Zod/Pydantic.

Database design

Documents with version/hash/status; chunks with source text/page/model metadata; ingestion jobs and conversation ownership.

API design

POST /documents, GET /jobs/:id, POST /questions; response includes answerability and authorized source IDs.

AI design

Section-aware chunking, matching query/document embeddings, bounded top-k context, clear abstention instructions.

Security

File size/type limits, isolated parsing, tenant filters, secure original-file storage, and source-link authorization.

Evaluation

Known clause questions, scans, tables, missing answers, outdated versions, and cross-tenant documents. Measure retrieval and answer quality separately.

Observability

Stage timings, parse failures, index readiness, retrieved IDs, answer support, tokens, and cost.

Deployment

Queue workers independently; provide a staging corpus; verify object storage and database backups.

Interview questions

  • “What if retrieval fails?” Answer: distinguish no evidence from system failure and avoid inventing an answer.
  • “How do citations work?” Answer: map model references to real retrieved source IDs.

Acceptance: Every material answer claim has applicable evidence; missing evidence leads to a clear fallback.

Adapted from 13_AI.MD · “Project 3 — PDF RAG assistant”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.