I’m working on a use case where I want to send daily sales reports (CSV format) to an LLM agent to generate summary and insights automatically.
Right now I’m considering two options:
Convert the CSV (from Google Sheets) into a single JSON object and send it directly to the LLM.
Upload the CSV into a vector store and let the LLM retrieve and analyze it from there.
My concern is that vector-based chunking might miss overall patterns or insights, while sending a large JSON might hit token limits. (I tried letting the LLM calculate the total sales, but it got the numbers wrong.
My goal is to get accurate, high-level analysis from these daily reports with minimal manual prep.
Would love to hear how others have handled similar cases. Any suggestions or alternatives are appreciated.
Why don’t you do the math yourself, send only the results to the LLM.
Calculate totals/averages in your preprocessing script
Send LLM a summary object with the numbers + a few sample rows
LLM writes the narrative, doesn’t calculate anything
This fixes the accuracy problem and avoids token limit
I prefer the first options because I do like to calculate it first before I’m talking to AI about my document. Basically, I would like to count average, summary, and total about the sales, and also adding top 5 products if it’s possible.
If you’re using AI Agent in the n8n workflow, I would prefer to directly call the google sheet without converting it and talk with AI to do thing with my sheet