code for paper "Discerning and Resolving Knowledge Conflicts through Adaptive Decoding with Contextual Information-Entropy Constraint"
This project presents a contextual information-entropy constraint to discern knowledge conflicts, between parametric knowledge in LLMs and non-parametric contextual knowledge. The constraint has proven effective in realistic datasets, which are characterized by the unpredictability of conflicts. The project develops tailored decoding strategies to solve knowledge conflicts based on the contextual information-entropy constraint. Experimental results demonstrate that our method significantly augments the model's faithfulness to conflicting contexts and exhibits enhanced performance and robustness varying across diverse datasets and models.