Meta-Prompting & Self-Consistency
Meta-prompting techniques use the model itself to improve, verify, or aggregate its own outputs. Rather than accepting the first response, these patterns run multiple generations and combine them - trading compute for quality. They are the building blocks of more sophisticated inference-time scaling.
Self-Consistency Sampling
Self-consistency runs the same prompt multiple times (typically 5โ20) with non-zero temperature and takes the majority vote. Because each sample follows a different reasoning path, correct answers tend to cluster while errors are random and cancel out.
Example: Arithmetic reasoning
Run the same maths problem 10 times at temp 0.7. Samples return: 42, 42, 41, 42, 42, 42, 43, 42, 42, 41. Majority = 42. The individual errors (41, 43) are overruled.
Self-consistency improves accuracy by 5โ20% on reasoning tasks but multiplies inference cost by the number of samples. Use it only where accuracy matters more than latency/cost.
Self-Refinement
Self-refinement asks the model to critique its own output and then improve it. This can be done in a single prompt or in a multi-turn loop.
Turn 1 (generate): "Write a Python function that finds all prime numbers up to N." Turn 2 (critique): "Review the function you just wrote. Identify any bugs, edge cases, or performance issues. List them clearly." Turn 3 (refine): "Now rewrite the function fixing all the issues you identified."
Self-refinement is most useful for open-ended tasks (code, writing, analysis) where there is a clear criterion for improvement. It is less useful when the model cannot reliably identify its own errors - which happens with factual tasks.
Meta-Prompting
Meta-prompting uses one model call to generate or improve a prompt for another call. Rather than handcrafting prompts, you ask the model:
"I want to extract product names, prices, and availability from e-commerce pages. Write me an optimal system prompt for this extraction task. The system prompt should handle edge cases like missing prices and bundle deals."
The generated prompt is usually better than a human first draft. You then test and refine it. This is now common practice for bootstrapping prompt development.
Critic Pattern (Separate Critic Model)
A stronger variant uses a separate model call as an independent critic - the critic model evaluates the generator's output against explicit criteria without being biased by having produced the output. This pattern underlies LLM-as-Judge evaluation and Constitutional AI.
Generator
Produces initial output
Critic
Evaluates against criteria; returns feedback
Refiner
Re-generates using critic feedback
When to Use Each Technique
| Technique | Best for | Cost multiplier |
|---|---|---|
| Self-consistency | Reasoning, maths, closed-ended Q&A | 5โ20ร |
| Self-refinement | Code, writing, open-ended tasks | 2โ4ร |
| Meta-prompting | Prompt development, bootstrapping | 1ร (one-time) |
| Critic pattern | Safety checks, quality gates, evaluation | 2โ3ร |