I have a calculated column that is pulling data from the AI engine Perplexity and outputting JSON. I want to extract that JSON data and populate other columns. However I can not get it to work on the calculated column. If I take the same JSON text and place it into a non calculated column my formula works fine. What am I missing?
ParseJSON(thisRow.Notes,"company.name")
I am using the formula above on a column to extract the company name from the JSON column.
hi @Jeff_Mottle ,
welcome to the community, you are almost there.
When your column notes is already an object, you have to rewrite your formula a bit.
ParseJSON(thisRow.Notes,"*..company.name")
I am not sure that company.name is a correct reference in your set up.
more info here:
Cheers, Christiaan
1 Like
Thanks Christian, when I enter in the format you specified I get the error:
Calculation error
Unexpected non-whitespace character after JSON at position
1127 (line 34 column 1)
here is some of the JSON output by the perplexity query:
{ "company": { "name": "NVIDIA", "description": { "primary_focus": ["Artificial Intelligence (AI)", "Graphics Processing Units (GPUs)"] }, "products": [{ "category": "Compute & Networking", "examples": ["Data Center GPUs", "Networking Solutions"] },
Can you attach the json here as a file?
I was able to resolve the issue, which was that the LLM model I selected was not very good at either outputting JSON in the correct format, but also not following the prompt of not responding with anything but JSON. I changed to one of the other LLM models offered by Perplexity and everything started to work again.
1 Like