Open samuelcolvin opened 22 hours ago
We plan to add an examples builder which would take a sequence of things (e.g. pydantic models, dataclasses, dicts etc.) and serialize them.
Usage would be something like
from pydantic_ai import format_examples @agent.system_prompt def foobar(): return f'the examples are:\n{format_examples(examples, dialect='xml')}'
The suggest is that LLMs find it particularly easy to read XML, so we'll offer (among other formats) XML as way to format the examples.
By default, should it use
""" <example> <input> show me values greater than 5 </input> <sql> SELECT * FROM table WHERE value > 5 </sql> </example> ... """
or
""" <example input="show me values greater than 5" sql="SELECT * FROM table WHERE value > 5" /> ... """
?
im 99% sure is the first one
When you ask Claw to generate new meeting notes, this is basically what it will do: very, very simple XML.
We plan to add an examples builder which would take a sequence of things (e.g. pydantic models, dataclasses, dicts etc.) and serialize them.
Usage would be something like
The suggest is that LLMs find it particularly easy to read XML, so we'll offer (among other formats) XML as way to format the examples.
By default, should it use
or
?