Handle Large Plain Text as Inputs to Agents

Hello,

There are inputs file (.xml) - need to perform summarization on the complete file.
Can anyone suggest the best approach?

I tried the by converting the XML and Plain text (String). The process gives error

Error code: 400 - {‘error’: {‘message’: ‘Your input exceeds the context window of this model. Please adjust your input and try again.’, ‘type’: ‘invalid_request_error’, ‘code’: ‘context_length_exceeded’, ‘param’: ‘input’}}

I can’t use DeepRag or Anayze files directly ( do not support txt or xml files). Currently I converting these Files to PDF. Then trying to run through agent, but the run time has increased drastically.

@Ranveer_S_Thakur

Can you try before giving your raw xml data to agent, try to clean the data through UiPath studio, by using this clean the data like tags and all. And/Or split the data into small chunks.

Yes, chunking is the best approach for this scenario. Instead of converting the entire XML to plain text and sending it at once, first clean/remove unnecessary XML tags and metadata, then split the content into smaller logical chunks. Summarize each chunk separately and finally merge those summaries into a final summary. This helps avoid the model context limit error and is usually much faster than converting XML → PDF → Agent flow.