Synth Graphs
Graphs are Synth’s abstraction for multi-node LLM workflows. Like task apps, graphs are first-class artifacts you can train, download, and serve in production.What is a Graph?
A Synth graph is a directed workflow of LLM calls and transformations. Each node can:- Call an LLM with a specific prompt template
- Transform data between nodes
- Branch conditionally based on intermediate results
- Aggregate outputs from multiple paths
Graph Types
Synth supports two fundamental graph types:| Type | Purpose | Example |
|---|---|---|
policy | Maps inputs to outputs | QA, classification, generation |
verifier | Judges/scores existing results | Quality scoring, ranking, evaluation |
Policy Graphs
Policy graphs solve tasks. They take an input and produce an output:- Question answering:
{question, context}→{answer} - Classification:
{text}→{category, confidence} - Code generation:
{spec}→{code}
Verifier Graphs
Verifier graphs evaluate execution traces and produce structured scores. At inference time, they take:- A V3 trace - The execution trace from
synth-aitracing - A rubric - Evaluation criteria defining what to score
- Matches human evaluation quality
- Runs on cheaper models (GPT-4o-mini, Groq)
- Provides consistent, calibrated scores
- Returns structured rewards (event-level and outcome-level)
Verifier Graph Dataset Format
Required Dataset Structure
A verifier-compliant ADAS dataset has this structure:The tasks[].input.trace Field (Required)
Each task input must contain a trace field with a V3 SessionTrace object:
Event IDs are critical. Each event must have an integer
event_id so the verifier can assign per-event rewards that link back to specific actions in the trace.The gold_outputs[].output.score Field (Required)
Every gold output must include a score field (float, 0-1):
Optional: Event-Level Rewards
For fine-grained training, includeevent_rewards to teach the verifier which specific events were good or bad:
Optional: Outcome-Level Rewards
Include episode-level summary information:Optional: Default Rubric
Include a rubric in the dataset metadata to define evaluation criteria:Complete Verifier Dataset Example
Here’s a complete, production-ready verifier dataset:Training a Verifier Graph
With your dataset prepared, train via ADAS:Verifier Graph Inference
At inference time, pass a V3 trace and rubric:Inference via cURL
Benefits of Trained Verifier Graphs
This enables:- 10x cost reduction vs frontier model judging
- Consistent evaluation across runs
- Domain-specific scoring tuned to your criteria
- Structured rewards at event and outcome levels
- Integration with RL training - use verifier output as rewards
Graph Structures
| Structure | Description |
|---|---|
single_prompt | One LLM call, minimal complexity |
dag | Multiple nodes in sequence, no branching |
conditional | Full graph with conditional branching |
Creating Graphs
Graphs are created through optimization. You provide:- A dataset - Examples of inputs and expected outputs
- Configuration - Graph type, structure constraints, models to use
- A budget - How much optimization to run
Using ADAS (Recommended)
The simplest way to create graphs is through the ADAS API:Using Graph GEPA Directly
For more control, use the Graph Optimization client:Using Graphs
Once trained, graphs can be:1. Run in Production
Call the/graph/completions endpoint for production inference:
2. Downloaded
Export the graph for local use or inspection:Graph Artifacts
When you train a graph, Synth produces:| Artifact | Description |
|---|---|
| Graph YAML | Full graph definition with nodes and prompts |
| Prompt snapshots | Individual prompt versions from training |
| Training metrics | Scores, costs, latencies per generation |
Related
- Workflows (ADAS) - High-level product API
- Graph GEPA - Training method reference
- Graph Inference - Production serving
- Downloading Graphs - Export and local use