Agent Decision Testing
An agent makes two decisions per step: which tool, and with what arguments. Testing only the first one leaves the dangerous half uncovered.
9 min read9 মিনিটে পড়া যায় · 6 sections6টি সেকশন · 2 sources2টি সোর্স · updated Nov 2026আপডেট: Nov 2026
Testing which tool the agent choosesagent কোন tool বাছে তা টেস্ট করা
Run five cases through the agent, see mismatches, then trap the agent in a loop with a stub that never changes.agent-এর ওপর পাঁচটা কেস চালান, গরমিল দেখুন, তারপর যে stub বদলায় না তা দিয়ে agent-কে লুপে আটকান।
You’ll learnআপনি শিখবেন
- How to check which tool was chosenকোন tool বাছা হলো তা কীভাবে মেলাবেন
- Why arguments need their own testarguments-এর আলাদা টেস্ট কেন লাগে
- What the agent should do with no order idorder id না থাকলে agent কী করবে
- How a cap on calls finds a loopকলের cap কীভাবে লুপ ধরে
- What a recovery test assertsরিকভারি টেস্ট কী assert করে
In plain words
For each step, the agent answers two questions: which tool and with what arguments. These fail differently and the second is more dangerous.
Tool selection fails when two tools look applicable. "Cancel my order" might match cancel_order or modify_order, and the model has no reason to prefer one. The fix is usually in the tool descriptions, which are prompt text Source 1সোর্স 1.
Argument extraction fails when the argument is in the conversation but implied rather than stated: "the blue one, last Tuesday" when the tool needs a product id and a date. The agent has to connect two pieces of context. A hallucinated argument here is the dangerous case, because the tool is the right one and the call goes through.
Three more decision behaviours matter:
- Tool chaining. Some tasks need a tool's output to feed the next tool. A model that calls them in the wrong order produces a confident wrong answer.
- Loop detection. The agent calls the same tool with the same arguments again. It happens when the tool returns an error the agent does not understand, and it burns the budget.
- Error recovery. When a tool raises, the agent should try something else or report the failure, not repeat the same call.
The measurement for all of these is a decision accuracy against a labelled set of situations, and it is measured per situation, not overall.
সহজ English
At each step, the agent answers two questions: which tool and with what arguments. These fail in different ways. The second one is more dangerous.
Tool selection fails when two tools both look right. "Cancel my order" might match cancel_order or modify_order. The model has no reason to prefer one. The fix is usually in the tool descriptions, which are prompt text Source 1সোর্স 1.
Argument extraction fails when the argument is in the conversation but only hinted at, not stated. One example is "the blue one, last Tuesday" when the tool needs a product id and a date. The agent must connect two pieces of context. A made-up argument here is the dangerous case. The tool is the right one, so the call goes through.
Three more behaviours matter:
- Tool chaining. Some tasks need one tool's output to feed the next tool. If the model calls them in the wrong order, it gives a confident wrong answer.
- Loop detection. The agent calls the same tool with the same arguments again. This happens when the tool returns an error the agent does not understand. It uses up the budget.
- Error recovery. When a tool raises an error, the agent should try something else or report the failure. It should not repeat the same call.
The measure for all of these is decision accuracy against a labelled set of situations. It is measured per situation, not overall.
বাংলা ব্যাখ্যা
প্রতিটা ধাপে agent দুটো প্রশ্নের উত্তর দেয়: কোন tool আর কী arguments দিয়ে। এগুলো আলাদা ভাবে ভাঙে, আর দ্বিতীয়টা বেশি বিপজ্জনক।
Tool বাছা ভাঙে যখন দুটো tool প্রযোজ্য মনে হয়। "Cancel my order" হয়তো cancel_order বা modify_order — দুটোর সাথেই মিলে যায়, আর model-এর একটাকে বেছে নেওয়ার কোনো কারণ নেই। সমাধান সাধারণত tool-এর বর্ণনায়, যেটা prompt text Source 1সোর্স 1।
Argument বের করা ভাঙে যখন argument কথোপকথনে আছে কিন্তু বলা নেই: "নীলাটা, গত মঙ্গলবার" যখন tool-এর product id আর date দরকার। agent-কে দুটো context জোড়া লাগাতে হয়। এখানেই বানানো argument বিপজ্জনক, কারণ tool-টা সঠিক আর call চলে যায়।
আর তিনটা আচরণ গুরুত্বপূর্ণ:
- Tool chaining। কিছু কাজে একটা tool-এর ফলাফল পরের tool-এ যেতে হয়। ভুল ক্রমে ডাকলে confident ভুল উত্তর আসে।
- Loop detection। agent একই tool একই argument দিয়ে আবার ডাকে। এটা হয় যখন tool এমন error দেয় যেটা model বোঝে না, আর বাজেট পুড়ে।
- Error recovery। tool ব্যর্থ হলে agent অন্য কিছু চেষ্টা করা বা ব্যর্থতা জানানো উচিত, একই call না করে।
এগুলোর মাপ হলো একটা labelled situation set-এর বিপরীতে decision accuracy, আর সেটা পরিস্থিতি অনুযায়ী মাপা হয়, সামগ্রিকভাবে নয়।
How it works
The tool selection test compares the chosen tool against the expected one. The dataset is a list of situations, each with the tool that should be called:
# These tool names belong to an example order-support agent.
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]The argument extraction test is the same shape, and it needs the expected arguments as well as the tool:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]The second case is the interesting one, because the order id has to come from somewhere the user did not state in the question. It comes from the conversation, so the test has to set up the conversation first.
The hallucinated argument is caught by a test that asserts the argument is not invented:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"The agent should have asked which order. Inventing an id means cancelling someone else's order.
The loop test uses a tool that always returns the same thing, so the agent has no new information and should stop:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"And the recovery test makes the tool raise:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool and trace.called_same_tool_repeatedly_more_than are the tutorial's own fixtures and trace helpers, not a library API. constant_search_tool is a stub search_web that always returns the same result.
The trace is what makes the decision measurable. A trace shows the tool sequence with the arguments, so the decision accuracy can be computed per situation rather than guessed Source 2সোর্স 2.
সহজ English
The tool selection test checks the chosen tool against the expected one. The dataset is a list of situations. Each one names the tool that should be called:
# These tool names belong to an example order-support agent.
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]The argument extraction test has the same shape. It needs the expected arguments as well as the tool:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]The second case is the interesting one. The user did not state the order id in the question. It comes from the conversation. So the test has to set up the conversation first.
A hallucinated argument is an invented one. A test catches it by asserting that the argument was not made up:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"The agent should have asked which order. Inventing an id means cancelling someone else's order.
The loop test uses a tool that always returns the same thing. The agent gets no new information, so it should stop:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"The recovery test makes the tool raise an error:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool and trace.called_same_tool_repeatedly_more_than are the tutorial's own fixtures and trace helpers. They are not a library API. constant_search_tool is a stub search_web that always returns the same result.
The trace makes the decision measurable. It shows the tool sequence with the arguments. So decision accuracy can be computed per situation instead of guessed Source 2সোর্স 2.
বাংলা ব্যাখ্যা
tool বাছা টেস্ট বেছে নেওয়া tool-কে প্রত্যাশিত tool-এর সাথে তুলনা করে। dataset হলো পরিস্থিতির তালিকা, প্রতিটিতে কোন tool ডাকা উচিত:
# এই tool-এর নামগুলো একটা উদাহরণ order-support agent-এর।
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]argument বের করা টেস্ট একই গঠনের, আর এতে প্রত্যাশিত arguments-ও লাগে:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]দ্বিতীয় কেসটাই আকর্ষণীয়, কারণ order id আসতে হয় এমন জায়গা থেকে যেখানে ব্যবহারকারী প্রশ্নে বলেনি। সেটা কথোপকথন থেকে আসে, তাই টেস্টে আগে কথোপকথন সাজাতে হয়।
বানানো argument ধরা পড়ে এমন টেস্টে যে assert করে argument বানানো হয়নি:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"agent-এর জিজ্ঞেস করা উচিত ছিল কোন অর্ডার। id বানালে অন্যের অর্ডার বাতিল হয়ে যায়।
loop টেস্ট এমন একটা tool ব্যবহার করে যা সবসময় একই জিনিস ফেরত দেয়, তাই agent-এর নতুন তথ্য হয় না এবং সে থামা উচিত:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"আর recovery টেস্ট tool-কে exception ছুঁড়াতে দেয়:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool আর trace.called_same_tool_repeatedly_more_than টিউটোরিয়ালের নিজস্ব fixture ও trace helper, কোনো library API নয়। constant_search_tool একটা stub search_web যা সবসময় একই ফলাফল দেয়।
trace-ই সিদ্ধান্তকে মাপযোগ্য করে। একটা trace দেখায় tool-এর ক্রম আর arguments সহ, তাই পরিস্থিতি অনুযায়ী decision accuracy হিসাব করা যায় অনুমান না করে Source 2সোর্স 2।
In practice
The tool-selection test compares the chosen tool against the expected one, and the dataset is a list of situations with the tool that should be called:
# These tool names belong to an example order-support agent.
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]The argument-extraction test is the same shape, and it needs the expected arguments as well as the tool:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]The second case is the interesting one, because the order id has to come from somewhere the user did not state in the question. It comes from the conversation, so the test has to set up the conversation first.
The hallucinated argument is caught by a test that asserts the argument is not invented:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"The agent should have asked which order. Inventing an id means cancelling someone else's order.
The loop test uses a tool that always returns the same thing, so the agent has no new information and should stop:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"And the recovery test makes the tool raise:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool and trace.called_same_tool_repeatedly_more_than are the tutorial's own fixtures and trace helpers, not a library API. constant_search_tool is a stub search_web that always returns the same result.
The trace is what makes the decision measurable. A trace shows the tool sequence with the arguments, so the decision accuracy can be computed per situation rather than guessed Source 2সোর্স 2.
সহজ English
The tool-selection test checks the chosen tool against the expected one. The dataset is a list of situations, each with the tool that should be called:
# These tool names belong to an example order-support agent.
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]The argument-extraction test has the same shape. It needs the expected arguments as well as the tool:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]The second case is the interesting one. The user did not state the order id in the question. It comes from the conversation. So the test has to set up the conversation first.
The hallucinated argument is an invented one. A test catches it by asserting that the argument was not made up:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"The agent should have asked which order. Inventing an id means cancelling someone else's order.
The loop test uses a tool that always returns the same thing. The agent gets no new information, so it should stop:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"The recovery test makes the tool raise an error:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool and trace.called_same_tool_repeatedly_more_than are the tutorial's own fixtures and trace helpers. They are not a library API. constant_search_tool is a stub search_web that always returns the same result.
The trace makes the decision measurable. It shows the tool sequence with the arguments. So decision accuracy can be computed per situation instead of guessed Source 2সোর্স 2.
বাংলা ব্যাখ্যা
tool বাছা টেস্ট বেছে নেওয়া tool-কে প্রত্যাশিত tool-এর সাথে তুলনা করে, আর dataset হলো পরিস্থিতির তালিকা, প্রতিটিতে কোন tool ডাকা উচিত:
# এই tool-এর নামগুলো একটা উদাহরণ order-support agent-এর।
SELECTION_CASES = [
("Cancel order 1001, I changed my mind", "cancel_order"),
("Where is my order?", "track_order"),
("I want to change my delivery address", "modify_order"),
("How much is 17 percent of 420?", "calculate"),
("What is your refund policy?", "search_web"),
]argument বের করা টেস্ট একই গঠনের, আর এতে প্রত্যাশিত arguments-ও লাগে:
ARGUMENT_CASES = [
(
"Cancel order 1001, I changed my mind",
"cancel_order",
{"order_id": "1001", "reason": "changed_mind"},
),
(
"The blue laptop I ordered on Tuesday",
"cancel_order",
{"order_id": "1007", "reason": "changed_mind"},
),
]দ্বিতীয় কেসটাই আকর্ষণীয়, কারণ order id আসতে হয় এমন জায়গা থেকে যেখানে ব্যবহারকারী প্রশ্নে বলেনি। সেটা কথোপকথন থেকে আসে, তাই টেস্টে আগে কথোপকথন সাজাতে হয়।
বানানো argument ধরা পড়ে এমন টেস্টে যে assert করে argument বানানো হয়নি:
def test_the_agent_does_not_invent_an_order_id(agent, trace):
agent.run("Cancel my order")
cancels = [c for c in trace.tool_calls if c.name == "cancel_order"]
assert cancels == [], "the agent called cancel_order without knowing which order"agent-এর জিজ্ঞেস করা উচিত ছিল কোন অর্ডার। id বানালে অন্যের অর্ডার বাতিল হয়ে যায়।
loop টেস্ট এমন একটা tool ব্যবহার করে যা সবসময় একই জিনিস ফেরত দেয়, তাই agent-এর নতুন তথ্য হয় না এবং সে থামা উচিত:
def test_the_agent_stops_when_the_tool_stops_being_useful(agent, trace, constant_search_tool):
agent.run("Find a laptop under 500 with no reviews")
calls = [c for c in trace.tool_calls if c.name == "search_web"]
assert len(calls) <= 3, f"the agent searched {len(calls)} times"আর recovery টেস্ট tool-কে exception ছুঁড়াতে দেয়:
def test_the_agent_recovers_from_a_tool_error(agent, trace, broken_tools):
broken_tools.fail("search_web")
answer = agent.run("What happened in the news today?")
assert "could not" in answer.lower() or trace.used_other_tool
assert not trace.called_same_tool_repeatedly_more_than(2)constant_search_tool, broken_tools, trace.used_other_tool আর trace.called_same_tool_repeatedly_more_than টিউটোরিয়ালের নিজস্ব fixture ও trace helper, কোনো library API নয়। constant_search_tool একটা stub search_web যা সবসময় একই ফলাফল দেয়।
trace-ই সিদ্ধান্তকে মাপযোগ্য করে। একটা trace দেখায় tool-এর ক্রম আর arguments সহ, তাই পরিস্থিতি অনুযায়ী decision accuracy হিসাব করা যায় অনুমান না করে Source 2সোর্স 2।
Common mistakes
Mistake 1: only testing tool selection. The arguments are where the damage happens, because the tool is right and the call still goes through.
Mistake 2: asserting the tool but not the arguments. "cancel_order" being called proves nothing about which order was cancelled.
Mistake 3: no hallucinated-argument case. The agent fills a missing argument rather than asking for it.
Mistake 4: no loop case. Every test goal is solvable, so the stopping logic is never exercised.
Mistake 5: no tool-error case. The tool that always succeeds hides the recovery bug.
Mistake 6: one accuracy number for all situations. A model that is perfect on single-tool tasks and wrong on two-tool tasks still looks fine overall.
সহজ English
Mistake 1: only testing tool selection. The damage happens in the arguments. The tool is right, so the call still goes through.
Mistake 2: checking the tool but not the arguments. Seeing "cancel_order" called does not tell you which order was cancelled.
Mistake 3: no hallucinated-argument case. The agent fills in a missing argument instead of asking for it.
Mistake 4: no loop case. Every test goal can be solved, so the stopping logic is never exercised.
Mistake 5: no tool-error case. A tool that always succeeds hides the recovery bug.
Mistake 6: one accuracy number for all situations. A model can be perfect on single-tool tasks and wrong on two-tool tasks. It still looks fine overall.
বাংলা ব্যাখ্যা
Mistake 1: শুধু tool বাছা টেস্ট করা। arguments-এই ক্ষতি হয়, কারণ tool সঠিক আর call তবু চলে যায়।
Mistake 2: tool assert করা কিন্তু arguments নয়। "cancel_order" ডাকা হয়েছে প্রমাণ করে না কোন অর্ডার বাতিল হলো।
Mistake 3: বানানো argument-এর কেস নেই। agent ঘাটতি argument না জিজ্ঞেস করে পূরণ করে দেয়।
Mistake 4: loop কেস নেই। প্রতিটা test goal সমাধানযোগ্য, তাই শেষ হওয়ার logic কখনোই পরীক্ষিত হয় না।
Mistake 5: tool error কেস নেই। সবসময় সফল হওয়া tool recovery বাগ ঢেকে দেয়।
Mistake 6: সব পরিস্থিতির জন্য একটা accuracy সংখ্যা। এক-tool কাজে পারফেক্ট আর দুই-tool কাজে ভুল model-ও গড়ে ভালো দেখায়।
What a tester can check
Tutorial advice
This advice is the tutorial's own. It does not come from the sources.
- Keep the selection cases and the argument cases in one file. They are the same situations seen from two angles.
- Write the argument case with the conversation that makes the argument available. A test that gives the id in the question tests nothing.
- For every destructive tool, assert the arguments against a known set of valid ids. A wrong id is a wrong customer.
- Cap the tool calls in the fixture and assert the cap. The cap is the loop detector.
- Include one case where two tools are both plausible and name the expected one. That is where the descriptions decide.
- Report the decision accuracy per situation class. The overall number is for the dashboard; the per-class number is for the fix.
সহজ English
Tutorial advice
This advice is the tutorial's own. It does not come from the sources.
- Keep the selection cases and the argument cases in one file. They are the same situations seen from two angles.
- Write the argument case with the conversation that makes the argument available. A test that gives the id in the question tests nothing.
- For every destructive tool, assert the arguments against a known set of valid ids. A wrong id is a wrong customer.
- Cap the tool calls in the fixture and assert the cap. The cap is the loop detector.
- Include one case where two tools are both plausible and name the expected one. That is where the descriptions decide.
- Report the decision accuracy per situation class. The overall number is for the dashboard; the per-class number is for the fix.
বাংলা ব্যাখ্যা
Tutorial advice
এই পরামর্শ টিউটোরিয়ালের নিজস্ব। এটি সোর্স থেকে আসেনি।
- selection case আর argument case এক ফাইলে রাখুন। এগুলো একই পরিস্থিতির দুই দিক থেকে দেখা।
- argument case-টা সেই কথোপকথনসহ লিখুন যেখানে argument পাওয়া যায়। যে টেস্টে id প্রশ্নেই দেওয়া, সেটা কিছুই পরীক্ষা করে না।
- প্রতিটি ধ্বংসাত্মক tool-এর arguments একটা জানা বৈধ id-এর set-এর বিপরীতে assert করুন। ভুল id মানে ভুল customer।
- fixture-এ tool call-এর সংখ্যা ক্যাপ করে সেই ক্যাপ assert করুন। ক্যাপটাই loop detector।
- এমন একটা কেস রাখুন যেখানে দুটো tool-ই যুক্তিসঙ্গত আর প্রত্যাশিতটার নাম লেখা আছে। ঠিক এখানেই বর্ণনা ঠিক করে।
- পরিস্থিতির ধরন অনুযায়ী decision accuracy রিপোর্ট করুন। সামগ্রিক সংখ্যা dashboard-এর জন্য; ধরন অনুযায়ী সংখ্যা সমাধানের জন্য।
Key words
| Word | What it means |
|---|---|
| Tool selection | The decision of which tool to call |
| Argument extraction | The decision of what values to pass to the tool |
| Hallucinated argument | A value the agent filled in rather than asking for |
| Tool chaining | Feeding one tool's output into the next |
| Loop detection | Catching the agent calling the same tool with the same arguments |
| Error recovery | What the agent does after a tool raises |
| Decision accuracy | The rate of correct tool and argument choices, per situation class |
| Invalid argument | A value the tool accepts but that names the wrong thing |