← Latest papers
💬 NLP

Evaluating Prompt Engineering Techniques for RAG in Small Language Models: A Multi-Hop QA Approach

This paper presents a large-scale empirical study demonstrating that optimizing prompt engineering techniques significantly enhances the multi-hop reasoning performance of Small Language Models in Retrieval Augmented Generation systems, achieving up to 84.5% gains on the HotpotQA dataset compared to standard approaches.

Original authors: Amir Hossein Mohammadi, Ali Moeinian, Zahra Razavizade, Afsaneh Fatemi, Reza Ramezani

Published 2026-02-17
📖 6 min read🧠 Deep dive

Original authors: Amir Hossein Mohammadi, Ali Moeinian, Zahra Razavizade, Afsaneh Fatemi, Reza Ramezani

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart, but slightly young, assistant named Alex. Alex is great at chatting and knows a lot of general facts, but if you ask him a tricky question that requires connecting dots from three different books, he might get confused or make things up. This is what happens with Small Language Models (SLMs) in the world of AI. They are fast and cheap to run, but they struggle with complex puzzles.

To help Alex, you give him a library of books (external knowledge) to look at before answering. This setup is called RAG (Retrieval-Augmented Generation). But here's the catch: How you ask Alex to use those books matters just as much as the books themselves.

This paper is like a massive cooking competition where the researchers tested 24 different ways of giving instructions (prompts) to two different versions of Alex (the AI models Qwen and Gemma) to see which instruction style helped them solve the hardest puzzles (Multi-Hop Questions) best.

Here is the breakdown of their findings, using some everyday analogies:

1. The Problem: The "Overwhelmed Intern"

Think of the AI models as interns.

  • The Big Models are like senior experts who can figure out complex problems on their own.
  • The Small Models (SLMs) are like bright but junior interns. They are fast and cheap, but if you just hand them a stack of papers and say, "Find the answer," they might get lost in the noise or miss the connection between two facts.

The researchers wanted to know: What is the best way to tell the intern how to read those papers?

2. The Experiment: 24 Different "Instruction Manuals"

The team didn't just guess. They tested 24 different "instruction manuals" (prompts) on the HotpotQA dataset (a test full of tricky questions that require linking facts, like "Who is the wife of the actor who starred in the movie directed by the person who won the Oscar for Best Director?").

They grouped the instructions into three types:

  • The Standard Way: "Here are the books, give me an answer." (The Baseline)
  • The "Textbook" Way: Instructions taken from existing AI research (like "Think step-by-step" or "Check your work").
  • The "New Hybrid" Way: Custom instructions the researchers invented, mixing different techniques to create a super-guide for the intern.

3. The Results: Speed vs. Accuracy (The "Fast Food vs. Fine Dining" Dilemma)

The study revealed a classic trade-off, like choosing between a fast-food burger and a slow-cooked gourmet meal.

Option A: The "Fast Food" Prompts (Literature-Derived)

  • What they are: Short, simple instructions like "Just give me the answer."
  • The Result: These were super fast. The AI answered in about 1 second.
  • The Catch: The answers were okay, but not perfect. It's like grabbing a quick burger; it fills you up, but it's not the best meal possible.
  • Best for: Chatbots where you need an instant reply, even if it's slightly less accurate.

Option B: The "Gourmet" Prompts (Novel Hybrid)

  • What they are: Long, detailed instructions that tell the AI: "First, read this paragraph. Then, find the connection to that paragraph. Then, double-check your logic. Finally, synthesize the answer."
  • The Result: These produced much better answers (up to 6% more accurate). The AI got the complex puzzles right.
  • The Catch: It took 8 to 10 times longer to get the answer. The AI was "thinking" hard, which slowed things down.
  • Best for: Medical diagnosis, legal research, or scientific discovery where being right is more important than being fast.

4. The Twist: Not All Interns Are the Same

The researchers tested two different AI models, and they behaved differently:

  • Model A (Qwen 2.5 - 3B): This is the "Junior Intern." It needed a lot of hand-holding. To get the best results, you had to give it the long, detailed "Gourmet" instructions. It couldn't figure out the complex puzzle on its own.
  • Model B (Gemma 3 - 4B): This is the "Senior Intern." It is slightly bigger and smarter.
    • The Surprise: For this model, the researchers found a "Magic Prompt" called Expert Synthesis.
    • The Magic: They told the model: "You are an expert. Synthesize the information and give me the best answer."
    • The Result: This model was both fast AND accurate. It didn't need the long, step-by-step hand-holding. It could "just know" what to do. This broke the usual rule that says "you have to be slow to be smart."

5. The Big Takeaways (The "Cheat Sheet")

If you are building an AI system, here is what this paper tells you to do:

  1. There is no "One Size Fits All": You can't just copy-paste a prompt from one AI to another. What works for the "Junior Intern" (Qwen) might be too confusing or too slow for the "Senior Intern" (Gemma).
  2. Choose your goal:
    • Need Speed? Use the short, simple prompts.
    • Need Perfection? Use the long, complex "Hybrid" prompts.
  3. Bigger isn't always just "smarter," it's "different": A slightly larger model (Gemma) handled complex instructions much more efficiently than the smaller one, sometimes even beating the "slow and accurate" rule.
  4. Don't rely on simple math: The researchers found that standard computer tests (like counting matching words) were bad at judging these answers. They had to use a "Judge AI" (GPT-4o-mini) to read the answers and give them a human-like grade based on logic and truth.

In Summary

This paper is a guidebook for anyone trying to use small, efficient AI models for hard tasks. It proves that how you ask the question is just as important as the AI itself. By tweaking the instructions, you can turn a fast-but-dumb AI into a slow-but-genius one, or find the sweet spot where a smarter AI can be both fast and genius.

The Bottom Line: If you want the best results, don't just throw data at the AI. Give it a clear, well-structured map on how to navigate that data, and pick the map that fits the specific "brain" you are using.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →