Fine-tuning GPT-4o: Structured Output Support and Data Preparation

Hi everyone,

I’m planning to fine-tune GPT-4o, and I’m wondering if it’s currently possible to set up the model for structured output. Specifically, can I use the openai.beta.chat.completions.parse method in Node.js to enforce a structured response using something like zodResponseFormat in the response_format?

Additionally, do the fine-tuning data need to be prepared in a specific way to support this functionality? Any insights or guidelines on this would be greatly appreciated!

Thanks!

1 Like

Hi,

Welcome.

Why are you using the Completions endpoint instead of an Assistant? (I’m just curious.)

If you finetune one of the models Structured Output is available on, then yes, in theory, you should be able to also enforce response_format, which happens at a later step in the process.

Hi @thinktank,

I am using the openai.beta.chat.completions.parse method because this is a highly supported formula for using structured response (by using zodResponseFormat & Zod library from npm as a value for response_format). It is also important that I develop a not-chat solution, but something like RAG.

1 Like