I have a dataset of records. I want to use an object set defined by the user (a subset of those records) in a workshop page to create a new dataset containing that subset and perform an LLM function on a column of those records and display it back to the user on the workshop to accept or edit the plain text. The text should then be saved back to the dataset. Any help is much appreciated, thanks.
You can do this by creating an intermediary/output Object type (typeB), that you use as the output, which has duplicate properties of the “parent” Object (typeA).
That way you can make the selection in Workshop, run the LLM on the subset of typeA and write the results to the ontology as typeB, then display these and allow in-line edits on the properties you want the user to revise.
You probably want to have a few other properties on typeB to make it easier to filter these for the user, but showing the result of the LLM logic is relatively easy (look for Output Object Set in Workshop, when configuring your action).
Let me know if you need this solution in more detail.
@luca-mkbr Do you need the “new dataset” containing the subset of selected object records and the LLM-generated text for any practical purpose downstream? Or is the goal of your workflow to:
- Allow a user to select desired object records,
- Get an LLM to generate some sort of text like a summary or recommendation (is a user selects N records, will the LLM create N different bodies of text or just one that takes all N records into account?),
- Propose the body of text to the user in the Workshop module for them to review/edit/accept?
To Clarify:
Allow a user to select desired object records (through a picker in workshop)
Get an LLM to generate a text summary (a user selects N records, will the LLM create N different bodies of text for each record/object)
Propose the body of text to the user in the Workshop module for them to review, edit, and accept.
Got it makes sense. If you were to implement this for one object at a time, you’d simply create an AIP Logic function that handled the processing and return of a string output for the proposed text.
In your workshop variable, you could then create a function-backed string variable that calls the published AIP Logic function. You could then display that variable via a Markdown widget for a user’s review.
In a button group widget, you could set the on click behavior to the edit action type that would write a string value to the desired new property on the same object. In the action form, simply set the respective parameter default value to the same string variable. From there a user can still make edits if they wanted to before submitting the action.