I built a search and Q&A system over the entire A Song of Ice and Fire series, all 10 books, ~66,000 paragraphs. The project is called Uma Busca de Gelo e Fogo, and it's live at buscadegeloefogo.vercel.app.

The system has two modes: a classic full-text search engine and a RAG-powered chat that lets you ask questions in natural language and get answers grounded in the actual text. This article is about the second part, the retrieval pipeline, the decisions behind it, and the embarrassing amount of time I spent fixing things that I thought were obviously correct from the start.

The System at a Glance

Three independent microservices:

Component