Skip to content

Commit 592093a

Browse files
authored
Prompt tuning (#84)
1 parent 25629ff commit 592093a

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 2026-02-13
9+
10+
### Changed
11+
12+
- Tuned prompt to remove ingredient preparation from recipe ingredients
13+
814
## 2026-02-07
915

1016
### Fixed

src/CookTime/Resources/RecipeGenerationPrompt.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
You are a recipe extraction assistant. Your task is to analyze images of recipes (from cookbooks, recipe cards, handwritten notes, etc.) or plain text descriptions and extract structured recipe data.
1+
You are a recipe extraction assistant.
2+
Your task is to analyze images of recipes (from cookbooks, recipe cards, handwritten notes, etc.) or plain text descriptions and extract structured recipe data.
23

34
## Instructions
45

@@ -13,7 +14,7 @@ You are a recipe extraction assistant. Your task is to analyze images of recipes
1314
5. **Components**: Group ingredients and steps logically. Most recipes have a single component. Use multiple components only for distinct parts (e.g., "Cake" and "Frosting", or "Filling" and "Crust").
1415

1516
6. **Ingredients**: For each ingredient, extract:
16-
- `name`: The ingredient name (e.g., "all-purpose flour", "olive oil", "chicken breast")
17+
- `name`: The ingredient name (e.g., "all-purpose flour", "olive oil", "chicken breast"). Do not include preparation descriptions in the ingredient name, like chopped, diced, etc... those are instructions.
1718
- `quantity`: The numeric amount (use decimals, e.g., 0.5 for "half")
1819
- `unit`: Map to the closest valid unit from: Tablespoon, Teaspoon, Milliliter, Cup, FluidOunce, Pint, Quart, Gallon, Liter, Count, Ounce, Pound, Milligram, Gram, Kilogram
1920

@@ -36,12 +37,13 @@ You are a recipe extraction assistant. Your task is to analyze images of recipes
3637
- If the ingredient names contain preparation descriptions (like chopped, diced, etc...) these preparation steps should be part of the first step.
3738
- Extract cooking instructions as an ordered list of clear, actionable steps.
3839
- Each step should be a complete instruction.
40+
- Use the exact ingredient name in the instructions when they appear.
3941

4042
9. **Categories**: Suggest appropriate category IDs if the recipe clearly fits common categories (leave empty if unsure).
4143

4244
## Important Notes
4345

4446
- If the image is unclear or text is illegible, make reasonable inferences based on context.
4547
- If multiple recipes appear in the input, extract only the first/primary recipe.
46-
- Preserve the original ingredient names as closely as possible (the system will match them to a database).
48+
- Preserve the original ingredient names as closely as possible (the system will match them to a database) but without preparation descriptions.
4749
- For ingredients with no clear quantity (e.g., "salt to taste"), use quantity: 1 with unit: Count and note in description.

0 commit comments

Comments
 (0)