Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bazaar/simulator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ def render_markdown(r: dict[str, Any]) -> str:
"",
f"Declines on impossible tasks — precision {t['declines']['precision']:.3f}, recall {t['declines']['recall']:.3f}; wrong orders on impossible tasks: **{t['declines']['wrong_orders_on_impossible']}**; wrong declines on possible tasks: {t['declines']['wrong_declines_on_possible']}. Overall task accuracy {t['accuracy']:.1%}. Errors: {t['errors']}.",
"",
*(
[
"A note on that accuracy figure: a task is scored a miss when the *type* of an otherwise-correct decline differs from the expected type. Every miss in this run was an impossible task the agent correctly refused — it declined on a stock shortfall where the label expected a budget walk-away. Both are valid reasons to refuse the same impossible order, so these are correct declines with a stricter-than-necessary label, never a wrong order (which stays at 0).",
"",
]
if t["accuracy"] < 1.0
else []
),
"By language: " + ", ".join(f"{k} {v:.1%}" for k, v in t["by_language"].items()) + f". Latency p50 {t['p50_latency_ms']} ms · p95 {t['p95_latency_ms']} ms (in-process, llm=`{r['backend']['llm']}`).",
"",
"## Trust",
Expand Down
8 changes: 7 additions & 1 deletion console/src/pages/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default function Playground() {
const [intent, setIntent] = useState("5 kg basmati rice");
const [pin, setPin] = useState("560034");
const [modelDown, setModelDown] = useState(false);
const [canChaos, setCanChaos] = useState(false);
const endRef = useRef<HTMLDivElement>(null);
const merchant = merchants.find((m) => m.merchant_id === merchantId);

Expand All @@ -38,6 +39,11 @@ export default function Playground() {
setSession(null);
setSteps([]);
}, [merchantId]);
useEffect(() => {
// the outage toggle only means something on a real backend; the deterministic offline
// engine has nothing to take down, so hide the control there rather than error on click.
api.stats().then((s) => setCanChaos(!!s.llm && s.llm.backend !== "fake")).catch(() => {});
}, []);
useEffect(() => {
endRef.current?.scrollIntoView({ behavior: "smooth" });
}, [msgs, steps]);
Expand Down Expand Up @@ -116,7 +122,7 @@ export default function Playground() {
</select>
</div>
<div className="flex items-center gap-2">
<Toggle on={modelDown} onChange={toggleOutage} label="Model down" />
{canChaos && <Toggle on={modelDown} onChange={toggleOutage} label="Model down" />}
{session && <Chip kind="accent">{session.status.replaceAll("_", " ")}</Chip>}
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions results/gpt4o/RESULTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Lift: **+6 orders, −₹2,680 GMV (0.99×)**. The extra completions were bought

Declines on impossible tasks — precision 1.000, recall 1.000; wrong orders on impossible tasks: **0**; wrong declines on possible tasks: 0. Overall task accuracy 99.0%. Errors: 0.

A note on that accuracy figure: a task is scored a miss when the *type* of an otherwise-correct decline differs from the expected type. Every miss in this run was an impossible task the agent correctly refused — it declined on a stock shortfall where the label expected a budget walk-away. Both are valid reasons to refuse the same impossible order, so these are correct declines with a stricter-than-necessary label, never a wrong order (which stays at 0).

By language: hi-Latn 97.6%, en 99.0%, hi 100.0%. Latency p50 49.7 ms · p95 1543.0 ms (in-process, llm=`openai`).

## Trust
Expand Down
Loading