← Back to context

Comment by nl

19 hours ago

Use function calling/tool use, not XML output. The models are all trained for that now.

Ie, instead of telling it to generate

  <name>Name</name>
  <age>19</name>
  <address>whatever</name>

give it a function

  details(name: string, age: int, address: string)

That is actually a JSON schema, and the models do great at it. Here's the claude docs, but they are all similar: https://platform.claude.com/docs/en/agents-and-tools/tool-us...