Vishal Tyagi
← Projects
AI / ML·shipped

RAG Document Chatbot

Retrieval-augmented chatbot over PDF docs: embed with a hosted model, retrieve top chunks, answer with an LLM constrained to that context — Flask UI, honest notes on global-index limits.

Date2024-02
Reading TimeN/A
Statusshipped
StackPython, Flask, llama_index+1

What it does

Long PDFs are painful to search by hand. This app embeds a document set, retrieves the closest chunks for a question, and asks an LLM to answer only from that context.

flowchart LR
  A[PDFs] --> B[Ingest and embed]
  B --> C[VectorStoreIndex]
  E[Question] --> F[Retrieve top-k chunks]
  C --> F
  F --> G[LLM with retrieved context]
  G --> H[Chat UI]

Honest limits

  • Index built once at startup over data/ — fine for a fixed demo corpus
  • Multi-user / upload-per-session needs session-scoped indexes or an external vector DB
  • Serverless hosts with short timeouts struggle if you rebuild embeddings on cold start

See the deeper write-up: RAG over PDFs with LlamaIndex.

What it demonstrates

  • End-to-end RAG without hiding the architecture
  • Separating retrieval from generation so models/corpus can swap independently
  • Shipping a working UI, not only a notebook