← Back to context

Comment by minimaxir

1 year ago

The documentation still advocates using XML tags as a subset of prompt engineering despite the push for JSON-based structured I/O, confusingly: https://docs.anthropic.com/en/docs/build-with-claude/prompt-...

The structured output tutorial uses the XML tags to wrap user input instead of using system prompt engineering and then passing the user input as-is (IMO system prompt engineering is still better since it adds more control levers): https://github.com/anthropics/courses/blob/master/tool_use/0...