Overview
Banking77 has both single-stage and multi-stage (pipeline) variants. This guide explains the differences and when to use each.Single-Stage Banking77
Task: Direct intent classification (77 banking intents)Config:
banking77_gepa_local.tomlTask App:
banking77 (single-stage classifier)
Key Characteristics
- Single prompt template with system and user messages
- One LLM call per query
- Pattern-based prompt optimization
- Direct classification from query to intent
Configuration Structure
Example Config Files
-
banking77_gepa_local.toml- Local development config- Pattern-based prompt with wildcards
- 30 training seeds, 50 validation seeds
- Budget: 100 rollouts, 3 generations
-
banking77_gepa_test.toml- Test/production config- Similar structure, optimized for testing
- 30 training seeds, 20 validation seeds
- Budget: 1500 rollouts, 10 generations
Typical Results
- Baseline: 60-75% accuracy
- After optimization: 85-90%+ accuracy
- Generations: 3-10 generations typically sufficient
Multi-Stage Banking77 Pipeline
Task: Two-stage pipeline (classifier → calibrator OR query_analyzer → classifier)Config:
banking77_pipeline_gepa_local.tomlTask App:
banking77-pipeline (multi-stage pipeline)
Key Characteristics
- Multiple prompt templates (one per stage)
- Sequential LLM calls (stage 1 → stage 2)
- Per-stage optimization with module constraints
- Pipeline-level evaluation (end-to-end performance)
Two Pipeline Variants
Variant 1: Classifier → Calibrator
Stages:- Classifier: Initial intent classification
- Calibrator: Review and refine the classifier’s suggestion
banking77_pipeline_gepa_local.toml
Variant 2: Query Analyzer → Classifier
Stages:- Query Analyzer: Extract key information from query
- Classifier: Classify based on analyzed information
banking77_pipeline_gepa_test.toml
Configuration Structure
Example Config Files
-
banking77_pipeline_gepa_local.toml- Local development (classifier → calibrator)- Spec-based proposer (
proposer_type = "spec") - System spec integration
- Budget: 500 rollouts, 5 generations
- Spec-based proposer (
-
banking77_pipeline_gepa_test.toml- Test/production (query_analyzer → classifier)- DSPy proposer (
proposer_type = "dspy") - Budget: 2000 rollouts, 10 generations
- DSPy proposer (
-
banking77_pipeline_gepa.toml- Alternative config (classifier → calibrator)- DSPy proposer
- Budget: 500 rollouts, 8 generations
Key Differences
| Aspect | Single-Stage | Multi-Stage |
|---|---|---|
| Task App | banking77 | banking77-pipeline |
| LLM Calls | 1 per query | 2+ per query (sequential) |
| Prompt Structure | Single template | Multiple templates (one per stage) |
| Configuration | No modules section | [[prompt_learning.gepa.modules]] required |
| Initial Prompt | Direct messages | Placeholder + metadata.pipeline_modules |
| Optimization | Single prompt evolution | Per-stage prompt evolution |
| Evaluation | Direct accuracy | End-to-end pipeline accuracy |
| Complexity | Simpler | More complex (module constraints) |
Configuration Differences
Single-Stage: Initial Prompt
Multi-Stage: Initial Prompt
When to Use Each
Use Single-Stage When:
- ✅ You have a straightforward classification task
- ✅ You want simpler configuration and faster optimization
- ✅ Single LLM call is sufficient
- ✅ You’re prototyping or testing
Use Multi-Stage When:
- ✅ You need sequential processing (analyze → classify)
- ✅ You want refinement/calibration stages
- ✅ Different stages have different constraints (tools, tokens)
- ✅ You need per-stage optimization control
Example Config Files Location
Single-Stage Configs
synth-ai/examples/blog_posts/gepa/configs/banking77_gepa_local.tomlsynth-ai/examples/blog_posts/gepa/configs/banking77_gepa_test.toml
Multi-Stage Configs
synth-ai/examples/blog_posts/gepa/configs/banking77_pipeline_gepa_local.toml(classifier → calibrator)synth-ai/examples/blog_posts/gepa/configs/banking77_pipeline_gepa_test.toml(query_analyzer → classifier)synth-ai/examples/gepa/banking77_pipeline_gepa.toml(classifier → calibrator)
Running the Examples
Single-Stage
Multi-Stage
Next Steps
- Banking77 Single-Stage Guide – Complete walkthrough
- Configuration Reference – All parameters explained
- Algorithm Comparison – GEPA vs MIPRO