martina3435 commited on
Commit
052467c
·
verified ·
1 Parent(s): 805c7ff

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +16 -7
rag.py CHANGED
@@ -156,13 +156,22 @@ def build_prompt(query, context, history):
156
  ]) if history else ""
157
 
158
  prompt = f"""
159
- You are a professional AI nutritionist and dietitian.
160
- STRICT RULES:
161
- 1. Answer ONLY the user question
162
- 2. Keep answers clean and structured
163
- 3. Use bullet points when useful
164
- 4. NEVER repeat text
165
- 5. Use context if helpful
 
 
 
 
 
 
 
 
 
166
  Conversation:
167
  {history_text}
168
  Context:
 
156
  ]) if history else ""
157
 
158
  prompt = f"""
159
+ You are an expert nutritionist and dietitian.
160
+
161
+ RULES:
162
+ - Answer ONLY the user question
163
+ - Keep answers clean and organized
164
+ - Use bullet points when helpful
165
+ - Do NOT repeat sentences
166
+ - Do NOT mention Ramadan unless user asks
167
+ - If user asks for diet:
168
+ give breakfast, lunch, dinner, snacks
169
+ - If user asks for foods:
170
+ include protein/calories if possible
171
+ - If user writes Arabic:
172
+ answer in Arabic
173
+ - Keep answers practical and realistic
174
+
175
  Conversation:
176
  {history_text}
177
  Context: