I am trying to get ChatGPT to read an 'aggregated' 'get range' google sheet containing training data but it only reads the first collection

I have created a scenario that checks my email, categorizes the email topic, then directs to various google sheets containing training data on that topic. The aggregator then aggregates the 'get range values" from that sheet and feeds it to chat gpt to craft a reply. Everything works fine except that chatgpt only appears to read the first collection in the single bundle created by the aggregator rather than all the collections.

Here is the general scenario

Here is the aggregator

Here is the chatgpt prompt

Any suggestions on how to get CHATgpt to read ALL the collections as training data would be very helpful. Thanks so much.

As a note,… a quick workaround that is a waste of tokens is that I simply put all the training data directly in the chat gpt prompt directly. This isn’t scalable to large datasets but it worked.

Hi @mabromwich,

How are you intending to pass the dataset to ChatGPT? If you want to pass it as a Comma Separated Values, what you can do instead of using Array Aggregator, Use Text Aggregator, and then use the output from there in ChatGPT?

Since You are using Array Aggregator it is really hard to convert it to a string, that you can pass it to ChatGPT. You can use Transform to JSON module if you want to pass prompt as JSON.

1 Like

THANK YOU. That solved it. I spent so many hours trying to get the array to send it, which it did, but not in a single long string, hence CHATGPT never really read it all. The text aggregator put it as an organized single string. Perfect. Thank you again. So easy - worked first time. I’m so glad I asked. :slight_smile:

1 Like

One other question,. in this same workflow if the user asks more than one type of question (drawing on training data from multiple sheets) the scenario breaks as the training data is specific for the type of question (for example a service question vs a job application). Is there anyway for CHATGPT to read/parse and output multiple bundles? I can only get it to output a single bundle, or get multiple answer variations to the same question but not multiple answers to different questions.