add efficiency leaderboard metric - #70
Conversation
|
@kevinfosterNG is attempting to deploy a commit to the sculpt Team on Vercel. A member of the Team first needs to authorize it. |
|
Sorry this sat so long. An efficiency metric (cost per token, or tokens per dollar) is a genuinely good idea for the board β it rewards something other than raw spend, which is worth having. Test-merged against current Two things to flag before you rebase:
|
|
Landed as #118, with you credited via I did rework the implementation, and it's worth saying why rather than just closing this. Sorting moved into the database. This PR sorted client-side over the ~25 rows already fetched, which answers "who is most efficient among the top 25 by cost" rather than "who is most efficient" β a different and much narrower question. It also forced Zero cost is NULL, not Infinity. A spend floor, which is the part I'd have missed without checking the data. Unfiltered, the top of the efficiency board was a $0.01 submission at 7M tokens/$ against a median of 1.2M β the ratio of a rounding error. The whole top of the ranking was noise. Above $100 it spans $112 to $11K of real spend and reads as a genuine ranking. 1,030 of 1,131 submissions qualify. Date filters disable it rather than falling back silently. The date-range board aggregates daily rows and has no stored ratio to order by, so offering the toggle there would show a cost ranking under an efficiency label. One thing your PR surfaced that I've filed separately: the unfiltered #1 was a username that's a shell fragment β Sorry this sat for seven weeks before getting a proper answer. |
What changed
Efficiencytab to the homepage leaderboard besideCostandTokenstotalTokens / totalCostand display it as aTok/$columnWhy
The homepage currently highlights spend and token volume, but it does not surface which submissions get the most tokens per dollar. This adds a focused third ranking mode without changing the database schema.
Impact
Users can now switch the root leaderboard to an efficiency-oriented view and identify the most cost-efficient submissions, while existing cost and token rankings remain unchanged.
Validation
pnpm buildpnpm exec tsc --noEmitFails in the current repo due to pre-existing type/config issues unrelated to this change.
pnpm lintFails in the current repo because the script still uses
next lint, which is invalid under the current Next.js setup.pnpm testFails in the current repo because the script runs
nodedirectly ontest/ccusage.test.mts.