Introduction
Reading Comprehension (RC) is a cornerstone of Natural Language Processing, requiring models to extract answers from a provided context based on a specific query. Despite its centrality, the field lacks a standardized protocol for prompt formatting. This paper investigates whether the structural presentation of information—specifically the order of question and context and the use of textual emphasis—can significantly influence the performance of Large Language Models (LLMs).
Methodology
The researchers evaluated nine LLMs, including Llama-2, Falcon, and GPT-J, across three benchmarks: Natural Questions (NQ), SQuAD (v1.1), and AdversarialQA. The study focused on two primary variables:
- Input Ordering: Comparing "Question-First" (Question: <q> Context: <c>) against "Context-First" (Context: <c> Question: <q>).
- Emphasis Strategies:
- Marked Prompting (MP): Wrapping text in simple markers such as asterisks, quotes, or HTML-style tags (e.g.,
<emphasize>). - Attention Steering (AS): A more complex method (specifically PASTA) that modifies internal attention mechanisms during inference to downweight irrelevant tokens.
Results and Key Insights
The experimental results revealed that formatting is a powerful lever for model performance, often yielding gains that rival increasing model size.
The "Context-First" Advantage
Placing the context before the question yielded an average accuracy increase of 13.46% across the board. In extreme cases, such as GPT-J on the NQ dataset, accuracy jumped by 31.2%. This suggests that placing the question last serves as a proximal instruction that the model can more effectively leverage during the generation phase.
The Power of Simple Emphasis
Surprisingly, simple "Marked Prompting" using <emphasize> tags often matched or outperformed complex attention-steering techniques. These simple formatting tricks led to accuracy improvements of up to 36 percentage points. This is particularly beneficial for practitioners as it requires no changes to model architecture or inference code.
Efficiency and Scale
One of the most significant findings is that optimized formatting allows smaller models to "punch above their weight." For instance, a smaller model using <emphasize> tags can outperform a much larger model using standard, unoptimized prompts. Furthermore, emphasis was found to be most effective when the model does not already possess the answer in its parametric knowledge, forcing it to rely entirely on the provided text.
Discussion and Limitations
While the benefits of formatting are clear, the study notes that these effects might vary with different prompt templates or much larger "frontier" models (e.g., Llama-3 70B). Additionally, the research was confined to reading comprehension; the applicability of these techniques to mathematical reasoning or code generation remains an open question for future work.
Conclusion
This research demonstrates that LLM performance is highly sensitive to prompt structure. By simply reordering inputs and applying basic text markers, practitioners can achieve substantial gains in reading comprehension accuracy without the need for model retraining or complex inference modifications.
Summary updated