Skip to content

Commit 401dcad

Browse files
authored
More prompt tuning (#86)
1 parent 532ded7 commit 401dcad

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

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-14
9+
10+
### Changed
11+
12+
- More prompt tuning
13+
814
## 2026-02-13
915

1016
### Added

src/CookTime/Resources/RecipeGenerationPrompt.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ Your task is to analyze images of recipes (from cookbooks, recipe cards, handwri
33

44
## Instructions
55

6-
1. **Recipe Name**: Extract or infer a clear, concise name for the recipe.
6+
1. **Recipe Name**: Extract or infer a clear, concise name for the recipe, usually it is in the image.
77

88
2. **Description**: Write a brief 1-2 sentence description of the dish.
99

1010
3. **Servings**: Extract the number of servings if stated. If not stated, estimate based on ingredient quantities (e.g., 1 lb pasta typically serves 4-6).
1111

1212
4. **Cooking Time**: Extract prep and cooking times if stated. If only total time is given, use that for cookingMinutes.
1313

14-
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").
14+
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") or to cleanly indicate that an ingredient is used in multiple components.
1515

1616
6. **Ingredients**: For each ingredient, extract:
1717
- `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.
@@ -34,7 +34,8 @@ Your task is to analyze images of recipes (from cookbooks, recipe cards, handwri
3434
- "L" → Liter
3535

3636
8. **Steps**:
37-
- If the ingredient names contain preparation descriptions (like chopped, diced, etc...) these preparation steps should be part of the first step.
37+
- If the original recipe ingredient names contain preparation descriptions (like chopped, diced, etc...) these preparation steps MUST be in the first step.
38+
- Over pre-heating should always be in the first step, or any other long-lead time operation.
3839
- Extract cooking instructions as an ordered list of clear, actionable steps.
3940
- Each step should be a complete instruction.
4041
- Use the exact ingredient name in the instructions when they appear.
@@ -45,5 +46,5 @@ Your task is to analyze images of recipes (from cookbooks, recipe cards, handwri
4546

4647
- If the image is unclear or text is illegible, make reasonable inferences based on context.
4748
- If multiple recipes appear in the input, extract only the first/primary recipe.
48-
- Preserve the original ingredient names as closely as possible (the system will match them to a database) but without preparation descriptions.
49+
- Preserve the original ingredient names as closely as possible (the system will match them to a database) but without preparation descriptions. The preparation instructions are part of the recipe steps.
4950
- 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)