Finally my agent knows how to show the user which job positions are available and asking name and CV file. Saving the file is working and also getting the content from the file for the Agent’s use works now. Then I was facing the actual generative AI functionality where the Agent should compare the applied job description and CV file contents and tell what is missing or give suggestions.
Topic trigger could affect in middle of topic
I did my time struggling with the trigger prompt, so that the Agent would list the open positions for the applicant. First my Agent was asking the CV when the applicant was asking about the open job positions. By changing the topic trigger I got the Agent to list the open job positions, if the user had not asked about them before applying to a job.

I found out testing the Agent that if the applicant directly asked to apply for a job, the Agent could tell the open job positions for the user between the topic actions. Or just offer the open job positions proactively. In one case I was applying for a job and the Agent asked which position. I replied that “I don’t know” and it display me the open job positions in the middle of topic. I had this setting on in the Agent, so I allow it to do so. Later on I will change the position selection into choice list instead of free text.
I was thinking that if this is something that happens many times, maybe I should put it into a separate topic instead of this topic which takes the application and CV and saves into database.
I left getting the CV content into this topic which saves the file since when user saving new version of the CV, I need it to get the content from PDF into text format anyway. And that should be done only if the user has uploaded another CV. I updated the Agent Flow also checking the user name, so it will not create new Dataverse row every time user uploads new CV.
I created message in the end of the file handling topic that now the Agent will do the comparison and please wait a second.

Give parameters in generative answer’s prompt
Finally it was time to start doing the comparison between CV content and the job position description. I was thinking this could take many hours but was surprised that that was actually only one action in the topic. I did not know how the Generative answer works but figured out, that I should give there parameters in the prompt.

"Compare the following CV content with the knowledge source and identify if the candidate has experience relevant to role: " & Global.JobPosition & " CV Content: " & Global.CVcontent
Above is my first prompt and below the output. I went into error. I had set so that the action searches only knowledge source that contains Job Position table contents and did not allow classic AI to put it’s own hallucinations there.

AuthoringCanvas:AuthoringCanvasResources.TestChat.failureScenarioOptions.noSearchResultsText
Then I tried another type of prompt and got something out and the same error again.
"Based on the 'Job Description' and 'Requirements' in the knowledge source, does the following CV mention skills mentioned for 'Job Title':" & Global.JobPosition & " CV Content: " & Global.CVcontent

Finally I figured it out that instruct the generative answers to search from knowledge source, give the Dataverse table actual column names and put the CV content variable into the prompt. And then I hit it!
"From knowledge source get 'Job Title' " & Global.JobPosition & ". Get the 'Job Description' and 'Requirements' and compare them with CV Content: " & Global.CVcontent & ". Does the requirements fulfill in the CV content provided? What is missing, what is found?"

Success
Off course there needs to be a lot adjustments to do, but this is success to get the CV content and the AI to compare it with the knowledge source content. I think I should use more variables and prompts instead of traditional topic actions and questions. This section will take a lot of testing and prompting with various data to get it production ready. But for creating a demo, I think I will do it only so that my demo case looks good when I present this.
I also had some problem, which I posted in this next article.