Help me build an agent.
problem statement: user provides the XML input to the agent. the agent should be
able to identify the empty/blank/dash etc. spaces/fileds which are highlighted in
yellow colour. then agent needs to fill these spaces with input params given by
user. The input XML contains highlighted portions as <w:highlight w:val="yellow" />
in the run properties.
There is a "paraId" attribute that remains consistent between the template doc and
substitution doc (filled with values on epmty/dash/blank etc. places), meaning if I
get xml chunks like the below, I can use the paraId to find the part to substitute.
Consider below example for the date part. I've added the screenshot showing the
date and two party names provided by user have substituted the empty/blnk filds.
Help me build an agent.
problem statement: user provides the template XML of a pdf as input to the agent.
the agent should be able to identify the empty/blank/dash etc. spaces/fields which
are highlighted in yellow colour. then agent needs to fill the spaces with input
params given by user. The input XML contains highlighted portions as <w:highlight
w:val="yellow" /> in the run properties. I've added above 2 screenshots for your
reference. The first contains empty fields and 2nd screenshot contains filled with
values.
There is a "paraId" attribute that remains consistent between the template doc and
substitution doc (filled with values on epmty/dash/blank etc. places), meaning if I
get xml chunks like the below, I can use the paraId to find the part to substitute.
Consider below example for the date part. I've added the screenshot showing the
date and two party names (party A, party B) provided by user have substituted the
empty/blank fields. Write a generic agentic function or anything else you feel most
appropriate so that going forward, if the user provides new XML template, the agent
is able to locate the empty fields and fill them with the paramaters passed by user
based on the paraId.
<w:p w14:paraId="194191D7" w14:textId="77777777" w:rsidR="0092553B"
w:rsidRDefault="00000000">
<w:pPr>
<w:pStyle w:val="BodyText"/>
<w:spacing w:before="422"/>
<w:ind w:right="89"/>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:t>dated</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-4"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:t>as</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-4"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:t>of</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-16"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r w:rsidRPr="00811B2B">
<w:rPr>
<w:spacing w:val="-2"/>
<w:highlight w:val="yellow"/>
</w:rPr>
<w:t>.....................................................................</w:t>
</w:r>
</w:p>
<w:p w14:paraId="194191D7" w14:textId="77777777" w:rsidR="0092553B"
w:rsidRDefault="00000000">
<w:pPr>
<w:pStyle w:val="BodyText"/>
<w:spacing w:before="422"/>
<w:ind w:right="89"/>
<w:jc w:val="center"/>
</w:pPr>
<w:r>
<w:t>dated</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-4"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:t>as</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-4"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:t>of</w:t>
</w:r>
<w:r>
<w:rPr>
<w:spacing w:val="-16"/>
</w:rPr>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r w:rsidRPr="00811B2B">
<w:rPr>
<w:spacing w:val="-2"/>
<w:highlight w:val="yellow"/>
</w:rPr>
<w:t>.....................................................................</w:t>
</w:r>
</w:p>