Allowing the agent to extract information from a pdf

Hi everyone. Im starting to make some testing with UiPath Agent Builder. To start on, I would like to build a simply agent that just takes some mail from the inbox which can have pdfs attached, and I want the agent to decide which category should the mail be categorized on. For that, I want the agent to be allowed to extract the text and information from the attached pdf files. How could I do it? Thanks in advance all!

@javier.montes

the meta data of the mails will contain the attachment info as well so in the system prompt you can write that the information about categorizing would be in the attachment and let the agent read the attachments

cheers

Continuando la discusiĂłn desde Allowing the agent to extract information from a pdf:

First of all, thanks for your reply!

I have been thinking about it, but if you notice the incoming mail is going to have a content, which is text, and attached pdfs, which ARE NOT text. They are in fact files and you cannot tell the agent “take these files” if they are not string/text

@javier.montes

did you happen to try? because the pdf or attachment data would be read as a plain text ideally…please try giving a prompt or getting the info out to check the response

Its a trail and error we need to go with as this is still a relatively new feature to know the full capability

cheers

Yeah I have tried it and obviously it does not work. What I mean is that in some way i need to provide the agent a tool that allows it to extract information from the attached pdfs, but i do not know how to do it

@javier.montes

let me check right away on the same

cheers

Okay, nice. If you dont mind, could we please take a call so that you can help me?

@javier.montes

so now directly giving the email did not work as you mentioned

one way i see it is we can add another process as tool…so you can create a process to read the email and save the attachment …read content of it and send as input to the agent when you call it and then agent processes the info and decides on the category

I am trying the same as of now…you can also parallel try …adding process would actually help…also I am trying to use a chain of agent to summarize the info as well

cheers

okay im going to try it

@javier.montes

just to make it live and work on multiple processes i created two processes one to get message id of emails and other to take message id as input and read attachment …and in agent i am summarizing the details …so this is how it looks…

to showcase I just used a basic system prompt you can enhance it …but I hope this gives you a way to read the attachment

created two processes and added them via tools

it could identify the processes and then get message ids and for each id it did read the email and attachment and gave a summary

Hope this helps

cheers

1 Like