XNews

Building a 'Grounded' Document Q&A Agent with LlamaIndex and Ollama

Building a 'Grounded' Document Q&A Agent with LlamaIndex and Ollama

A technical guide explains how to build a document Q&A agent that provides verifiable answers. The solution uses LlamaParse for parsing (preserving page metadata), Ollama for local embedding and inference with the qwen3:4b-instruct model, and LlamaIndex's CitationQueryEngine to force answers to include inline citations like [1] and [2]. The post argues that parsing quality is the primary ceiling for answer quality, and that a verifiable answer is not necessarily a correct one.

Source posts