← Latest papers
💬 NLP

PQR: A Framework to Generate Diverse and Realistic User Queries that Elicit QA Agent Failures

The paper introduces PQR, an iterative framework that combines query and prompt refinement to automatically generate diverse, realistic user queries that effectively elicit and uncover failures in LLM-based QA agents, significantly outperforming prior methods in detecting unhelpful responses.

Original authors: Yunan Lu, Luigi Liu, Omar Yahia, Arpit Sharma, Zhou Yu

Published 2026-05-19
📖 4 min read☕ Coffee break read

Original authors: Yunan Lu, Luigi Liu, Omar Yahia, Arpit Sharma, Zhou Yu

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 are the quality control manager for a new, super-smart shopping assistant robot. Your job is to find out where this robot makes mistakes. But there's a catch: the robot is very good at answering simple questions like, "What color is this shirt?" To find its weaknesses, you need to ask it tricky, confusing, or weird questions.

The problem is that if you ask the robot weird questions that no human would ever ask (like "What is the color of the number 5?"), the robot will just say, "I don't understand." That doesn't tell you much about how it handles real customers. You need to find questions that sound exactly like something a real person would type, but that still trick the robot into giving a bad answer.

This paper introduces a new tool called PQR (Prompt-Query-Refinement) to solve this problem. Think of PQR as a two-person "Red Team" working together to break the robot, but in a very specific way.

The Two Partners

1. The "Word Wizard" (Query Refinement)
Imagine a wizard who takes a normal sentence and starts playing with it. They might:

  • Typos: Change "apple" to "aple."
  • Tone: Change a polite request into a grumpy one.
  • Role-play: Pretend to be a tired parent in a hurry.

This wizard creates many variations of a question to see if small changes break the robot. However, if the wizard goes too wild, the questions start sounding like gibberish or code, which isn't helpful for testing real-world performance.

2. The "Director" (Prompt Refinement)
Imagine a movie director who watches the Wizard's attempts. The Director doesn't just watch; they take notes.

  • "Hey, that grumpy tone worked well to confuse the robot!"
  • "But that question about 'quantum physics' was too fake. Let's make the next one sound more like a real shopper."

The Director uses these notes to write a new set of instructions (a "prompt") for the Wizard. They tell the Wizard: "Next time, try asking two questions at once, but make it sound like a real person who is in a rush."

How They Work Together (The Loop)

PQR puts these two partners in a loop:

  1. The Director gives the Wizard a set of instructions.
  2. The Wizard creates a bunch of questions based on those instructions.
  3. They test these questions on the shopping robot.
  4. If the robot fails, they celebrate! If the robot succeeds, they analyze why it succeeded.
  5. The Director updates the instructions based on what they learned, making the next round of questions even more realistic and tricky.

Why This is Better Than Before

Before PQR, researchers tried two main ways to find robot mistakes:

  • The "Hacker" Approach: They tried to force the robot to fail using aggressive, unnatural attacks. This found mistakes, but the questions sounded like a computer program, not a human.
  • The "Optimizer" Approach: They tried to make the questions sound perfect, but they kept asking the same type of question over and over, missing other ways the robot could fail.

PQR is like a hybrid. It combines the "Hacker's" ability to find weaknesses with the "Optimizer's" ability to sound human.

The Results

The authors tested PQR on an e-commerce shopping bot. They found that PQR was much better at finding "unhelpful" answers than previous methods.

  • More Mistakes Found: It found between 23% and 78% more bad answers than the other methods.
  • More Realistic: The questions it generated sounded much more like things real shoppers would actually type.
  • More Diverse: It didn't just find one type of mistake; it found many different kinds of confusion.

The Bottom Line

PQR is a smart, automated system that learns how to ask the perfect tricky questions. It doesn't just try to break the robot; it tries to break the robot in a way that feels like a real human interaction. This helps developers fix their AI agents so they are more reliable when real people are using them.

Note: The paper specifically tested this on a shopping assistant to find "unhelpful" responses. It also briefly looked at "safety" (preventing bad content), but the main focus was on making the AI helpful and realistic.

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 →