From 7228549aab8d357a80571207e963ee8496946519 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Fri, 13 Feb 2026 18:25:15 -0500 Subject: [PATCH 1/2] Prompt tuning --- src/CookTime/Resources/RecipeGenerationPrompt.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/CookTime/Resources/RecipeGenerationPrompt.txt b/src/CookTime/Resources/RecipeGenerationPrompt.txt index 03dce69..8f7cbfd 100644 --- a/src/CookTime/Resources/RecipeGenerationPrompt.txt +++ b/src/CookTime/Resources/RecipeGenerationPrompt.txt @@ -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 @@ -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 @@ -36,6 +37,7 @@ 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). @@ -43,5 +45,5 @@ You are a recipe extraction assistant. Your task is to analyze images of recipes - 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. From e12bb1ebe1ed2c4c13050485c6e0c119db44ed6d Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Fri, 13 Feb 2026 18:27:14 -0500 Subject: [PATCH 2/2] Changelog update --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f48f98..5cd9c66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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