Az egyik leggyakoribb kérés, amit a tehetségmenedzsmentben dolgozó barátainktól kérnek, hogy segítsenek valakinek egy nehéz beszélgetésen keresztül edzeni, vagy felkészüljenek vezetőkként. Bár ez gyakran a munka egyik legélvezetesebb része, kihívást jelenthet a menedzser vagy a munkavállaló igényeinek megfelelő edzés biztosítása anélkül, hogy a teljes adatkészlet lenne. Szerencsére ez az, ahol a Talent Agent SDK és a HR és az IT kereszteződése valóban ragyog. Vessünk egy pillantást egy gyors coaching ügynök építésére a Slack-ban, amely segít megoldani ezt a problémát. Előfeltételek Hagyjuk, hogy az ügynök SDK végezze el a legtöbb nehéz emelés itt, és húzza a HRBP ügynök és a HR elemző ügynök, hogy segítsen nekünk. Először is, keresse fel a Peoplelogic.dev-t, hogy biztosítsa az ügynök SDK homokozóját Következő, klónozza az ügynök SDK indító https://github.com/peoplelogic/agent-sdk-starter Ezután engedélyezzük a HRBP-t és a HR elemzőt az src/main/resources/application.properties területén: peoplelogic.agent.HRBusinessPartnerAgent.enabled=true peoplelogic.agent.HRAnalystAgent.enabled=true Állítsa be a coaching eszközt A HRBP ügynök coaching funkciójának hozzáadásához új eszközt kell létrehoznunk. Ezt egy új Az SDK egyéb összetevőivel is fogunk dolgozni, amikkel együtt kell dolgoznunk. Kezdődik az útmutató @PeoplelogicTool @PeoplelogicTools("hrbp-coaching-tools") public class HRBPCoachingTools { @Autowired PersonalContentRetriever personalContentRetriever; @Autowired @Qualifier("apmContentRetriever") ContentRetriever apmContentRetriever; @Autowired CustomerKnowledgeContentRetriever customerKnowledgeContentRetriever; @Autowired ChatMemoryProvider chatMemoryProvider; @Autowired ChatModel chatLanguageModel; @Autowired HRAnalystAgent analyst; HRBusinessPartnerAgent agentWithFiles; } Eddig olyan jó - olyan összetevőket hoztunk be, amelyek segítenek nekünk a szervezetből adatokat gyűjteni, és a beszélgetésen keresztül is feltöltöttük, és néhány alapvető összetevőt, például a csevegési modellt és a memóriát hoztunk be, hogy ügynökeink néhány felülvizsgálatát beállíthassuk. A meghatározás: agentWithFiles private final String COACHING_CONVERSATION_SEGMENT = "You are providing structured coaching guidance for managers based on company-provided training materials, performance documentation, values, employee history, and engagement insights. " + "Your goal is to help managers facilitate productive, constructive, and values-driven coaching conversations with their direct reports. " + "Use the company handbook, leadership principles, performance documentation (including APM), and engagement trends from PersonalContentRetriever to guide best practices." + "Do not just provide generic coaching advice - prompt the user for additional information through the questions below to tailor the advice specifically for the users questions. " + "\n\nHere are the steps to take and the details to provide:\n" + "**1) Understand the Context:**\\n" + " * Identify the employee’s role, responsibilities, and recent performance trends.\\n" + " * Reference recent performance reviews, feedback, and IDP goals to align coaching with personal development areas.\\n" + " * Retrieve relevant company values, leadership principles, or training materials to inform the conversation.\\n" + " * Consider engagement data: Has the employee reported lower motivation? Are they flagged for burnout risk? Have survey responses indicated disengagement or stress?\\n" + " * Review prior coaching conversations for continuity.\\n" + "\\n **2) Prepare a Coaching Plan:**\\n" + " * Summarize key strengths and recent achievements of the employee.\\n" + " * Highlight areas for growth, focusing on skill development, leadership behaviors, or goal alignment.\\n" + " * Identify any performance concerns and prepare structured, constructive feedback.\\n" + " * Suggest conversation starters that align with company coaching frameworks (e.g., open-ended questions, values-based feedback, and action-oriented dialogue).\\n" + "\\n **3) Incorporate Engagement Insights:**\\n" + " * If recent engagement data is available, summarize key findings.\\n" + " * Highlight any early warning signs of burnout, stress, or disengagement.\\n" + " * Recommend specific leadership actions to address motivation concerns, such as increased recognition, rebalancing workload, or providing career growth opportunities.\\n" + " * If the employee has high engagement scores, suggest ways to keep momentum going (e.g., stretch assignments, mentorship roles).\\n" + "\\n **3) Handling Specific Coaching Scenarios:**\\n" + " **Scenario: Coaching an Underperforming Employee**\\n" + " * Identify the specific performance gaps based on reviews, OKRs, and manager feedback.\\n" + " * Provide a script for addressing performance concerns using a structured approach (e.g., SBI: Situation-Behavior-Impact).\\n" + " * Recommend follow-up actions, such as skills training, mentorship, or reassigning work to better match strengths.\\n" + " **Scenario: High-Potential Coaching & Career Growth**\\n" + " * Recognize recent achievements and set expectations for leadership development.\\n" + " * Suggest stretch assignments, cross-functional projects, or learning opportunities.\\n" + " * Align growth plans with company goals to maximize impact.\\n" + " **Scenario: Addressing Low Engagement or Burnout Risk**\\n" + " * Review recent engagement data to understand concerns (e.g., workload, manager relationships, career stagnation).\\n" + " * Provide conversation starters to uncover underlying challenges.\\n" + " * Suggest leadership interventions (e.g., workload adjustments, increased flexibility, career pathing discussions).\\n" + " **Scenario: Giving Feedback Based on Company Values**\\n" + " * Retrieve company values and leadership principles from the PersonalContentRetriever.\\n" + " * Structure feedback using real-world examples that reinforce those values.\\n" + " * Recommend actions that align with cultural expectations (e.g., collaboration, innovation, customer focus).\\n" + "\\n **4) Set Next Steps:**\\n" + " * Summarize key takeaways from the conversation.\\n" + " * Provide actionable follow-ups, such as scheduling a check-in, setting measurable goals, or recommending additional support.\\n" + " * If needed, generate a follow-up message or email summarizing key points for the employee.\\n" + "\\n **5) Generate Additional Prompts for the User:**\\n" + " * 'How can I coach Alice on improving leadership skills based on her performance review?'\\n" + " * 'What feedback should I give Bob in our 1:1 based on company values?'\\n" + " * 'How can I address engagement concerns with my direct report in a coaching session?'\\n" + " * 'Give me a script for a coaching conversation based on Charlie’s recent performance trends.'\\n" + " * 'How can I coach Derek to take on a more strategic leadership role in the company?'\\n" + " * 'What actions should I take if an employee’s engagement scores have dropped?'"; Elég gyors, de senki sem mondta, hogy a coaching könnyű volt! Ezzel az úton csak egy kicsit kell beállítanunk a HRBP ügynököt. Láthatjuk, hogy autowired a HRAnalystAgent-ben az alapértelmezett konfigurációval - ez azért van, mert azt akarjuk hívni az összes rendelkezésre álló eszközzel. Most be kell állítanunk a HRBP-t, hogy amikor az eszközünk belsejéből hívjuk, nem használ más eszközöket - csak a tudást adjuk hozzá. Adja hozzá ezt a módszert az osztály alján: private HRBusinessPartnerAgent getAgentWithPersonalFiles() { if (agentWithFiles == null) { agentWithFiles = AiServices.builder(HRBusinessPartnerAgent.class) .retrievalAugmentor(PeoplelogicRetrievalAugmentor.builder() .queryTransformer(ExpandingQueryTransformer.builder().chatModel(chatLanguageModel).build()) .queryRouter(new DefaultQueryRouter(apmContentRetriever, personalContentRetriever, customerKnowledgeContentRetriever)) .build()) .chatMemoryProvider(chatMemoryProvider) .chatModel(chatLanguageModel) .tools(Collections.emptyList()).build(); } return agentWithFiles; } Ezzel az útról kifelé, eljuthatunk a tényleges munkához - építsük fel eszközünket. Építeni az edzőt Ahhoz, hogy létrehozzuk a tényleges edzőt, létre kell hoznunk egy módszert, amellyel az SDK-t hívhatjuk, ha valaki segíteni akar a vezetői coachingban. @Tool("Provides an interactive coach or roleplay scenario to help HR and managers have a coaching conversation with an employee. " + "You need to ask who the employee is. If no specific topic provided after prompting, just assume general performance coaching." + "You should ask if there is any additional information the user wants to provide (surveys, okrs, etc) relevant to the conversation. " + "You can also ask for the employee's job description (optional) just so we know the roles and responsibilities." + "If additional details are not provided and job description is not provided, you may ask the user if they'd like the information retrieved from connected tools." + "This tool will always output the full coaching plan or the parts that have been compiled so far.") @SneakyThrows public String roleplayOrProvideCoachingAdviceHelpMeCoachAnEmployee(@ToolMemoryId String memoryId, @P("Employee Name") String employeeName, @P("Specific topic for coaching") String specificTopic, @P(value = "Filenames of additional inputs - excluding job descriptions", required = false) String additionalFiles, @P(value = "Employee's Job Description", required = false) String jobDescription) { } Amint láthatja, mind egy nagyon részletes leírást, mind egy részletes nevet adunk az eszköznek, hogy az LLM-nek annyi információja legyen, amennyire csak lehetséges, hogy meghívja az eszközt. Ennek az eszköznek egy fejlettebb verziója úgy dönthet, hogy az Universal Talent API-t használja az összes ilyen részlet összegyűjtésére és a válaszba való felvételre anélkül, hogy bármilyen feltöltésre lenne szükség. Most nézzük meg, hogyan használhatjuk fel mindezt az információt: String userQuery = "Help me have a coaching conversation with " + employeeName + " around " + specificTopic + ". " + "If additional files are provided, try to use those. It should be an interactive conversation. " + "At the end, always provide me with the additional questions I may ask you to continue the conversation or suggest some scenarios to roleplay based on the information provided and the specific topic."; // Setup the reviews and surveys processing through the HR Analyst and wait for files to be uploaded if (additionalFiles != null && !additionalFiles.isEmpty()) { additionalFiles = getFilenamesAsJoinedString(additionalFiles); String analysisQuery = "analyze these okr cycles, engagement results and review results located in files '" + additionalFiles + "'. All files have been provided already - do not ask for them again. Everything is confirmed - no more required."; SearchFileContext.setCurrentFiles(additionalFiles.split(",")); if (!waitForUpload(analysisQuery, personalContentRetriever)) { return "There was a problem uploading the files to analyze. Please try again."; } // Call the HR Analyst and append the results to the user query Result<PeoplelogicResult> analystResults = analyst.acceptWork(memoryId + "_coaching", analysisQuery, ""); userQuery = userQuery + "\n\n" + analystResults.content().getResponse(); } Ezt néhány részre bontjuk az egyszerűség érdekében. Először az alapvető utasítást fogjuk beállítani, hogy a korábbi rendszerüzenetünkkel együtt járjunk - ne feledje, minden ügynökhöz intézett hívásnak mindkettőre van szüksége! Ezután meg kell tisztítanunk a további bemeneteket, és meg kell győződnünk arról, hogy azokat ténylegesen feltöltötték. Végül felhívjuk a HR elemzőt, és hagyjuk, hogy működjön a varázslat, elemezve a felülvizsgálatokat, a felméréseket vagy az OKR-eket, és azokat belefoglaljuk abba, amit át akarunk adni a coaching eszközhöz. // Check if we have provided a job description if (jobDescription != null && !jobDescription.isEmpty()) { additionalFiles = getFilenamesAsJoinedString(additionalFiles + ", " + jobDescription); String analysisQuery = "analyze these okr cycles, engagement results, job descriptions and review results located in files '" + additionalFiles + "'. All files have been provided already - do not ask for them again. Everything is confirmed - no more required."; SearchFileContext.setCurrentFiles(additionalFiles.split(",")); if (!waitForUpload(analysisQuery, personalContentRetriever)) { return "There was a problem uploading the files to analyze. Please try again."; } } String result = getAgentWithPersonalFiles().answerWithPrompt(memoryId + "_coaching", userQuery, COACHING_CONVERSATION_SEGMENT); return "Here is the plan - output it in full to the user: " + result; Mindössze annyit kell tennünk, hogy kezeljük a munkaköri leírást, majd elküldjük ezt az információt a HRBP ügynöknek, amelyet korábban beállítottunk. Ismét elvégzünk néhány alapvető tisztítási és biztonsági ellenőrzést abban az esetben, ha a munkaköri leírást nyújtották, majd felhívjuk a HRBP ügynököt mindazzal, amit eddig összegyűjtöttünk, és visszaküldjük az eredményt az LLM-nek! Az edző cselekvésben Most, hogy megírtuk az utasításokat, konfiguráltuk az ügynököket, felépítettük az eszközöket, csak meg kell mondanunk a beépített HRBP ügynöknek az új eszközt. peoplelogic.agent.HRBusinessPartnerAgent.tools=hrbp-coaching-tools Helyezze be az ügynökeit, vagy töltse le az alkalmazást helyi szinten, majd töltse fel a Slack alkalmazást, és nézze meg, hogy működik-e az eszköz. Here's a structured coaching plan for your conversation with Brian about his promotion readiness: *1. Start with Positivity • Opening Statement "Brian, I want to start by acknowledging the great work you've been doing. Your passion, curiosity, and empathy really shine through in your role. Let's celebrate some of your recent accomplishments." • Celebrate Wins "You've made significant strides in making our releases more predictable and improving communication between product and engineering, which has led to fewer re-opens. Your efforts in tightening our product strategy are also noteworthy." *2. Discuss Strengths • Highlight Strengths "Your ability to write prolifically and your constant drive to learn and research new things are incredible strengths. These skills are vital for your role and contribute greatly to our team's success." *3. Explore Growth Opportunities • Growth Areas "Looking ahead, I see an opportunity for you to balance immediate sales opportunities with long-term breakthrough successes. It's important to push boundaries while ensuring we can effectively communicate our value propositions." • Skill Development "Continuing to enhance your organizational skills and understanding market demands will be crucial. Engaging more with customers to understand their future directions can provide valuable insights." *4. Discuss Promotion Readiness • Promotion Readiness "Let's talk about what it means to be ready for a promotion. Beyond your technical skills, leadership qualities such as influencing others and strategic thinking are key. How do you feel about your readiness in these areas?" *5. Actionable Next Steps • Set Goals "Let's set some goals together. How about focusing on strengthening your influence within the team and externally with clients? Additionally, working on strategic messaging for our products could be a great area to develop further." *6. Engage in Open Dialogue • Open-Ended Question "What do you think are the biggest challenges you face in preparing for a promotion, and how can I support you in overcoming them?" *7. Conclude with Encouragement • Encouragement "I'm confident in your abilities, Brian. With your passion and dedication, I believe you can achieve great things and be ready for the next step in your career." Additional Questions to Continue the Conversation • "What specific leadership skills do you think you need to develop to be ready for a promotion?" • "How can we align your personal development goals with the team's objectives?" • "What resources or support do you need from me to help you succeed?" Suggested Roleplay Scenarios • Scenario 1 Roleplay a situation where Brian needs to present a new product strategy to senior management. • Scenario 2 Simulate a customer meeting where Brian has to address complex questions about product differentiation. • Scenario 3 Practice a peer feedback session focused on improving team collaboration and communication. Elég lenyűgöző! Az ügynök beépítette a feltöltött fájlokat, nagyszerű beszélgetési kezdeteket adott nekünk a közelmúltbeli értékelések és a célok előrehaladása alapján, és amikor részleteket kért, még a kezdeményezést is meghozta, hogy kihasználja a HRBP rendelkezésére álló másik eszközt, új IDP-t (egyéni fejlesztési tervet) hozzon létre a beszélgetésben. Jövőbeli fejlesztések Bár ez a példa nagyszerű, van néhány olyan hely, ahol határozottan javíthatunk előre haladva. A hosszú rendszer áthelyezése egy fájlra utal a karbantarthatóság érdekében. Az Universal Talent API-t is beleértve, így nem kell fájlokat feltölteni. A HRBP személyre szabása, hogy megfeleljen a szervezet személyiségének. Szabadon javasolhat más fejlesztéseket, ahogy dolgozik a bemutatón keresztül, és mint mindig, boldog kódolás!