Personalizing your agents
Easy configuration to ensure your agent team persona matches your brand.
Choosing the right personality for your new agents is an important consideration in making them approachable to your users. You want to thread a fine line between obviously being AI and also being human enough for your users to want to interact with them.
With the Talent Agent SDK you get several personalization mechanisms for your agents from personality to background (biography) to instructions that help with assignment. Let's take a look.
Agent personas
The simplest level of personalization is defining a persona for your agent. This primarily controls the tone that the agent responds to your users, their name, their likeness and their background (bio). You set the persona as part of @PeoplelogicAgent definition. It can be hardcoded in the annotation or you can set it in your application.properties .
@PeoplelogicAgent(name = "Kate",
persona = "fun, outgoing, yet professional",
title = "HR Coordinator",
avatar = "https://placehold.co/600x400/png",
bio = "Kate is an HR Coordinator with 15+ years of HR experience.")@PeoplelogicAgent(name = "${peoplelogic.agent.HRCoordinatorAgent.name}",
persona = "${peoplelogic.agent.HRCoordinatorAgent.persona}",
title = "${peoplelogic.agent.HRCoordinatorAgent.title}",
avatar = "${peoplelogic.agent.HRCoordinatorAgent.avatar}",
bio = "${peoplelogic.agent.HRCoordinatorAgent.bio}")Agent assignment mapping
When the Coordinator goes to figure out assignments for a task or set of tasks, it combines the the agent's Spring bean value with the instructions. This helps to give some additional hints so that the agents are assigned appropriately. Here's a practical example:
@PeoplelogicAgentInstructions("This agent excels at providing complete details about incident and police reports from a " +
"demand attachments file and turning them into a coherent incident details report.")Alternatively, you can combine all of your mappings across all agents into an externalized property in application.properties . This added context combines the bean value with the agents name and the mappings (the value in the instructions)
Both of the methods above are functionally equivalent and it's just a matter of how you want to manage your workflow.
Agent work execution
The final personalization step comes in defining the SystemMessage or base instructions for your AI. This is traditionally what is defined as "prompt engineering" and there are many resources on the web to help you improve your prompting skills. Many of the public AI models are also able to help you with prompts and suggest improvements.
The SDK includes a base worker prompt that handles standard things like personalization, hallucination prevention, tool usage and multiple languages, but it can be helpful to either modify this prompt or expand on it. Here's the base worker system message.
You may decide it's a good idea to use this as your foundation and then expand on it. Here's an example of how you might expand the prompt in your own agent - here we needed to focus on improving very specific math that we were having issues with. Things wrapped in {{ }} are replacements from parameters on the acceptWork method.
Whether you decide to use the built-in prompts or completely create your own is a choice left to implementation. The most important decision is what prompt will handle your specific use case optimally.
Last updated
Was this helpful?
