Smart Query analyzing sales trends

Hi folks,

I was wondering, if smart query can interpret sales trends similar to Chat GPTs Code Interpreter? In this article (Introducing Smart Block: Build with GPT-4 in Retool) it seems like something like this should be possible? It would be super interesting what trends AI would point out when looking at last weeks data etc.

I tried to hand in sales data from a table component as an array of objects. Unfortunately the smart query returns this error. (I already tried to hand data in as JSON.stringify(data) format but it also didn´t work)

Hi @Leon,

I'm looking into this! :thinking: If your app is blocked at the moment, the same query seems to work fine in a Retool Workflow

Hi @Leon!

This seems to be working for me now when I use JSON.stringify in my app queries :thinking: Can you try it with a smaller dataset?

I checked in with the team that owns this feature and they said that JSON.stringify should work. However, they also said that larger datasets may not be working properly and we are currently working on our error messaging to better surface that information to app editors -- the error improvements will ship next week

Hi Tess,

Thank you for your reply! Indeed, the error message seems to have changed. See my screenshot below:

If I online provide 15 rows I get similar success and text message to yours, so it works.

BUT for only 15 rows in big data or at least datasets > 50k rows, this tool seems useless :frowning: is there any other format I can parse the data in order not to use as many „tokens“ and what is equal to 1 token?



A helpful rule of thumb is that one token generally corresponds to ~4 text characters for common English text. This translates to roughly ¾ of a word (100 tokens ~= 75 words).

1 Like

Hi @Leon there is a similar convo happening here where my teammate mentions using vectors

Our team is currently working on an embeddings feature. I can post here when it ships to customers

1 Like