Verified answer synthesized from uploaded PDF context with strict page-level source attribution and automatic model fallback.
RAG Document Q&A — AI Assistant with Cited Answers
Page-level cited document Q&A with semantic search, similarity thresholding, and $0 infrastructure cost.
Built and deployed a document Q&A app that returns page-level cited answers and declines out-of-scope questions through semantic search with a similarity threshold, using pgvector, Gemini embeddings, and Groq at $0 infrastructure cost.
Standard LLM chat interfaces hallucinate answers when queried against private PDFs and fail to tell users which exact page a claim came from or when a question falls outside the uploaded documents.
Training teams, researchers, analysts, and internal operations staff who need verifiable, page-cited answers from technical manuals and PDFs.
Next.js Route Handlers ingest PDFs into page-tagged text chunks, generate vector embeddings via Gemini, store vectors in Neon PostgreSQL (pgvector), and retrieve top-k chunks above a cosine similarity threshold before synthesizing cited responses via Groq.
- —Built and deployed a document Q&A app that returns page-level cited answers and declines out-of-scope questions, through semantic search with a similarity threshold, using pgvector, Gemini embeddings, and Groq at $0 infrastructure cost
- —Kept the app reliable within free-tier API limits through resumable batch embedding, automatic model fallback, and Postgres-backed rate limiting (3 questions per minute per visitor), using Next.js route handlers and Neon
- —Shipped with 30+ unit tests, an evaluation harness that scores answer correctness, citation accuracy, and refusals, and CI on GitHub Actions (lint, type-check, tests, build, Docker image)
