RamiAwar / dataline

Chat with your data - AI data analysis and visualization on CSV, Postgres, MySQL, Snowflake, SQLite...
https://dataline.app
GNU General Public License v3.0
346 stars 26 forks source link

BUG - Token overflow when querying with data security off #169

Closed RamiAwar closed 1 month ago

RamiAwar commented 1 month ago

Data results are included completely in the LLM messages, which easily overflows tokens.

After investigating, even without data results, the tokens build up to quite some size when cycling through the state machine. It makes sense to limit the messages sent to the LLM within the state machine itself (not just at a conversation history level. As in, within a single run, LLM calls do not need to see everything from the beginning of the state machine run).

image