Document Extraction

Hi, I’m working on a POC to see how good a UiPath agent is in extracting data from PDF documents. My agent consumes the file and sends it to Claude for data extraction. Here are my queries:

  1. The agent cant work without Analyze Files tool because that is the only way for it to send the file to Claude. For this, it uses 3 PU, which is a lot. Any better way to do this?
  2. The processing time per file is 40 secs, which is a lot. Any way to reduce this?

I know we have IXP for document extraction, but I wanna get away from training and evaluation steps.

Any help is appreciated!

Hi @DGA

I think the cost and the 40 secs come from the same thing, sending the whole pdf means it goes through as a document/vision input, wich is heavy in both tokens and time

if your pdfs are digital and have a text layer, what i would try is extracting the text first in an rpa tool with Read PDF Text, and passing just that string to the agent instead of the file. No Analyze Files tool, no vision, way fewer tokens and it should cut the latency a lot. Only works if the pdf isnt scanned images though

and about wanting to avoid the training part, worth a second look at IXP, the generative extraction there doesnt need labeling or training at all, you just define the fields you want. So you would get the “no training” part you’re after without paying vision cost per file

hope this helps you :slight_smile:

Hi @DGA

You can try extracting the required text from the PDF first and then pass only that content to Claude instead of sending the complete file through Analyze Files.

This may help reduce both PU usage and processing time. For the 40-second processing time, using a faster model and sending less data may also help.

Hope this helps!

@DGA One approach you can try is to avoid using Analyze Files for every PDF.

If the PDFs are text-based, you can first extract the text using UiPath PDF activities and pass that extracted text to the Agent/Claude. Use Analyze Files only as a fallback for scanned PDFs or documents where normal text extraction is not sufficient. This may help reduce both PU consumption and processing time.

I would also suggest checking where the 40 seconds is actually being spent — PDF processing, Analyze Files, or the Claude call. That will help identify the real bottleneck.

For the POC, you could compare:

PDF → Analyze Files → Claude

vs.

PDF → Extract Text → Claude

Hi @DGA,

Your approach is possible. If the PDF is digital and contains a text layer, you can first use Read PDF Text to extract the required content and then pass only that text to the Claude/Agent instead of sending the complete PDF through Analyze Files.

This should help reduce both PU consumption and processing time, since the agent doesn’t need to process the entire document as a vision/file input.

For scanned PDFs, you may need OCR or Document Understanding instead.

Hope this helps!

Thanks for your inputs @Michael.Vornes @MayureshOfficial_45 @Dhruba_Jyoti_Kalita !!

The approach you all have suggested is also a part of my test. All the PDFs are scanned files, so I’m reading them with OCR and passing the text to my second agent that gets me the needed details. It works well as long as OCR extraction is good, and it also solves the problem of processing time (takes 8 secs) and PU consumption (consumes 1 PU).

What I’m really trying to do is compare UiPath and AWS agents. I’ve got 2 similar agents (for consuming PDF and text respectively) on AWS. The one that consumes PDF takes about 15 secs to get the job done. The reason I asked my first question about 40 secs processing time for UiPath agent was to be sure I’m doing it the right way. Let me know if you think there’s a better way to do this.

Appreciate your thoughts!

Hi @DGA,

Thanks for the clarification. I understand now that you’re mainly comparing the processing time and PU consumption between UiPath and AWS agents.

Since the PDFs are scanned, OCR is required. Your current approach of using OCR first and then passing the extracted text to the second agent seems like a good way to reduce processing time and PU consumption.

I’m also interested in finding out if there is a better approach in UiPath to further reduce the processing time compared with the ~40 seconds you’re seeing when processing the PDF directly.

If anyone has tried a similar PDF/document extraction scenario with UiPath Agents, I’d appreciate any suggestions or best practices for improving the performance.

Thanks!

Hi @DGA

If the main goal is PDF data extraction without training/evaluation, I would probably avoid using the Agent + Analyze Files for every document, especially if it is costing 3 PUs and ~40 seconds per file.

You could call the LLM directly through an API/HTTP request, send the PDF, and ask for a structured JSON response. This may give you more control over cost and processing time.

For a POC, I’d compare Agent + Analyze Files vs direct Claude API vs IXP on the same sample documents for accuracy, cost, and processing time.

If the documents are mostly consistent, direct LLM/API extraction could be a simpler option without going through the IXP training/evaluation process.

I’d first check the document type and how well the fields are defined in the taxonomy. A few representative samples with clear examples can make a big difference. Also worth checking the confidence scores before deciding whether the extraction actually needs fixing.