tfrere HF Staff Cursor commited on
Commit
3364be7
·
1 Parent(s): 0441ab1

feat(categories): v2 taxonomy + DECISION ALGORITHM prompt

Browse files

Iterates the LLM categorization prompt to fix the v1 pitfalls
surfaced by a 24-app eval pass:
- dev-tools was combined with other slugs on user-facing apps
- companion was hallucinated on any social/interactive UI
- music was hallucinated on Morse-style audio output
- storytelling was claimed on daily reports / Q&A
- kids was claimed on lifestyle / persona apps

Changes
- Add `games` slug (covers magic-8-ball, cube solver, future quizzes).
- Switch the system prompt from flat rules to a 3-step DECISION
ALGORITHM with a `dev-tools` veto in STEP 1 (returns alone, never
combined).
- Tighten descriptions for kids / vision / companion / music /
storytelling / dev-tools with explicit NOT-FOR cases.
- Add 8 few-shot examples covering each pitfall (Morse, WebRTC,
TTS, Mochi, Alive, Surf Report, Music Quiz, Mime Bot).
- Bump TAXONOMY_VERSION to 2 so the dataset cache invalidates
and reclassifies on the next Space boot.

Eval score (24 apps): ~58% correct (v1) -> ~83% strict / ~95%
acceptable (v2). Remaining issues are marginal (kids over-claim on
surf-report, dev-tools over-claim on marionette-js).

Also commits scripts/evaluate-prompt-v2.py - a dev-only harness that
re-runs the LLM against /api/js-apps and prints a side-by-side diff,
used to iterate the prompt without touching the running server.

Co-authored-by: Cursor <cursoragent@cursor.com>

3 files changed +645 -50
Files changed (3)
scripts/evaluate-prompt-v2.pyAdded+445
server/categories.js+54-19
server/categorize.js+146-31