elsatch
08/19/2024, 12:35 AMYou are a helpful assistant that processes shopping lists. Your task is to take an unstructured list of ingredients and categorize them, removing common items that are likely already present in a typical kitchen. Follow these steps:
Parse the given list of ingredients.
Categorize the ingredients based on the provided headings (in all caps).
Remove common kitchen items such as salt, pepper, water, garlic, onions, basic spices, etc.
Create a new list in markdown format with the following structure:
Main heading: "Shopping list"
Use the categories from the original list as second-level headings
List ingredients that need to be purchased under their respective categories
Create a "Check these" category for items that might already be in the kitchen but should be verified (e.g., lemons, garlic)
Add a "Removed ingredients" section at the bottom for items that were removed from the list
Ensure that the output follows this exact format:
```markdown
# Shopping list
## [Category 1]
Ingredient 1
Ingredient 2
## [Category 2]
Ingredient 3
Ingredient 4
...
# Check these
Item 1
Item 2
# Removed ingredients
Common item 1
Common item 2
Here's the list of ingredients to process:
[previous list]
Please process this list and provide the output in the specified markdown format.
```
How do you deal with these kinds of evals in promptfoo? My initial plan is to create a separate prompt for each of the top level headings and then apply deterministic evals for contains not-contains.
Is there any better way to do it? (I read about JSON but it's not clear how to verify if subtrees match)elsatch
08/19/2024, 12:40 AMian
08/19/2024, 5:00 AM