FLARE: Few-shot Learning-based Adaptive Reflective Engine
Dhanasekar Sundararaman, Bharat Gandhi, Aashna Garg, Minjie Li
cs.CL
Submitted: 2026-08-03
Code: https://github.com/microsoft/FLARE---Few-shot-Learning-
License: http://creativecommons.org/licenses/by/4.0/
The gist: Large language models (LLMs) are increasingly deployed in complex, compound AI systems where performance hinges on the quality of prompts.
Terminology
Abstract
Large language models (LLMs) are increasingly deployed in complex, compound AI systems where performance hinges on the quality of prompts. Recent state-of-the-art optimizers like GEPA (Genetic-Pareto) have argued that reflective instruction evolution can outperform traditional reinforcement learning and few-shot optimization. In this work, we challenge this shift by introducing FLARE (Few-shot Learning-based Adaptive Reflective Engine), a framework that leverages advanced reflective mechanisms and a small set of few-shot reference examples to optimize instructions. We evaluate our method across a diverse suite of benchmarks -- spanning retrieval-augmented reasoning (HotPotQA, MedQA, 2WikiMultiHopQA), tool calling, and multi-label emotion classification (GoEmotions) -- using the GPT-5 series of models. Our results demonstrate that FLARE consistently outperforms GEPA, winning on every task-model pair: it achieves gains of up to +14.2 points on HotPotQA (52.2 vs. GEPA's 42.2 with GPT-5-Chat), reaches 87.0% on tool calling (vs. 81.0% for GEPA), and lifts GoEmotions micro-F1 to 52.7% (+15.3) with GPT-5.1 on the full 5408-example test split, more than doubling GEPA's +5.7 gain. Beyond raw accuracy, FLARE is also strikingly data-efficient: on GoEmotions it reaches its peak performance using as few as 100 validation examples, while remaining markedly more stable across random seeds than GEPA. Our findings suggest that while reflective instructions are powerful, the strategic optimization of few-shot learning remains a critical frontier for maximizing the potential of next-generation LLMs.
Sources
- GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
- $\tau^2$-Bench: Evaluating Conversational Agents in a Dual-Control Environment
- GoEmotions: A Dataset of Fine-Grained Emotions
- LongRAG: Enhancing Retrieval-Augmented Generation with Long-context LLMs
- What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Exams
- DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines
- Promptomatix: An Automatic Prompt Optimization Framework for Large Language Models
- Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programs
- Emulating Retrieval Augmented Generation via Prompt Engineering for Enhanced Long Context Comprehension in LLMs
- Automatic Prompt Optimization with "Gradient Descent" and Beam Search
- Supervising the search process produces reliable and generalizable information-seeking agents
- Large Language Models as Optimizers
- Large Language Models Are Human-Level Prompt Engineers
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering