• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

AI HR Assistant with Amazon Bedrock Agent

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Introduction


As organizations grow and evolve, so do the demands on Human Resources. Internal teams often face repetitive, time-consuming tasks—like answering common policy questions, processing leave requests, or managing onboarding queries—that can slow down productivity and strain HR capacity. An AI-powered HR assistant offers a smart, scalable solution to this challenge. This not only reduces the administrative burden on HR staff but also enhances the employee experience through quick resolution of queries and more personalized support.

This blog helps you to create an AI HR assistant that can give you internal regulations, automate the Time Leave request.

Architecture



Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Prerequisites

  1. AWS credential grants Bedrock, Lambda, S3, Athena, Glue, Opensearch permissions
  2. Linux environment
Steps


git clone

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.


cd amazon-bedrock-samples/tree/main/agents-and-function-calling/bedrock-agents/use-case-examples/hr-assistant/shell

Run the script:
source ./create-hr-resources.sh


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Check mail:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Subscribe topic:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Once the deployment is finished. You can use the Bedrock Agent Playground:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Or you can create a web frontend with streamlit. First install streamlit:
pip install -r agents-and-function-calling/bedrock-agents/use-case-examples/hr-assistant/streamlit/requirements.txt


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



then cd hr-assistant/streamlit and run streamlit run agent_streamlit.py


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Check history query database employee trong Athena:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Troubleshooting

Bug 1:


Bug: User: arn:aws:iam::your-account-id:user/user-name is not authorized to perform: lambda:GetLayerVersion on resource: arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:68 because no resource-based policy allows the lambda:GetLayerVersion action (Service: Lambda, Status Code: 403, ..., HandlerErrorCode: AccessDenied)
Solution: Find the line containing arn:aws:lambda:us-east-1:017000801446:layer:AWSLambdaPowertoolsPythonV2:68 in file hr-resources.yml and change the region to where you deploy.

Redeploy and bug


Bug: The script create-hr-resources.sh exits 1 and exit the terminal

Explanation: The script is created for 1 time usage as creating a database and a table. Hence when you redeploy in the same region, make sure to delete all created resources, including the CloudFormation stack. To remove the database in Athena, first delete all data in the table:

Delete table in Amazon Glue:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



then run this command:


aws athena start-query-execution --query-string "DROP DATABASE employee" --result-configuration "OutputLocation=s3://<your-accound-id>--hr-resources"


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



You can check the status of the query in the Athena Console:


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



If Status Failed, ensure database has no data.

Bug 3:


Error: Runtime.ImportModuleError: Unable to import module 'lambda.index': No module named 'requests' Traceback (most recent call last)

Solution: replace from botocore.vendored import requests (ref:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

)

Conclusion


Integrating an AI-powered HR assistant using Amazon Bedrock streamlines internal HR operations by automating repetitive tasks and providing instant, accurate responses to employee queries. This guide demonstrated how to deploy the solution end-to-end—from setting up resources to building a user-friendly Streamlit interface—enabling HR teams to focus on strategic initiatives while improving the employee experience. By leveraging the power of generative AI and scalable AWS services, organizations can create a more efficient, responsive, and modern HR function.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу