Câu 34: CCA-F: Claude Certified Architect - Foundations
Your product search tool queries an external catalog API and returns matching items. In production, you observe the agent frequently retries searches immediately after receiving zero results, treating “no matches found” as a failure requiring retry. The external API returns HTTP 200 with an empty results array – a val…
Nội dung câu hỏi
Your product search tool queries an external catalog API and returns matching items. In production, you observe the agent frequently retries searches immediately after receiving zero results, treating “no matches found” as a failure requiring retry. The external API returns HTTP 200 with an empty results array – a valid response. How should you restructure the tool’s result to help the agent correctly interpret empty result sets?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. Add a suggestions field containing alternative search strategies when results are empty, helping guide the agent toward more productive follow-up queries.
- B. Return a natural language string describing the outcome, allowing the agent to interpret the result contextually based on the message content.
- C. Return a result object with isError: true and a message explaining no products matched.
- D. Return a structured result with a success boolean and results array, reserving isError: true for actual execution failures only. — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.