Sparse database content is hurting a RAG agent’s answers
A RAG setup uses Ollama and Qwen2.5 to answer questions from a risk register . The goal is to return useful details about risks, incidents, and mitigations through both simple and complex SQL queries.
The database is very sparse, with many empty tables and empty columns, so the agent often receives results with little useful context. That leads to weak answers.
was added by splitting every table into row-level chunks and creating , but more advanced methods such as and RRF are not in place yet. The practical need is to ignore missing and null values and retrieve only the database content that can actually support a good answer.
Key points
- The system uses Ollama and Qwen2.5 for a RAG agent over a risk register database.
- The database should answer questions about risks, incidents, and mitigations.
- Many empty tables and columns give the agent too little context.
- Row-level were added for , but quality is still weak.
- Ignoring null values and trimming useless results can reduce token waste and improve answers.