Page 10 of 13 · Drill it

The lab

Reading teaches you the vocabulary. Predicting what happens teaches you the subject. Commit to an answer first, then see what the real interpreter did. Every verdict, error and output in this lab came from an actual run.

Active recall

Pick a drill

Drill mode
Level
Score
0/ 0
Streak
0best 0
In set
36labs
Lab · level 1

The model invents a tool name. Does this run cleanly, or stop with an error?

class ToolNotFoundError(Exception):    passTOOLS = {"read_file": lambda path: "# README"}def dispatch(call):    if call["tool"] not in TOOLS:        raise ToolNotFoundError(call["tool"])    return TOOLS[call["tool"]](**call["args"])print(dispatch({"tool": "open_file", "args": {"path": "README.md"}}))

Keys: 1 to 2 to answer, Enter for the next one.

Reference

Error decoder

Most errors fall into a few patterns. Each entry shows the real error, what it means, the habit that avoids it, and a fixed version.

16 of 16 shown
[ ToolNotFoundError ] level 1

The model called a tool that does not exist

Means
The model invented or misremembered a tool name, and the harness had no fallback.
Habit
Return unknown-tool errors to the model with the list of real tools; keep tool names short and distinct.

[ RAISES ]recorded

class ToolNotFoundError(Exception):    passTOOLS = {"search_docs": lambda q: []}name = "search_documentation"if name not in TOOLS:    raise ToolNotFoundError(name)
Traceback (most recent call last): File "main.py", line 7, in <module> raise ToolNotFoundError(name)ToolNotFoundError: search_documentation

[ RUNS ]recorded

TOOLS = {"search_docs": lambda q: []}name = "search_documentation"print(TOOLS[name]("x") if name in TOOLS else "unknown tool, available: " + ", ".join(TOOLS))
unknown tool, available: search_docs