Skip to main content
Prompt learning examples demonstrate optimization workflows for different task types: classification, multi-hop QA, instruction following, and claim verification.

Supported Tasks

TaskDescriptionAlgorithmConfig
Banking77Intent classification (77 banking intents)GEPAbanking77_gepa_local.toml
HotpotQAMulti-hop question answeringGEPAhotpotqa_gepa_local.toml
IFBenchInstruction following benchmarkGEPAifbench_gepa_local.toml
HoVerClaim verification against WikipediaGEPAhover_gepa_local.toml
PUPAPrivacy-aware task delegationGEPApupa_gepa_local.toml

Quick Start: Banking77

The Banking77 example provides a complete walkthrough:
  1. Deploy task app:
    uvx synth-ai deploy banking77 --runtime uvicorn --port 8102
    
  2. Run optimization:
    uvx synth-ai train \
      --config examples/blog_posts/gepa/configs/banking77_gepa_local.toml \
      --poll
    
  3. Query results:
    from synth_ai.learning import get_prompt_text
    best_prompt = get_prompt_text(job_id="pl_abc123", rank=1)
    
See the Banking77 guide for detailed steps, helper scripts, and troubleshooting.

Example Configurations

All example configs are available in synth-ai/examples/blog_posts/gepa/configs/:
  • banking77_gepa_local.toml – Intent classification
  • hotpotqa_gepa_local.toml – Multi-hop QA
  • ifbench_gepa_local.toml – Instruction following
  • hover_gepa_local.toml – Claim verification
  • pupa_gepa_local.toml – Privacy-aware delegation
Each config includes:
  • Initial prompt template with {query} placeholder
  • Training and validation seed splits
  • Algorithm parameters (population size, generations, mutation rate)

Integration Tests

Run the integration test to verify the full workflow:
cd synth-ai
uv run pytest tests/integration/cli/test_cli_train_gepa_banking77.py -v
This test:
  • Deploys the Banking77 task app to Modal
  • Runs a GEPA optimization job
  • Validates job completion and result structure

Next Steps