Learning Like a Student: From Open Book to Closed Book for Enhanced Domain-Specific QA
摘要
Domain-specific question answering models generally require access to domain documents during inference, precluding deployment on low-resource settings and adding latency. We present a novel two-stage fine-tuning approach that simulates human learning patterns: first, learning from textbooks (open-book training with context documents), and then responding from memory (closed-book training without context). This approach allows models to learn domain knowledge internally during training while facilitating context-free inference. We compare our approach in both multi-domain (open-domain and biomedical) and multi-language (Vietnamese and English) environments using both encoder-decoder (ViT5, T5) and decoder-only (Gemma) models. Experimental results demonstrate that our two-stage model significantly surpasses single-stage baselines on different settings with performance improvements of up to 4% BertScore-F1 on BioASQ trained with Gemma, 4.25% on PubMedQA, and 15.19% on ViMedQA. Longer analysis shows that the two-stage solution enhances cross-lingual transfer, correctness, and knowledge retention. These findings show that open-book to closed-book training, when sequentially performed, bridges the gap between retrieval-based and parametric QA systems for domain-specific applications and provides accuracy as well as inference efficiency. Our work contributes a practical training technique to developing high-performance, context-independent QA systems in domain-specific applications.