Tokens to Types: Context Editing with Selective Entity Abstraction for Grounded Generation
Rounak Sharma, Debabrata Mahapatra, Shiv Kumar Saini
Abstract
Large language models (LLMs) frequently prioritize parametric world knowledge over provided context -- a failure mode that is particularly catastrophic in enterprise or counterfactual settings where local facts contradict web-scale training data. While modern reasoning models improve general response quality, they fail to resolve these underlying prior knowledge biases even when generating a high volume of costly thinking tokens. We propose a context-editing framework that addresses this by performing selective abstraction over entities that appear in both the context and the question. Our approach replaces these overlapping entities with typed, indexed identifiers (e.g., Paris with City łangle1), suppressing spurious lexical associations while preserving the relational structure required for grounded reasoning. This mechanism is decoupled into an offline preprocessing stage and a lightweight inference-time substitution, requiring no model retraining. Experiments across counterfactual and multi-hop knowledge-conflict benchmarks demonstrate consistent accuracy gains across many model families, open- and closed-sourced, especially for small to medium sized LLMs (0.5B to 18B). Notably, our framework yields up to a 25% improvement over state-of-the-art instruct models and 13% over reasoning models, establishing symbolic abstraction as a highly cost-efficient solution for ensuring context fidelity in LLMs.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 4b69fe1f-230b-49f2-9f6c-395347cfe396Related papers
- Unveiling Factual Recall Behaviors of Large Language Models through Knowledge NeuronsYifei Wang, Yuheng Chen, Wanting Wen, Yu Sheng et al.EMNLP 2024 · 3 citations
- DeCoT: Debiasing Chain-of-Thought for Knowledge-Intensive Tasks in Large Language Models via Causal InterventionJunda Wu, Tong Yu, Xiang Chen, Haoliang Wang et al.ACL 2024
- Can We Edit Factual Knowledge by In-Context Learning?Ce Zheng, Lei Li, Qingxiu Dong, Yuxuan Fan et al.EMNLP 2023 · 40 citations
- Verify-and-Edit: A Knowledge-Enhanced Chain-of-Thought FrameworkRuochen Zhao, Xingxuan Li, Shafiq Joty, Chengwei Qin et al.ACL 2023 · 50 citations
- A Glitch in the Matrix? Locating and Detecting Language Model Grounding with FakepediaGiovanni Monea, Maxime Peyrard, Martin Josifoski, Vishrav Chaudhary et al.ACL 2024 · 2 citations
