← All questions
RAGMedium· Prompt Engineering· System Design

When a RAG pipeline retrieves correct information but f...

This is a generation failure, not a retrieval failure. If the necessary components are in one chunk, a simple prompt instruction to compute the sum is the most efficient fix. Adding a decomposition module is only appropriate if the information is fragmented across documents that cannot be retrieved in a single query.

Code playground (Python)