A local RAG chatbot: upload PDF documents, then ask questions about them and get answers grounded in the uploaded text instead of the model's guesses. An Express server does ingestion and retrieval, and PostgreSQL with the pgvector extension, started from Docker Compose, is the vector store.
What I built
PDF ingestion: text extracted, split into 500-character chunks with a 50-character overlap, embedded with Gemini and stored in PostgreSQL
Vector search with pgvector: cosine distance over 3072-dimension embeddings, top five chunks per question
Grounded answers from Groq that decline when the documents don't cover the question
Streamed replies, questions scoped to one document, and sources with a similarity score in the UI
A REST API to ingest, list and delete documents and to chat