...
Implementation Tasks Overview
...
Tasks Focused on Allowing Users to Finalize Recipe Constraints
1. User Stops Adding Preferences
Scenario: The user indicates they do not want to add more constraints.
Example:
Agent: "Can you elaborate on what you're aiming for in your recipe?"
User: "I don't want to add anything else."
Agent:
If ≤100 recipes remain: "OK. Here is a list of recipes that you can choose from."
If >100 recipes remain: "Sorry, there are still too many recipes left to show them all. Please add more preferences."
Steps:
Implement the
a21noMoreFilters
Pattern:Two Variants:
pictureGranted
: Triggered when ≤100 recipes remain.pictureNotGranted
: Triggered when >100 recipes remain.
Agent Memory Update:
If the agent grants the user’s request, add
[agent, update(['show'='true'])]
to the pattern to update the agent’s memory.Modify the condition for showing the second recipe overview page (
html.pl
) to check for the memory key-value pair'show', 'true'
.
...
2. Agent Responses for Finalizing Preferences
Add responses for the
pictureGranted
andpictureNotGranted
intents inresponses.pl
:pictureGranted
:Example: "Here is a list of recipes that you can choose from."
pictureNotGranted
:Example: "Sorry, there are still too many recipes left to show them all. Please add more preferences."
Dynamically calculate the number of remaining recipes using the
recipesFiltered/1
predicate to determine which response to use.
...
Tasks Focused on Removing Filters
1. Completing Filter Removal Responses
Scenario: The user requests to remove filters, and the agent provides feedback based on the number of remaining recipes.
Four Cases:
Large Number of Recipes (>800):
Example: "What kind of recipe would you like?"
Moderate Number of Recipes (16–800):
Example: "What other preference would you like to add?"
Condition: Memory key-value pair
'show', 'true'
must not be set.
No Recipes Left (0):
Example: "There are no recipes, please remove more requirements."
Small Number of Recipes or Show Command (<16 or
show=true
):Example: "Here are some recipes that fit your requirements."
Steps:
Add rules for the
featureInquiry
intent inresponses.pl
:Use
recipesFiltered/1
to calculate the number of remaining recipes.Use
length/2
to count the recipes and apply appropriate conditions.
Handle the
show=true
memory key condition for small or moderate recipe sets.
2. Debugging the a21removeKeyFromMemory
Patterns
Check the existing patterns in
patterns.pl
for removing filters (a21removeKeyFromMemory
).Verify that all filter removal scenarios trigger the correct
featureInquiry
response.
...
Tasks Focused on Visual Support
Update Visuals for Recipe Overviews
Recipe Overview 2 to Recipe Overview 1:
When users remove filters or finalize preferences, ensure a seamless transition between pages:
Example: From showing recipe titles and images (Overview 2) to just a list of filters (Overview 1).
Use dynamic visual cues to inform users of what has changed (e.g., "Filter removed!").
Dynamic Recipe Display
Modify the second recipe overview page to account for the memory key-value pair
'show', 'true'
:Show recipes even if there are more than 15 left, provided the user requested to stop adding filters.
...
Tasks Focused on Debugging and Testing
1. Test Finalizing Preferences
Verify the agent correctly handles cases where the user stops adding filters:
Test with ≤100 and >100 recipes left to ensure the
pictureGranted
andpictureNotGranted
responses trigger appropriately.Confirm the memory update (
show=true
) triggers the correct recipe overview page.
2. Test Filter Removal
Test removing filters at different recipe counts:
Large Numbers: Prompt the user to add more specific preferences.
Moderate Numbers: Suggest adding more preferences unless
show=true
.No Recipes: Ask the user to remove filters.
Small Numbers or Show Command: Display the remaining recipes.
3. Test Visual Transitions
Ensure smooth transitions between Recipe Overview 1 and Recipe Overview 2:
Test with dynamic changes in recipe counts and user actions (e.g., removing filters or finalizing preferences).
...