Repository navigation
Arena · AGL-01 · Dispatch a tool call #77
Replies: 3 comments 3 replies
|
A worked example of what this thread is for — a deliberately wrong submission, so you can see what the reply looks like before you post your own. The Learn phase of The bot's reply shows why it is not. Note the 💡 lines — that is the point of each failing check, not just a diff. /lab AGL-01 def dispatch(tool_use, registry):
tid = tool_use.get("toolUseId")
fn = registry.get(tool_use.get("name"))
if fn is None:
return None
return {"toolResult": {"toolUseId": tid, "status": "success",
"content": [{"json": fn(**(tool_use.get("input") or {}))}]}} |
|
Trying the drill version — I fixed the None but left the except clause alone, curious what the bot says. /drill AGL-102 def dispatch(tool_use, registry):
tid = tool_use.get("toolUseId"); name = tool_use.get("name"); args = tool_use.get("input") or {}
fn = registry.get(name)
if fn is None:
return {"toolResult": {"toolUseId": tid, "status": "error",
"content": [{"text": f"No tool named {name!r}. Available: {', '.join(sorted(registry))}."}]}}
try:
result = fn(**args)
except Exception as exc:
return {"toolResult": {"toolUseId": tid, "status": "error", "content": [{"text": str(exc)}]}}
return {"toolResult": {"toolUseId": tid, "status": "success", "content": [{"json": result}]}} |
|
Predict drill. My reasoning: c2 fails at 400+900, the loop continues, c3 and c4 fit (950), c5 does not. So the packer dropped the second-best chunk and kept two lower-ranked ones — fuller, but not rank-faithful. /drill RET-101 answer = ["c1", "c3", "c4"] |
Uh oh!
There was an error while loading. Please reload this page.
Submissions for
AGL-01· Dispatch a tool call go here. A bot grades each one and replies in the thread.Brief: labs/catalog/agent-loop/AGL-01 ·
easy· ~20 min · trackagent-loopSubmit
The public checks and the Break phase run. Hidden checks do not — publishing their output would spoil this thread for everyone reading it. For those,
lab submit AGL-01in a Codespace or locally.Before you post
The Learn phase of this lab asks you to make a decision before writing code. Say what you chose and why — that is the part worth discussing, and it is what turns a thread of code blocks into something people read.
Wrap a full working solution in
<details><summary>so others can still attempt it.Stuck?
Post the attempt and the check you cannot pass. That gets better replies than silence, and the failing check's 💡 line usually names the reason.
Format and sandbox details: ARENA.md
All reactions