How should TensorZero handle reasoning models? #816
Replies: 4 comments 1 reply
-
lgtm |
Beta Was this translation helpful? Give feedback.
-
thought content blocks make sense 👍 |
Beta Was this translation helpful? Give feedback.
-
We are also exploring this route for Claude. <custom_xml_tag_for_reasoning> Some generalized way to parse this type of output would be useful. |
Beta Was this translation helpful? Give feedback.
-
Closing: this was implemented a while ago. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Now that there are several reasoning models available it seems worth developing the abstractions for models which return thoughts alongside an answer. Here are the current implementations:
content
andreasoning_content
fields which give an answer as well as intermediate reasoning.My proposal: add a
ContentBlock::Thought
type that contains text and return it alongside all the other content blocks and store it alongside other content blocks. For models like O1, just don't include it. For models like Gemini and R1 where we can programmatically grab the reasoning, include the blocks in the store and returned responses. For models like QwQ, don't attempt to parse the output and just return everything as text.In the future we might adopt formats for our own trained models to "escape" reasoning from the generation. We should easily be able to parse out a
<thought> ... </thought>
block (for example) and do the same behavior as Gemini / R1. This sets the stage nicely also for a Chain of Thought variant type.Beta Was this translation helpful? Give feedback.
All reactions