Building an AI Agent for Holiday Approvals

Getting started with AI can be a daunting concept, even though you know it is something you should be looking at. The way to get started is to learn the basics, build a small AI agent to augment your teams, and most importantly, keep building and iterating. Let’s take a look at this through a simple example of building an AI agent empowering HR/team managers by automating team holiday approvals.

In order to maximize our chances of success, we will do this by following the Lean AI process, which will allow us to find potential problem areas quickly.

> Introducing Lean AI

Identify the Task and Use Case

First, we need to identify a task that is a good fit and is easy to augment with an AI agent. Good candidates for this usually are tasks that generally are resource-restricted, such as there is a limited amount of people that can do the work, repetitive or data-based. We also need to decide the use case of how the AI agent will be used.

Here is an example of a task and use case:

Approving holidays and making sure there are enough people around at all times from every team manually every time is slow and presents a potential single point of failure. It is also a task that is repeated throughout the year in the same way and work increases directly with the amount of people. Additionally, it is an extra role that is not productive toward the company mission. The approval process should happen through emails or chat so that the user is identified and the requested holiday dates can be given to the system.

Validate AI Capabilities and Data Requirements

Before diving headfirst into building an AI agent of your own, it's crucial to first validate the capabilities of the AI model that you are using (eg. OpenAI GPT-4) and the required data concerning the task at hand. This can be done by hardcoding the data into a prompt to understand how AI can handle it.

Example prompt

You are an HR representative. Your job is to approve holidays when employees request them. You can only approve holidays for whatever unused holidays they have left and at least one person on the team has to be present at all times.

Person 2 has requested a holiday for 2024-06-06 - 2024-07-11
They have unused holidays for 25 days

Current holiday status of the team (3 people):
Person 1: 2024-06-01 - 2024-06-21
Person 2: No current holidays
Person 3: 2023-06-15 - 2023-07-15

Give me a recommendation on should the holiday request be approved. If the answer for that specific request is no, also include alternative options.

Take a deep breath and work on this problem step by step.

You can test the above prompt yourself by opening ChatGPT, just make sure you send it to an empty chat. Notice that the prompt has example data directly written into it. This allows you to easily test different scenarios without having to build data integrations first. Also, you can test different ways to represent the data, for example using numbers instead of names to protect identification data.

Integrate with Data and Start Testing

Now that you know what you need in order for this to work, it is time to start building. Through the hardcoded scenarios in the validation phase, we can see how the AI task needs to be structured and what kind of data is required. For example, we now know that in addition to individual holiday details, we need to also provide the team composition and holiday schedules to the AI model. And we were able to figure all of this out without having to build the data integrations first. Lastly, from our use case, we also know that we need just plain messages so we don’t necessarily need the AI model to respond with a specific data structure.

When it comes to testing, we also want to start testing the AI agent as fast as possible. So, instead of autonomous operation, we start with humans in the loop empowered with AI recommendations.

Here is an example testing plan:

  1. Forward any holiday requests to the agent, generate recommendations, and send them to the HR/team managers for approval

  2. Human operators validate the recommendations and act on the requests

  3. Collect feedback from the AI recommendations and iterate according

  4. Once the human operators don’t have to do any corrections the AI can start operating autonomously

Conclusion

As you see, starting with AI operations is not hard or complicated. The hard part is doing enough iterations to learn how AI can be used and for what. Hopefully, this post sheds some light on how to get started with the step-by-step approach of Lean AI. By breaking down the process into manageable steps and starting with a practical task, you can start building your understanding in AI technologies already today.

How can I help you?

Just remember, your journey into AI is a marathon, not a sprint. I can help you accelerate your speed through that process:

> Lean AI Masterclass - From zero to hero. From being overwhelmed to building AI-powered products, in one day.

> Other Services & Opportunities

Previous
Previous

What is going on with OpenAI Q* and why AI breaking the encryption would be dangerous

Next
Next

AutoGen Changes The Game For AI Workflows