Predicting Performance of Symbolic and Prompt Programs with Examples
This paper proposes RAP, a performance prediction framework that leverages retrieved similar tasks and prompt programs to construct an approximate prior, effectively addressing the unreliability of LLM prompting by distinguishing its diffuse performance distribution from the "all-or-nothing" nature of symbolic programs.
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 a hiring manager trying to decide if a new employee is ready for a big job. You have two types of candidates: The Robot (a symbolic program, like Python code) and The Creative Freelancer (a prompt program, which is an instruction given to an AI to do a task).
The paper asks a simple question: If both candidates pass a few small practice tests, can we trust them to do the real job?
The authors say: Yes for the Robot, but maybe not for the Freelancer. Here is why, using the paper's own logic and analogies.
1. The Two Types of "Programs"
- The Robot (Symbolic Program): This is like a strict calculator. If you tell it "2 + 2," it must say "4." It follows rigid rules. If it passes a test, it's because it followed the rules perfectly.
- The Freelancer (Prompt Program): This is like asking a smart but slightly unpredictable artist to "draw a cat." You give the artist a prompt (instructions). The artist might draw a great cat, a weird cat, or a dog. Even if they pass a few practice tests, they might just be getting lucky, or the instructions might be slightly off for the real world.
2. The "Coin Flip" Model
The authors imagine every time the program runs a test, it's like flipping a coin.
- Heads: The program gets it right.
- Tails: The program gets it wrong.
The goal is to guess how "weighted" the coin is. Is it a fair coin (50/50)? Or is it a trick coin that always lands on Heads (100% success)?
3. The Big Discovery: The "Shape" of the Past
Before we even look at the test results, the authors looked at the history of thousands of these programs to see what their "coin weights" usually look like. They found two very different shapes:
The Robot's History (All-or-Nothing):
Imagine a histogram of all Robot programs. It looks like two tall spikes at the very ends.- Spike 1: Most Robots are perfect (100% success).
- Spike 2: Most Robots are broken (0% success).
- The Middle: Almost nothing. Robots rarely do "okay." They are either perfect or they fail completely.
- Analogy: It's like a light switch. It's either ON or OFF.
The Freelancer's History (The Diffuse Cloud):
Imagine a histogram of all Freelancer programs. It looks like a wide, flat cloud in the middle.- There are many programs that are "almost right" (70%, 80%, 90%).
- There are very few that are perfect, and very few that are total failures.
- Analogy: It's like a dimmer switch. Most freelancers are somewhere in the middle, varying in brightness.
4. Why a Few Tests Lie to You
This difference explains why a few passing tests are misleading for the Freelancer but reassuring for the Robot.
- For the Robot: If you see it pass 3 tests, you know it's likely one of those "perfect" spikes. Because the "middle ground" (where it might be just okay) doesn't exist, passing a few tests is a strong guarantee it will keep working.
- For the Freelancer: If you see it pass 3 tests, it might just be one of those "almost right" programs that got lucky. Because there is a huge cloud of "almost right" programs, passing a few tests doesn't prove it will be perfect later. It could easily fail on the next one.
5. The Solution: RAP (The "Similarity Search" Tool)
Since we can't trust a few tests for the Freelancer, the authors built a tool called RAP (Retrieved Approximate Prior).
Think of RAP as a smart librarian.
- The Problem: You have a new Freelancer prompt and a few test results. You don't know if it's good.
- The Library: RAP has a massive library of other prompts and tasks that have been tried before.
- The Search: RAP looks at your new prompt and asks, "Who in the library is most similar to you?" It finds other prompts that solved similar problems.
- The Prediction: Instead of guessing based on a generic rule, RAP looks at how those similar prompts performed in the past. It builds a custom "guessing map" (a prior) specifically for your prompt.
- The Update: As you run more tests, RAP updates its guess.
The Result: RAP is much better at predicting if a Freelancer will succeed than just guessing or looking at the whole library at once. It adapts to the specific type of task you are doing.
Summary
- Robots (Code) are binary: they are either perfect or broken. A few tests prove they are perfect.
- Freelancers (Prompts) are variable: they are often "almost good." A few tests don't prove they are reliable.
- RAP fixes this by looking at similar past examples to make a smarter guess about how well a new prompt will work, rather than just relying on a few lucky test runs.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.