Skip to main content
To run:

1. Install the demo file from GitHub:

curl -L -o run_demo.py \
  https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/demos/gepa_banking77/run_demo.py

2. Install the Synth AI SDK in your Python environment:

pip install synth-ai

3. Start the GEPA prompt optimization job:

python run_demo.py
On job start, the following happens:
  • Launches a Local API — a FastAPI server that loads the dataset and handles rollout requests
  • Wraps the Local API in a Cloudflare Tunnel so Synth AI’s server can reach your local machine
  • Optimizes the prompt by having Synth AI’s server call the Local API

Using the TUI

You can view your prompt optimization job’s progress live through Synth AI’s terminal user interface. In the same environment where the synth-ai SDK is installed, open the TUI and view your job’s status by running:
synth-ai
Prompt optimization status

Prompt optimization finishes

The TUI notifies when the prompt optimization job completes. To get the optimized prompt:
  1. Select the prompt optimization run by pressing the b key and navigating with j/k
  2. Press the p key to open the completed job’s optimized prompt
  3. Press the y key to copy the optimized prompt to clipboard Prompt optimization complete

Evals on optimized prompt

Once your prompt optimization job completes, both a baseline and optimized eval will run, all viewable live in the TUI:

Baseline eval

Baseline eval job

Optimized eval

Optimized eval job