Notes:

Key XML Schema Background

XML Schema Definition (XSD): A formal specification that describes the structure and constraints of XML documents. XSD defines:

Simple Types: Basic data types like string, int, boolean, date, etc.

Complex Types: Types that can contain elements, attributes, or both. They define the structure of XML elements.

Elements vs Attributes:

Namespaces: Provide a way to avoid naming conflicts by qualifying element and attribute names.

XML Schema vs Type Definitions

Similar to JSON Schema, XML Schema can be verbose and complex. For LLM prompting, we propose using simplified "XML type definitions" like we do with JSON (see more below)


Design: ctx.output_format(type=xml)

Questions:

  1. Can a user swap between xml and non-xml programmatically?
    1. Only if they add another flag into their function, and use jinja templates to do so.