問題文
A tool takes a date range. The agent sometimes passes a range where the end precedes the start, and the downstream service returns a confusing error that the agent then relays to the user. Where should this be handled?
選択肢
- Have the downstream service accept inverted ranges by swapping the two ordered values internally, so the call always succeeds.
- Add a sentence to the system prompt naming the start and end arguments explicitly, telling the agent never to invert the range.
- Catch the downstream error and retry the same call with the same arguments and a short computed backoff delay up to three times.
- Validate the arguments at the tool boundary and return a message that names the problem, so the agent can correct the call.