I’m curious if anyone has experience to share with using Document Agent to parse and extract data from a CSV or Excel file into a page list property in Pega.
I know that only certain LLM providers actually support CSV. Specifically, Google Gemini Flash and Google Gemini Pro are listed here in our documentation:
I was playing around with this in my demo instance, and I wasn’t able to get the Document Agent to extract the right information from the CSV and populate it as part of the case (using the Gemini Pro LLM). It seemed like it was making up data, rather than just pulling it from the CSV, and it was returning more rows in Pega than the rows of data or records that were even in the CSV. I tried to play around with the prompt with no luck.
When I saved the CSV as a PDF, the Document Agent was able to extract the data and populate the page list in Pega with no problem.
Has anyone been successful with using Document Agent to parse a CSV or Excel file? Or, should we recommend to save as a PDF if that’s an option?
Further, I know we have CSV parsing capabilities in the platform via the use of an Activity, so should that really be the recommended approach for clients that want to pull in data from a CSV?
Converting CSV to PDF file is a good solution. However, if there are requirements to parse multiple sheets then I recommend using OOTB activity to parse the data. Please find the below link on OOTB activity to parse excel.
I strongly agree to @RameshSangili post. I would Excel or csvs file expected to be structured and therefore stucture/read the input beforehand.
Funnily it seems that copilot and similars doing the same when using their chat interface.
Use Pega’s built-in pxParseExcel activity to parse Excel and CSV files into a page list property, as it handles structured data reliably without the hallucination issues seen with Document Agent. If the data is already in a CSV and converting is an option, saving it as a PDF first also works well for simple single-sheet files. Avoid using Document Agent for CSV/Excel parsing, as it is unreliable and prone to fabricating data.