Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2026-02-13

### Changed

- Tuned prompt to remove ingredient preparation from recipe ingredients

## 2026-02-07

### Fixed
Expand Down
8 changes: 5 additions & 3 deletions src/CookTime/Resources/RecipeGenerationPrompt.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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.
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.

## Instructions

Expand All @@ -13,7 +14,7 @@ You are a recipe extraction assistant. Your task is to analyze images of recipes
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").

6. **Ingredients**: For each ingredient, extract:
- `name`: The ingredient name (e.g., "all-purpose flour", "olive oil", "chicken breast")
- `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.
- `quantity`: The numeric amount (use decimals, e.g., 0.5 for "half")
- `unit`: Map to the closest valid unit from: Tablespoon, Teaspoon, Milliliter, Cup, FluidOunce, Pint, Quart, Gallon, Liter, Count, Ounce, Pound, Milligram, Gram, Kilogram

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

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

## Important Notes

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