A new technique called COCOA (Confidence- and Context-Aware Adaptive Decoding) aims to resolve knowledge conflicts that arise when large language models (LLMs) use retrieval-augmented generation (RAG). These conflicts occur between the model's internal parametric memory and the external context provided, leading to unreliable outputs.
Existing contrastive decoding methods are often tailored for high-conflict scenarios but struggle in low-conflict settings, degrading performance. COCOA addresses this by employing token-level adaptive decoding that uses confidence-aware measures, such as entropy gap and contextual peakedness, along with a generalized divergence between parametric and contextual distributions.
Tests across multiple LLMs on question answering, summarization, and long-form QA benchmarks show COCOA maintains strong faithfulness even with minimal conflict, outperforming previous approaches.