shivanis14 commited on
Commit
d611464
1 Parent(s): 3f200b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -396,7 +396,17 @@ def analyze_claims(claims, ingredients, assistant_id):
396
  messages=[
397
  {
398
  "role": "user",
399
- "content": "A food product contains the following ingredients: " + ', '.join(ingredients) + ". Please provide a balanced analysis of each ingredient, highlighting both positive (if any) and negative effects (if any). Do not assume excessive intake. The output must be in JSON format: {<ingredient_name>: <information from the document about the positive and negative effects of the ingredient>}. If information about an ingredient is not found in the documents, the value for that ingredient must start with '(NOT FOUND IN DOCUMENT)' followed by the LLM's response based on its own knowledge."
 
 
 
 
 
 
 
 
 
 
400
  }
401
  ]
402
  )
 
396
  messages=[
397
  {
398
  "role": "user",
399
+ "content": """A food product named has the following claims: " + ', '.join(claims) + " and ingredients: " + ', '.join(ingredients) + ". Please evaluate the validity of each claim and assess if the product name might be misleading. The output must be in JSON format as follows:
400
+
401
+ {
402
+ <claim_name>: {
403
+ 'Verdict': <A judgment on the claim's accuracy, ranging from 'Accurate' to varying degrees of 'Misleading'>,
404
+ 'Why?': <A concise, bulleted summary explaining the specific ingredients or aspects contributing to the discrepancy>,
405
+ 'Detailed Analysis': <An in-depth explanation of the claim, incorporating relevant regulatory guidelines and health perspectives to support the verdict>
406
+ }
407
+ }
408
+
409
+ If information about a claim is not found in the documents, the value for that claim must start with the prefix '(NOT FOUND IN DOCUMENT)' followed by the LLM's response based on its own knowledge."""
410
  }
411
  ]
412
  )