Quality Scoring
The PizzaStack API tracks quality through the entire pipeline. The final overall_score in the /pizza/bake response reflects whether all preparation steps were executed correctly.
Score Ranges
0.90 – 0.98
All preparation steps were correct
0.35 – 0.50
One or more preparation errors occurred
What Degrades Quality
Quality degrades when ingredients are passed to a cooking step in the wrong state. Currently, the main source of degradation is:
Passing a raw tomato ID to /cook/simmer
The /cook/simmer endpoint accepts raw tomato IDs without returning an error. Instead, it returns sauce_quality: "degraded" with degradation_reason: "raw_ingredient". This is a silent failure — HTTP status is still 200.
To avoid this, always slice tomatoes before simmering:
/tomato/acquire→ get a raw tomato ID/tomato/slice→ get a sliced ID/cook/simmer→ pass the sliced ID
How Degradation Propagates
Degradation is sticky — once any step produces a degraded result, all downstream steps are also degraded:
raw tomato → /cook/simmer → sauce_quality: "degraded"
↓
/pizza/assemble → assembly_quality: "degraded"
↓
/pizza/bake → overall_score: 0.35–0.50Compare with the correct pipeline:
Sub-Scores
The /pizza/bake response includes several sub-scores in quality_metrics:
overall_score
Final composite quality score (0.0–1.0)
crust_crispness
Quality of the crust
cheese_melt
Quality of cheese melting
topping_distribution
Evenness of topping placement
sauce_integration
How well the sauce integrates with the pizza
All sub-scores are affected by upstream degradation. A degraded sauce will produce low scores across all metrics, not just sauce_integration.
Last updated
Was this helpful?