Explain Your Rules Desk

Your rules desk passes every check in Exercise: Build the Rules Desk, and you’ve seen it answer the café’s players using your own provider. The tests checked what your code does with fixed vectors and scripted records. They can’t check whether you can explain why the desk gave a wrong answer, or whether you could change the desk when the café asks for something new.

In this review, you’ll explain your desk to a mentor, tell a retrieval miss from a generation miss, defend where the desk’s embeddings come from, and make a change that no lesson has shown you. Start by getting your project ready so the session doesn’t stall while you look for a file.

Get Your Project Ready

The mentor will ask you to paste code and terminal output, so have these open before you start:

  • Your project folder in a terminal, with rules-desk.js, index-desk.js, and desk-question.js, and the files they import, such as embed.js and those in model/.
  • Your .env file, with MODEL_PROVIDER, your provider’s key, MAX_OUTPUT_TOKENS, and MODEL_TIMEOUT_SECONDS, as the project set them up.
  • A built index and a real run: Build desk-index.json, then ask the desk two questions—table 3’s about Summit Relay and table 1’s about a seventh player—and keep the output.

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.