Skip to content

Arith: lead with the answer + surprise me - #19

Closed
scheuclu wants to merge 1 commit into
mainfrom
feature/arith-answer
Closed

Arith: lead with the answer + surprise me#19
scheuclu wants to merge 1 commit into
mainfrom
feature/arith-answer

Conversation

@scheuclu

@scheuclu scheuclu commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Iteration 5 of the continuous-improvement loop. Independent off main — touches only app/arith/page.tsx, so it's mergeable on its own (not part of the word-dossier stack).

What

/arith showed a flat ranked list; the actual analogy answer was buried at #1. Now it reads like an answer.

  • Big animated "≈ {answer}" reveal — the top hit, in the shimmer treatment, with its cosine. So king − man + woman ≈ queen lands immediately. Click it to chain it into the equation. The remaining hits become a quieter "others nearby" list (same similarity bars).
  • "✦ surprise me" shuffles a curated set of analogies, filtered at runtime to ones whose terms are all in the corpus — so a shuffle never lands on a dead term.

Verified

  • next build clean.
  • Playwright: clicking the king − man + woman example renders ≈ queen (princess / prince / goddess / mother as others nearby).

🤖 Generated with Claude Code

The arithmetic page showed a flat ranked list; the actual analogy answer
was buried at position 1. Now it reads like one.

- Big animated "≈ {answer}" reveal (the top hit, shimmer, with its cosine),
  so "king − man + woman ≈ queen" lands immediately. Click it to chain it
  into the equation. Remaining hits become a quieter "others nearby" list
  (same similarity bars).
- "✦ surprise me" shuffles through a curated set of analogies, filtered at
  runtime to ones whose terms are all in the corpus (never a dead shuffle).

Independent of the word-dossier stack — touches only app/arith/page.tsx,
mergeable on its own.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
language-drift Ready Ready Preview, Comment Jun 6, 2026 11:09am

Request Review

Comment thread web/app/arith/page.tsx
Comment on lines +40 to +52
const SURPRISES: Term[][] = [
[{ sign: 1, word: "king" }, { sign: -1, word: "man" }, { sign: 1, word: "woman" }],
[{ sign: 1, word: "paris" }, { sign: -1, word: "france" }, { sign: 1, word: "germany" }],
[{ sign: 1, word: "paris" }, { sign: -1, word: "france" }, { sign: 1, word: "italy" }],
[{ sign: 1, word: "paris" }, { sign: -1, word: "france" }, { sign: 1, word: "japan" }],
[{ sign: 1, word: "better" }, { sign: -1, word: "good" }, { sign: 1, word: "bad" }],
[{ sign: 1, word: "bigger" }, { sign: -1, word: "big" }, { sign: 1, word: "small" }],
[{ sign: 1, word: "walking" }, { sign: -1, word: "walk" }, { sign: 1, word: "swim" }],
[{ sign: 1, word: "queen" }, { sign: -1, word: "woman" }, { sign: 1, word: "man" }],
[{ sign: 1, word: "london" }, { sign: -1, word: "england" }, { sign: 1, word: "spain" }],
[{ sign: 1, word: "summer" }, { sign: -1, word: "hot" }, { sign: 1, word: "cold" }],
[{ sign: 1, word: "doctor" }, { sign: -1, word: "hospital" }, { sign: 1, word: "school" }],
[{ sign: 1, word: "coffee" }, { sign: -1, word: "morning" }, { sign: 1, word: "night" }],

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

These should have at least 4 times as much, including some surprising ones...

@scheuclu scheuclu closed this Jun 6, 2026
@scheuclu
scheuclu deleted the feature/arith-answer branch June 6, 2026 15:38
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.

1 participant