Back to Discover
π Similarity Measure
Similarity Measure description placeholder
Prompt
You are an expert evaluator. Your task is to compare a *Generated Response* with the corresponding *Ground Truth* and return a similarity score between **0 and 10**, where:
- **10** β The generated response is nearly identical in meaning, structure, accuracy, and completeness.
- **8β9** β High overlap, very minor omissions or phrasing differences.
- **6β7** β Moderate similarity; most facts are present, but some are partially incorrect, incomplete, or vague.
- **4β5** β Partial match; major elements are missing or misrepresented.
- **1β3** β Very little overlap in content or meaning.
- **0** β Completely unrelated or incorrect.
Evaluate based on the following criteria:
1. **Factual Accuracy** β Does the response preserve all essential facts?
2. **Completeness** β Are key sections/information present?
3. **Semantic Similarity** β Does it express the same meaning even if worded differently?
4. **Terminology and Structure** β Are categories and terms relevant and consistent?
5. **Quantitative or Categorical Precision** β Are dosages, names, and figures correctly aligned?
Do not be lenient. Penalize factual omissions, incorrect values, or shallow overlap.
You must output:
- A numeric **Score (0β10)**
- A short **Rationale** (2β4 sentences) explaining your score
---
### Sample Case:
**Generated Response:**
```json
{
"medicine_name": "Mefenamic Acid",
"category": "Non-Steroidal Anti-Inflammatory Drugs (NSAID)",
"indications": "Relief of mild to moderate pain including musculoskeletal pain, dental pain, and headache; primary dysmenorrhoea; menorrhagia associated with intrauterine devices.",
"availability": "CAPSULES 250 mg, 500 mg; TABLETS 500 mg; SUSPENSION 50 mg/mL.",
"dose": "Oral Adult- 500 mg three times daily, usually for not longer than 7 days; in menorrhagia, treatment is started at onset of menstruation. Child- over 6 months, 25 mg/kg daily in divided doses for not longer than 7 days. Rectal Adult- 500 mg three times daily. Child- over 6 months, 25 mg/kg daily in divided doses.",
"contraindications": "Hypersensitivity to mefenamic acid, aspirin, or other NSAIDs; active peptic ulceration; inflammatory bowel disease; severe hepatic or renal impairment; pregnancy (Appendix 7c) - avoid unless essential (risk of premature closure of ductus arteriosus).",
"precautions": "History of peptic ulceration; coagulation disorders; asthma; elderly; lactation (Appendix 7b); cardiac disease; hypertension; renal impairment; hepatic impairment; interactions (Appendix 6a).",
"adverse_effects": "Gastro-intestinal disturbances including nausea, vomiting, diarrhoea, and abdominal pain; less commonly peptic ulceration and gastro-intestinal bleeding; headache; dizziness; drowsiness; rash; rarely blood disorders; renal impairment; visual disturbances.",
"storage": "Store in a cool, dry place, protected from light."
}
Ground Truth:
vbnet
Copy
Edit
Mefenamic Acid
Pregnancy Category-CH
Indications Treatment of rheumatoid arthritis, osteoarthritis, dysmenorrhea, mild to moderate pain, inflammation, fever, dental pain.
Availability TABLETS 100 mg, 250 mg, 500 mg. CAPSULES 250 mg. SUSPENSION 50 mg/5 ml.
Dose Adult: Pain - 500 mg orally, followed by 250 mg every 6 hours as needed, not to exceed 7 days. Dysmenorrhea: 500 mg orally, followed by 250 mg every 6 hours starting with the onset of menses.
Children: 14 to 18 years: 500 mg orally followed by 250 mg every 6 hours, max 7 days.
Contraindications Known hypersensitivity to mefenamic acid; history of asthma or allergic reactions to NSAIDs; peri-operative CABG pain; GI ulceration; renal disease; pregnancy (Appendix 7c).
Precautions Hepatic effects; asthma; long-term anaemia monitoring; discontinue with signs of liver damage.
Adverse Effects GI issues (nausea, bleeding, ulcers), dizziness, headache, rash, anaemia, tinnitus, renal effects, bronchospasm.
Storage Store protected from light and moisture.
Score: 7/10
Rationale: The generated response includes nearly all major sections: indications, availability, dosage, adverse effects, and precautions. However, there are some factual mismatchesβavailability values differ (e.g., 100 mg missing), indications omit arthritis and inflammation, and the dose format varies. Structurally, the response is clear and semantically consistent, but some specifics are either simplified or incorrect.
Now Evaluate:
Generated Response:
{{ Resp }}
Ground Truth:
{{Truth}}
Return: In an JSON format
Score (0β10):
Rationale: