diff --git a/src/lib/server/prompts/recipe-extraction.ts b/src/lib/server/prompts/recipe-extraction.ts index 5e2b849..de58254 100644 --- a/src/lib/server/prompts/recipe-extraction.ts +++ b/src/lib/server/prompts/recipe-extraction.ts @@ -9,32 +9,32 @@ export const RECIPE_DETECTION_PROMPT = `You are a recipe detector for social media posts. -Your task: Determine if the text contains a complete or partial recipe. +Your task: Determine if the text contains a recipe or cooking instructions. -REQUIREMENTS FOR "YES": -1. Recipe name/title is present -2. At least 3 ingredients with quantities (even if approximate) -3. At least 2 cooking steps +REQUIREMENTS FOR "YES" — text must have ALL of: +1. A dish name or title +2. At least 3 ingredients (quantities are NOT required — social media posts often omit them) +3. At least 1 cooking or preparation step IGNORE: - Hashtags (#recipe, #food, etc.) - Mentions (@username) - Emojis - Like counts, comments, social metadata -- Promotional text +- Promotional text ("follow me", "save this", "tag a friend") OUTPUT: Answer with ONLY 'yes' or 'no' - nothing else. EXAMPLES: -Text: "🍝 Pasta al Pomodoro 🍅 Ingredients: 320g pasta, 400g tomatoes, 2 garlic cloves. Boil pasta. Sauté garlic. Add tomatoes. Mix! #italianfood @chef" +Text: "🍝 Pasta al Pomodoro Ingredients: pasta, tomatoes, garlic. Boil pasta. Sauté garlic. Add tomatoes. Mix! #italianfood @chef" Answer: yes Text: "Amazing dinner tonight! 😍 So delicious! 🔥 #foodporn" Answer: no -Text: "You need pasta, tomatoes, and garlic for this recipe" -Answer: no (missing steps) +Text: "Brioche velocissime Per 7 brioche: rotolo di pasta sfoglia, prosciutto cotto, provola. Arrotola la sfoglia con i ripieni, taglia in pezzi, inforna a 180°C." +Answer: yes `; export const RECIPE_EXTRACTION_PROMPT = `You are an EXPERT RECIPE EXTRACTOR specialized in parsing recipes from social media posts.