Build your own semantic search
Setup & orientation·2 min

Run the grader

0 / 2
# grade this stage (from your course directory)
npx theinference test --stage run-the-grader --watch

This is your first green check. It proves the loop works — edit, save, watch it grade — before you write any retrieval code. Every later step plugs into this exact loop, so it's worth landing the green here and watching how it feels.

The run / learn loop

You work in your own editor and terminal. The flow is:

  1. Log in (once): npx theinference login — approves in your browser, and passing stages then tick off here automatically
  2. Scaffold the course: npx theinference course start semantic-search ./semantic-search
  3. Install dependencies: cd semantic-search && npm install
  4. Run the grader in watch mode: npx theinference test --stage run-the-grader --watch

The grader runs your code, feeds it inputs, and compares the output to a frozen reference. --stage runs everything up to the stage you're on — each lesson shows its exact command — so a green run means your stage is done.

What to do

Your task

Run the grader

Nothing to write — the setup command is already wired in cli.ts. Run ./your_program.sh setup (or let the watcher run it). It should print semantic-search: toolchain OK. This proves your Node + tsx toolchain works before you write any code.

your_program.sh
./your_program.sh setup
How it's graded

process archetype — the harness execs your program with arg setup and asserts stdout is exactly semantic-search: toolchain OK. Green check = you're ready.

Keep the grader in a split pane
  • npx theinference test --stage <stage> --watch re-runs on every save — keep it open next to your editor, and bump --stage as you advance (each lesson shows its command).
  • Debug to stderr (console.error); the grader only reads stdout, so a stray console.log will fail an exact-match check.
  • Steps unlock in order — with --stage set, a fully green run means your current stage is complete.