shivanis14
commited on
Commit
•
d611464
1
Parent(s):
3f200b0
Update app.py
Browse files
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
)
|