Fine Tune Model to respond with 2 json objects depending on the question

I would like to fine tune my assistant to respond with 2 json objects depending on the question asked.

Example User message: Send a message to John and Adam saying lets hand out tonight.

The assistant response that I would like

{"name": "John", "text": "lets hand out tonight"}
{"name": "Adam", "text": "lets hand out tonight"}

Here is my jsonl training data i used but it does not seem to work

{"messages": [{"role": "system", "content": "Please only respond with json body"}, {"role": "user", "content": "send a message to John and Adam saying lets hand out tonight."}, {"role": "assistant", "content": "{\"name\": \"John\", \"text\": \"lets hand out tonight\"}"}, {"role": "assistant", "content": "{\"name\": \"John\", \"text\": \"lets hand out tonight\"}"}]}

I usually get an output like this from the assistant. This is not what I want
{"name": "John", "text": "lets hand out tonight"}

I don’t know that you need to necessarily fine tune a model to perform this task but that’s an aside….

I would have the model always return a single object with a value that’s an array capable of returning 1 or more message objects. If you use the new structured outputs support you can include a schema that forces the model to always return at least one message but allows for multiple messages to be returned

1 Like

I need help… I am trying to use completion legacy ive used it many times, not its telling me invaid model id… what do i do?

i tried using n=2 and it returns the same output twice. Thats not I want

??? Idk if you meant to post this on this thread

I am having the same problem and cannot get any answers…

1 Like