hello
There are two way to achieve this :
1 : first with native capacity (i will explain below)
Pro : easy with few initial setup
Cons : limited to the global prompt
2 : As lorenzo said with "prompt" from the tool tab (also call AI builder prompt)
Pro : strong
Cons : you need some power platform skill because you will need some technical skill in low code to make everything "ok"
Detail version for case 1 (i reccomand to try this one first)
For easy document analyze you have the native document capacity of the agent, you could see in the settings this toggle :

As you see word are not by design , by default supported but there are work arround. (and 15mb limit file size)
whe the code interpreter is enable you could then process more advanced document natively in the chat
This way you could use the global prompt of the agent to use the input to look for another similar document in the knowledge base you linked here
Detail version for case 2 (with Ai builder)
I will suppose you already added like previous screen a sharepoint knowledge folder containing the template you wan't to use for compare
create a topic
Click the "+" to add a new prompt
Switch to gpt 5 chat because 4.1 mini will be not enough
Switch then to code interpreter because word are not supported by default : click on the "..." and settings
enable code interpret
Then click middle screen little cross to back on the prompt screen
then add a prompt like this one : "use this document wich is a Word Office document and product a summarize of this document" : this part is mega important "wich is a Word Office document" : it will know it has to use some "code" for reading word
how do you obtain a "document input" : i just pressed " / " and then a pop up appear and i select "document input"
Then choose the document and click test
Replace custom prompt by a name "test custom prompt" or whatever and save
you'r screen will look like this :

In input click on ... and then fx and add :
First(System.Activity.Attachments).Content
in out put create a new var , call it whatever you want
First : test it with a simple message box
you should have something very ugly prooving it worked
Then : it's ugly ^^ you wan't to control the search
go back to tthe topic : the "cool content" is in this part of the resultat variable :
what you want is to force the agent to do what you want. here you could use only the "global prompt" but you can do deeper and manualy force the agent
- Select a knowledge source with the document to compare
- force it to search only in it
So remove the message and add the "generative answer" node
add this kind of formula :
"Provide me the template that could match this description" & Topic.Var1.text
edit data source to filter on the data source wich containt file to compare :

and let's go :)
Please if this help you to solve the case it's important to mark the checkbox as answered to mark green the answer, it's very important for the community and search engine :) very important