Efficient Context Filtering for Extractive Question Answering: A Hybrid Approach with Semantic Validation

Read full text
Authors: Vahid Ghanbarizadeh, Amin Moeinian, Zahra Younes Pour Langaroudi, Mohsen Mohammadagha, Athar Sharifi
Cited by: 1

Abstract

Extractive question answering on lengthy documents remains computationally expensive due to quadratic attention complexity and context truncation requirements in modern language models. This work proposes a hybrid context filtering framework that combines classical similarity metrics, including cosine similarity and Word Mover’s Distance, with the Bitap algorithm, and utilizes selective LLM-based validation to reduce inference cost while maintaining competitive accuracy. The method filters irrelevant sentences before passage encoding, thereby reducing computational overhead without requiring learned retrieval components. Evaluation on SQuAD 2.0 across four open-source models (Llama 2 8B, T5-3B, Flan-T5-XL, mT5-Base) using 5-shot learning and fine-tuning demonstrates a 2.3 inference speedup and 58% latency reduction with a modest accuracy trade-off of 5.7% relative F1 degradation compared to full-context baselines. Component ablation confirms the synergistic contribution of each similarity metric, while robustness evaluation across various context lengths and out-of-distribution settings validates the method’s generalization capabilities. These results indicate that intelligent, parameter-free context filtering can achieve meaningful computational efficiency without necessitating complex learned retrievers.

Fields of Study & Subjects

Topic Modeling Natural Language Processing Techniques Information Retrieval and Search Behavior

Publication details

Journal / source
Journal of Computer Science and Technology Studies
Publisher
Al-Kindi Center for Research and Development
Volume
8
Issue
2
Pages
01–09
Publication date
25 January 2026