A layered RAG app for asking one hard book better questions

DDIA-RAG is a RAG app for asking questions about the book Designing Data-Intensive s in a conversational way. It does more than return the closest matching text. Each text chunk is stored with its chapter and section details, so the app knows where the passage sits inside the book.

Broad questions can search across the whole book, while very specific questions can be sent directly to the most relevant section. Focused questions get a step-by-step explanation instead of a generic answer. The stack includes Next.js, , Neon Postgres with pgvector, Drizzle ORM, and Together AI.

is used for parsing, Nomic for , and Llama 3.1 70B for reasoning. A live demo and are available.

Key points

  • Text chunks are linked to chapter and section metadata.
  • Broad questions search the whole book, while narrow questions are routed to the right section.
  • Different models handle parsing, , and reasoning.
  • The app uses Next.js, , Neon Postgres, pgvector, Drizzle ORM, and Together AI.
  • The demo and are public.
Read original