Vo Xuan Nhi Tran
← ALL PROJECTS

RAG Document Assistant

Multilingual question answering over PDFs

Aug 2026 – Oct 2026Live ↗Code ↗
  • Python
  • FastAPI
  • React
  • pgvector
  • AWS EC2
  • Nginx
  • GitHub Actions
SIMULATION · TF-IDF IN YOUR BROWSER · 8 CHUNKSINTERACTIVE
2
  1. chunk 010.075

    Members can borrow up to 12 books at a time. Loans last three weeks and can be renewed twice online.

  2. chunk 020.067

    Late items are charged 50 cents per day, up to a maximum of 10 dollars per item. Fees must be paid before borrowing again.

  3. chunk 030.000

    The library is open 8am to 9pm on weekdays. On weekends it opens 10am to 5pm, and it is closed on public holidays.

  4. chunk 040.000

    Printing costs 10 cents per page in black and white and 40 cents per page in colour. Printers accept student cards.

  5. chunk 050.000

    Group study rooms seat up to six people and can be booked for two hours per day through the website.

  6. chunk 060.089

    Lost or damaged books are charged at replacement cost plus a 15 dollar processing fee.

  7. chunk 070.000

    Quiet zones are on level 3. Phone calls and group discussion are not allowed there.

  8. chunk 080.070

    Laptops can be borrowed from the front desk for four hours with a student card. Late laptops are charged 5 dollars per hour.

Grounded answer

Lost or damaged books are charged at replacement cost plus a 15 dollar processing fee. [6] Members can borrow up to 12 books at a time. [1]

Sources
  • riverside_library_handbook.pdf · chunk 06 · cos 0.089
  • riverside_library_handbook.pdf · chunk 01 · cos 0.075
FIG. 2  Ask a question. The top chunks light up and the answer cites them. A simulation: TF-IDF on a made-up handbook, in your browser. The real app uses embeddings, pgvector and Gemini.

Problem

I wanted to understand how retrieval grounds an LLM's answers, so I built the whole pipeline myself: PDF ingestion, embeddings in pgvector, and answers grounded in the uploaded text, in English and Vietnamese.

What I built

  • A multilingual (English/Vietnamese) RAG backend that uses embeddings and cosine similarity in pgvector to ground Gemini's answers in uploaded PDFs.
  • pytest suite running in GitHub Actions CI.
  • Deployed on AWS EC2 behind Nginx.