Creating Object List from LLM

Does anyone know why when creating a list of objects the LLM outputs the following?

[0]

If I select a string as the output it generates all content and in a nice JSON format. I need that format to go into the object list. Appreciate the help, thanks.



Can you please post a screenshot of the expanded peopleSet - formatted block?

1 Like

@luca-mkbr I’ve had success with a similar workflow, by being very specific in the prompt strategy: Provide multiple examples of what the output should look like, and then add the actions/other tools needed to do what you want to do.

I am not seeing this in your logic chain, so if you want the LLM to create objects, you need to add in the actions, and show it what good looks like.

I’ve generally not had good results trying to get the LLM to output things that are too Foundry-specific, e.g. objects. More often than not it will start outputting more generic object types that, while close to what I want, isn’t the correct output. So rather dictate what this is and be specific about it.

Yes, I should have included that. Here it is. Thank you

@luca-mkbr it doesn’t look like you have given the LLM any tools to create these objects.

It almost looks like it’s doing what it should – it returns the email_id (0) in a list => [0].

Try giving it tools to create these objects in the Ontology, and see if that works.

Alternatively, you could also just work around the JSON output, as depending on the model it could be more consistent than tool usage.

In that case, you’d just output the JSON string, and parse that to a function that creates the objects from this.

Let me know which solution works best for your use case, and we can expand on it if needed.