Technical Requirement: Dynamic Context Injection via Entity Extraction
We are currently leveraging a Pega GenAI Agent to extract the ‘Employee Name’ entity from unstructured user prompts.
Once the name has been extracted, it will be passed as a parameter to D_Employee. This ensures that the Agent retrieves the necessary employee context at runtime. Consequently, the Agent will have gained full situational awareness before providing further assistance to the user.
So, how could I configure such a requirement with the Pega GenAI Agent rule?
can you try creating D_Employee as a parameterized Data Page and add EmployeeName as its input parameter.
Then create a Tool/knowledge source for the GenAI Agent that uses D_Employee as the source and exposes the same EmployeeName input.
Configure the Agent so the extracted Employee Name entity is passed into that tool input before the Agent answers.
This makes the Agent call D_Employee(EmployeeName) at runtime, fetch the employee record, and use that returned data as context for the response.
That is the clean way to inject dynamic context, because Pega agents retrieve knowledge from Data Pages and Data Pages support parameter-based lookups
If the Datapage param name is configured as “EmployeeName” and if the Agent instructions are clear to extract the name of Employee as EmployeeName, then ideally it should pass automatically knowing the context.