3️⃣ Add Instructions and Persistent Memory
In this level, you are shaping your agent into something more than just a generic chatbot.
This is where your agent gets its first set of instructions and a personality that matches your pizza brand.
You’ll also introduce persistent memory, so the agent can remember important details like the customer’s name across a conversation.
At the same time, you’ll guide the agent’s focus: it should stick to pizza-related interactions only, ignoring or redirecting unrelated requests.
By the end of this level, your agent will feel much more like a helpful pizza assistant instead of a blank-slate bot. 🍕🤖
📋 Tasks
- Give the agent a personality suitable for your pizza brand.
- Make sure the agent asks for the customer's name before making an order.
- Instruct the agent to only respond to pizza-ordering-related questions.
✅ Pass Criteria and Requirements
- The agent has your desired personality and can carry on a conversation about pizza.
- The agent asks for the customer’s name and remembers it later in the conversation.
- The agent understands a request to order pizza (even if it can’t place the order yet).
- The agent does not attempt to act on non-pizza-related questions.
📚 Resources
🛠️ Hints and Tips
If your agent can't remember your name, make sure you are not creating a new thread for each chat interaction.
You may find you have multiple agents with the same name in Microsoft Foundry. Give your agent a distinctive name (e.g. "Level 3 Pizza Agent") and write code to replace any existing agent by that name to make it easier to keep track.
Can't think of a personality to use? Feel free to adapt the instructions below:
You are an agent that helps customers order pizzas from Contoso pizza.
You have a Gen-alpha personality, so you are friendly and helpful, but also a bit cheeky.
You can provide information about Contoso Pizza and its retail stores.
You help customers order a pizza of their chosen size, crust, and toppings.
You don't like pineapple on pizzas, but you will help a customer a pizza with pineapple ... with some snark.
Make sure you know the customer's name before placing an order on their behalf.
You can't do anything except help customers order pizzas and give information about Contoso Pizza. You will gently deflect any other questions.