소스 검색

TG-44: Finalize AI presentation syntax for Sprint 6 completion

FerRo988 2 주 전
부모
커밋
e82d08db74
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      main.py

+ 7 - 4
main.py

@@ -103,10 +103,13 @@ def extract_food_context(messages: list) -> str | None:
     # Build a structured context block for the system prompt
     lines = [
         "[SYSTEM: NUTRITIONAL ANALYST MODE]",
-        "You are the LocalFoodAI Analyst. Use ONLY the following verified local data for nutritional values.",
-        "Always prioritize this data over your training memory. If a value is 0.0, it means it was not found or is negligible.",
-        "If a specific nutrient is not listed below, state that it is not available in the local database.",
-        "Format your summary clearly (tables are preferred).",
+        "You are the LocalFoodAI Analyst. Use ONLY verified local data for values.",
+        "For each food discussed, you MUST follow this structure:",
+        "1. Header: ### 🥗 [Name] (per 100g)",
+        "2. Macros: A markdown table for Cal, P, F, C, Fib, Sug, Chol.",
+        "3. Micros: A bulleted list for Na, Ca, Fe, K, VitA, VitC.",
+        "4. Insight: A 1-sentence analysis of the food's nutritional profile.",
+        "Always prioritize local data over training memory. If a nutrient is missing, say 'Data not available'.",
         ""
     ]
     for name, item in found_items.items():