Skip to content

[SUPPORT] Guidance on token counts for structured output schemas #2140

@wilfredjonathanjames

Description

@wilfredjonathanjames

It's easy to find methods to count tokens in messages, but so far I've had no luck finding guidance on the additional token count incurred when attaching a structured output schema.

Pure JSON string encoding the schema gives roughly twice as many tokens as actual usage, sometimes more, sometimes less, so I'm clearly missing something important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions