-
Notifications
You must be signed in to change notification settings - Fork 941
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Statement
I think a good addition to the toon format would be to explicitly define the type of the output. For example, when working with output from LLMm it's useful to deserialize the output into a specific type, for example having structured defined using pydantic models.
Perhaps there is already a way to do this, but I couldn't find it. Lemme know if you think this is a good idea.
Proposed Solution
If given
context:
task: Our favorite hikes together
location: Boulder
season: spring_2025
friends[3]: ana,luis,sam
hikes[3]{id,name,distanceKm,elevationGain,companion,wasSunny}:
1,Blue Lake Trail,7.5,320,ana,true
2,Ridge Overlook,9.2,540,luis,false
3,Wildflower Loop,5.1,180,sam,true
it's not obvious what the type of the output is. We could augment the toon format with a type field, like this:
type: HikePlan[9]
context:
task: Our favorite hikes together
location: Boulder
season: spring_2025
friends[3]: ana,luis,sam
hikes[3]{id,name,distanceKm,elevationGain,companion,wasSunny}:
1,Blue Lake Trail,7.5,320,ana,true
2,Ridge Overlook,9.2,540,luis,false
3,Wildflower Loop,5.1,180,sam,true
This could be returned as the first line of the toon output, so that we can immediately see the type of the output and the number of lines of data we should read to deserialize the output into a specific type.
Alternatives Considered
No response
SPEC Compliance
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request