Can I use `response_format: {type: "json_schema", ...}` in fine-tuning?

The fine-tuning documentation includes an example with structured output. However, it doesn’t mention the new feature of structured outputs using response_format: {type: "json_schema", ...}, as detailed in the structured outputs guide.

Since tool calling is supported, can we assume that the new structured output feature is also supported in fine-tuning?

3 Likes

Welcome back! Hope you’ve been well.

I’m not sure off-hand, but following in case someone else knows.

Please let us know if you figure it out.

Also following in case someone else knows/has worked this out.

If it is supported, hopefully the documentation will be updated soon.

@nebojsa.vasiljevic have you had the chance to run any experiments with fine-tuning? I noticed that using the describe() method to document fields can act as a sort of ‘micro-prompt,’ providing a certain degree of control over the outcome. However, fine-tuning would likely yield better results overall. As an example I included a snippet below.

const Contact = z.object({
    name: z.string(),
    note: z.string().describe('Micro prompt here.'),
});

My test with gpt-4o-mini-2024-07-18

info: - 9:55:44 a.m.: The job failed due to an invalid training file. Invalid file format. Line 1, key “response_format”: Extra inputs are not permitted

3 Likes

My test with gpt-4o-2024-08-06

info: - 10:00:26 a.m.: The job failed due to an invalid training file. Invalid file format. Line 1, key “response_format”: Extra inputs are not permitted

3 Likes

bump,
any update on this?