Skip to content

feat: measure model cost per order; explain the held-out name score - #26

Merged
abhay-codes07 merged 1 commit into
mainfrom
feat/cost-measurement
Sep 5, 2026
Merged

feat: measure model cost per order; explain the held-out name score#26
abhay-codes07 merged 1 commit into
mainfrom
feat/cost-measurement

Conversation

@abhay-codes07

Copy link
Copy Markdown
Owner

feat: measure model cost per order; explain the held-out name score

Two reporting gaps that a careful reader would question.

Cost per order is now a measurement, not prose. The LLM client counts
prompt/completion tokens on every real call (cache hits never reach it,
so it is a true spend), prices them at listed model rates, and the run
report derives cost per completed order. A cold-cache probe (every call
live) measured ₹3.37/order on gpt-4o over 40 tasks / 27 orders — which
corrects the earlier "under ₹1" prose, and the README now states the
measured figure with the small-model path (~10–15x cheaper on
gpt-4o-mini, zero on the free gpt-oss backend) and the cost story: only
the propose step calls a model, so cost does not scale with order value.
Evidence in results/gpt4o_costprobe/.

Held-out name score (0.094) now carries one sentence explaining why it
is reported: it is the offline dictionary backend, which cannot know a
brand it was never given (gpt-4o lifts the same column to 0.469), and it
is not a safety number — an uncertain name is review-queued, never
guessed, so it costs review clicks, not a wrong price or order (those
fields score 1.000 on both backends).

Also: run_heldout skips a catalog whose vertical has no loaded template
merchant instead of crashing on a trimmed corpus (surfaced by the cost
probe running on 20 merchants).

91 tests, ruff clean.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01BLrj9TWybDCNw1mWxZgAks

Two reporting gaps that a careful reader would question.

Cost per order is now a measurement, not prose. The LLM client counts
prompt/completion tokens on every real call (cache hits never reach it,
so it is a true spend), prices them at listed model rates, and the run
report derives cost per completed order. A cold-cache probe (every call
live) measured ₹3.37/order on gpt-4o over 40 tasks / 27 orders — which
corrects the earlier "under ₹1" prose, and the README now states the
measured figure with the small-model path (~10–15x cheaper on
gpt-4o-mini, zero on the free gpt-oss backend) and the cost story: only
the propose step calls a model, so cost does not scale with order value.
Evidence in results/gpt4o_costprobe/.

Held-out name score (0.094) now carries one sentence explaining why it
is reported: it is the offline dictionary backend, which cannot know a
brand it was never given (gpt-4o lifts the same column to 0.469), and it
is not a safety number — an uncertain name is review-queued, never
guessed, so it costs review clicks, not a wrong price or order (those
fields score 1.000 on both backends).

Also: run_heldout skips a catalog whose vertical has no loaded template
merchant instead of crashing on a trimmed corpus (surfaced by the cost
probe running on 20 merchants).

91 tests, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLrj9TWybDCNw1mWxZgAks
Copilot AI lite review requested due to automatic review settings September 5, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@abhay-codes07
abhay-codes07 merged commit 26d45be into main Sep 5, 2026
2 checks passed
@abhay-codes07
abhay-codes07 deleted the feat/cost-measurement branch September 5, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants