A gaming knowledge base can contain hundreds of PDF pages of rules, patch notes, quest logic, and support policy. To summarize those pages without burying the answer, use semantic search to select evidence before the final prompt.

Short answer: embed the PDF pages, use semantic search to retrieve a wider candidate set, rerank those candidates for the player's question, and send only the top passages to the final summary model. This is the practical Node.js RAG path when answer quality matters but every extra passage adds latency.

The important choice is not "RAG or no RAG." It is where to spend the evidence budget. Retrieval buys coverage. Reranking buys precision. The final model should write from a small, labeled evidence pack rather than rediscover relevance inside a whole PDF.

Where a PDF summary loses the right evidence

Treat each stage as a separate contract. First, extract text from the PDF and preserve page numbers. Second, split long pages into chunks without throwing away that page metadata. Third, create embeddings once and store them beside the chunks. At question time, semantic search returns plausible passages; rerank reorders them against the exact question; the final summary receives only the winners.