Run the grader
# grade this stage (from your course directory)
npx theinference test --stage run-the-grader --watchThis is your first green check. It proves the loop works — edit, save, watch it grade — before you write any pipeline code. Every later step plugs into this exact loop.
The run / learn loop
You work in your own editor and terminal:
- Log in (once):
npx theinference login— approves in your browser, and passing stages then tick off here automatically - Scaffold the course:
npx theinference course start rag-pipeline ./rag-pipeline - Install dependencies:
cd rag-pipeline && npm install - Run the grader in watch mode:
npx theinference test --stage run-the-grader --watch
For process steps the grader runs your program through ./your_program.sh <command> (which runs cli.ts) and compares stdout to a frozen reference. For adapter steps it calls a function from tests/adapters.ts on fixed inputs and compares the returned numbers. Steps unlock in order.
What to do
Run the grader
Nothing to write — the setup command is already wired in cli.ts. Just run the grader and watch this step pass.
case "setup": {
console.log("setup");
break;
}
Unlike the real-world version, there is no model download. The vendored corpus, QA set, and the recorded cassette all live in fixtures/data/, and the embedder is pure n-gram hashing — so everything runs offline and deterministically. (See NOTES.md for the SQuAD + MiniLM upgrade path.)
npx theinference test --stage <stage> --watchre-runs on every save — bump--stageas you advance (each lesson shows its command).- Debug to stderr (
console.error); the grader only reads stdout, so a strayconsole.logwill fail an exact-match check. - With
--stageset, a fully green run means your current stage is complete.
How it's graded
Your program is run as ./your_program.sh setup. Its stdout must be exactly:
setup