Building your Agent
The core of this project surrounds building a recipe recommendation agent as a team. There are different tasks that you will encounter:
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tasks focused on Dialogue Patterns |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tasks focused on the Visual Support |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tasks focused on Recipe Filtering |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tasks focused on Report Writing |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tasks focused on Intent/Slot Classification |
...
1. Getting Started with your MARBEL Agent
...
Natural conversations are typically opened. Our agent should not just straight away embark on the task of recommending a recipe. It should first secure the attention of its user. Opening a conversation is a basic conversational competence. A common way of opening a conversation is by greeting each other. You should provide your agent with this basic conversational competence too. It should, moreover, be able to introduce itself to its user as in the following conversational pattern. A welcoming webpage should also be created.
Panel | ||
---|---|---|
| ||
A: Hello. A: My name is ____*. U: Hi! *insert your agent’s name here |
Implementation Tasks Overview
...
Panel
...
Implement two greeting patterns, and a Prolog rule for generating a self-identification.
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
Make a welcoming page. |
...
Tasks Focused on Dialogue Patterns
Implement Basic Greeting Pattern
Define the
c10
pattern inpatterns.pl
for the greeting exchange:[agent, greeting]
and[user, greeting]
.Add the condition
agentName('')
to ensure it is used only when the agent has no name.
Add Self-Identification Pattern
Extend
c10
inpatterns.pl
to include[agent, selfIdentification]
.Add
not(agentName(''))
to ensure it is used only when the agent has a name.
Specify Agent Responses
Add phrases for
greeting
andselfIdentification
intents inresponses.pl
.Dynamically retrieve the agent’s name using
agentName(Name)
to generate self-identification responses.
Add Patterns to the Agenda
Update
dialog_init.mod2g
to includec10
in the agenda afterstart
.
...
Tasks Focused on Visual Support
Create a Welcoming Page
Define
page(c10, _, Html)
inhtml.pl
to create a welcoming page.Include a microphone icon for user interaction and dynamically display the agent’s name if available.
Design Visual Elements
Use Bootstrap components to organize text, images, and interactive elements into sections like greetings and microphone access.
...
Tasks Focused on Debugging and Testing
Test Greeting Patterns
Test the basic greeting pattern by running the agent and initiating interaction from the Start page.
Set the agent’s name in
dialog_init.mod2g
and verify self-identification functionality.
Test User Response Variations
Provide non-greeting inputs to test the agent’s response and inspect session updates in Debug mode.
Instructions
Request a Random Recipe Recommendation
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
Make a page that is displayed while recipe recommendation is ongoing and a page that is shown when the user needs to confirm it likes a recipe that is recommended by the agent. |
Instructions
Select Recipes by Name
Summary Description
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
- |
Instructions
Filter Recipes by Ingredients, Cuisines and Meal Types
...
Panel |
---|
panelIconId1f4a1panelIcon:bulb:panelIconText💡bgColor#E6FCFF |
Implement feature request patterns and responses, and Prolog rules for filtering recipes. |
Instructions
Unexpected Intents
Summary Description
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
- |
Instructions
Filter Recipes by Ingredients and Cuisine
...
Panel |
---|
panelIconId1f4a1panelIcon:bulb:panelIconText💡bgColor#E6FCFF |
Implement feature request patterns and responses, and Prolog rules for filtering recipes. |
Instructions
Filter Recipes by Dietary Restrictions
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
- |
Instructions
Filter Recipes by Excluding Features
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
- |
Instructions
Confirm the Chosen Recipe
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
Make a closing page. |
Instructions
Removing Filters and Showing Recipes on Demand
...
Panel |
---|
panelIconId1f440panelIcon:eyes:panelIconText👀bgColor#E3FCEF |
- |
Instructions
Extend Your Agent (Make it Nicer)
...