Arshia Hemmat

Context Awareness Gate for Retrieval‑Augmented Generation

15th IKT 2024 – Accepted

Context Awareness Gate

Retrieval‑augmented generation systems can suffer when irrelevant context is retrieved for an input question. This paper proposes the Context Awareness Gate (CAG), a neural mechanism that decides whether a query requires external knowledge before generation. Instead of always retrieving documents, the gate evaluates the semantic content of the query: if sufficient knowledge is already encoded in the model, the system answers directly; otherwise, it performs retrieval.

To efficiently select candidate contexts, the authors introduce a vector‑candidates method, a statistical, large‑language‑model‑independent approach that ranks documents without requiring heavy inference. Experiments demonstrate that this dynamic retrieval decision improves both faithfulness and relevance by avoiding the incorporation of distracting information. The work underscores the importance of smarter retrieval control in RAG pipelines.

Paper PDF Back to Publications