The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'title', 'content', 'contents', 'id'}) and 5 missing columns ({'mmlu', 'medmcqa', 'pubmedqa', 'bioasq', 'medqa'}).
This happened while the json dataset builder was generating data using
hf://datasets/khoaguin/medical-corpus/statpearls/mock/chunk/article-101404.jsonl (at revision 2af5546a4cc3313159b8ccbfa80604d3c4272873)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
id: string
title: string
content: string
contents: string
to
{'medqa': {'answer': Value('string'), 'options': {'A': Value('string'), 'B': Value('string'), 'C': Value('string'), 'D': Value('string')}, 'question': Value('string')}, 'medmcqa': {'answer': Value('string'), 'options': {'A': Value('string'), 'B': Value('string'), 'C': Value('string'), 'D': Value('string')}, 'question': Value('string')}, 'pubmedqa': {'PMID': List(Value('int64')), 'answer': Value('string'), 'options': {'A': Value('string'), 'B': Value('string'), 'C': Value('string')}, 'question': Value('string')}, 'bioasq': {'PMID': List(Value('int64')), 'answer': Value('string'), 'options': {'A': Value('string'), 'B': Value('string')}, 'question': Value('string')}, 'mmlu': {'answer': Value('string'), 'options': {'A': Value('string'), 'B': Value('string'), 'C': Value('string'), 'D': Value('string')}, 'question': Value('string')}}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1339, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 972, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'title', 'content', 'contents', 'id'}) and 5 missing columns ({'mmlu', 'medmcqa', 'pubmedqa', 'bioasq', 'medqa'}).
This happened while the json dataset builder was generating data using
hf://datasets/khoaguin/medical-corpus/statpearls/mock/chunk/article-101404.jsonl (at revision 2af5546a4cc3313159b8ccbfa80604d3c4272873)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
medqa dict | medmcqa null | pubmedqa null | bioasq null | mmlu null |
|---|---|---|---|---|
{
"answer": "B",
"options": {
"A": "Disclose the error to the patient and put it in the operative report",
"B": "Tell the attending that he cannot fail to disclose this mistake",
"C": "Report the physician to the ethics committee",
"D": "Refuse to dictate the operative report"
},
"question": "A ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Inhibition of proteasome",
"B": "Hyperstabilization of microtubules",
"C": "Generation of free radicals",
"D": "Cross-linking of DNA"
},
"question": "A 67-year-old man with transitional cell carcinoma of the bladder comes to the physician because of a 2-day hi... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Renal papillary necrosis",
"B": "Cholesterol embolization",
"C": "Eosinophilic granulomatosis with polyangiitis",
"D": "Polyarteritis nodosa"
},
"question": "Two weeks after undergoing an emergency cardiac catherization with stenting for unstable angina pector... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Coagulase-positive, gram-positive cocci forming mauve-colored colonies on methicillin-containing agar",
"B": "Encapsulated, gram-negative coccobacilli forming grey-colored colonies on charcoal blood agar",
"C": "Spore-forming, gram-positive bacilli forming yellow colo... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Erythromycin ointment",
"B": "Ketotifen eye drops",
"C": "Warm compresses",
"D": "Fluorometholone eye drops"
},
"question": "A 35-year-old man comes to the physician because of itchy, watery eyes for the past week. He has also been sneezing multiple times a da... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Diltiazem",
"B": "Labetalol",
"C": "Propranolol",
"D": "Reassurance and continuous monitoring"
},
"question": "A 39-year-old man presents to the emergency department because of progressively worsening chest pain and nausea that started at a local bar 30 minute... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Renal artery stenosis",
"B": "Benign prostatic hyperplasia",
"C": "Common iliac artery aneurysm",
"D": "Urethral stricture"
},
"question": "A 68-year-old male comes to the physician for evaluation of right flank pain. He has a history of diabetes and periphera... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Nifedipine",
"B": "Enoxaparin",
"C": "Clopidogrel",
"D": "Spironolactone"
},
"question": "A 65-year-old man is brought to the emergency department 30 minutes after the onset of acute chest pain. He has hypertension and asthma. Current medications include atorv... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "A history of stroke or venous thromboembolism",
"B": "Active or recurrent pelvic inflammatory disease (PID)",
"C": "Past medical history of breast cancer",
"D": "Known liver neoplasm"
},
"question": "A 37-year-old-woman presents to her primary care physician r... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Silvery plaques on extensor surfaces",
"B": "Flesh-colored papules in the lumbosacral region",
"C": "Erosions of the dental enamel",
"D": "Holosystolic murmur at the left lower sternal border"
},
"question": "A 23-year-old woman comes to the physician because ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "It is a Southwestern blot, identifying the presence of DNA-binding proteins",
"B": "It is a Northern blot, identifying the presence of RNA",
"C": "It is a Northern blot, identifying the presence of DNA",
"D": "It is an HIV-1/HIV2 antibody differentiation immunoass... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Cladribine",
"B": "Prednisone",
"C": "Imatinib",
"D": "Ruxolitinib"
},
"question": "A 72-year-old man comes to the physician because of a 2-month history of fatigue and worsening abdominal pain. During this period, he also has excessive night sweats and shortn... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Renal cell carcinoma",
"B": "Meningioma",
"C": "Astrocytoma",
"D": "Vascular malformations"
},
"question": "A 20-year-old man comes to the physician because of worsening gait unsteadiness and bilateral hearing loss for 1 month. He has had intermittent tingling... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "An increase in right atrial pressure",
"B": "An increase in pulmonary capillary wedge pressure",
"C": "A reduction in the slope of the pacemaker potential",
"D": "A reduction in diastolic filling time"
},
"question": "A 47-year-old executive schedules an appoi... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Epstein-Barr virus",
"B": "Human immunodeficiency virus",
"C": "Rotavirus",
"D": "Vaccinia virus"
},
"question": "A microbiologist is studying the emergence of a virulent strain of the virus. After a detailed study of the virus and its life cycle, he proposes ... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Acute cholecystitis",
"B": "Gallbladder cancer",
"C": "Choledocholithiasis",
"D": "Pancreatitis"
},
"question": "A 59-year-old overweight woman presents to the urgent care clinic with the complaint of severe abdominal pain for the past 2 hours. She also compla... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "IL-2",
"B": "IL-10",
"C": "IL-13",
"D": "IL-4"
},
"question": "A 7-year-old boy is brought to his pediatricianβs office for a follow-up visit. He was diagnosed with asthma when he was 3 years old and has since been on treatment for the condition. He is current... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Blinding",
"B": "Restriction",
"C": "Randomization",
"D": "Matching"
},
"question": "A 3-month-old boy is brought the emergency department by his parents after an episode of cyanosis and muscle hypotonia that resolved after 2 minutes. Diagnostic evaluation fai... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Indomethacin +/- omeprazole",
"B": "Ibuprofen + colchicine +/- omeprazole",
"C": "Pericardiocentesis",
"D": "Pericardiectomy"
},
"question": "A 29-year-old man presents to the emergency department due to central chest pain over the past 3 days which is constan... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Hypoglycemia",
"B": "Ethanol intoxication",
"C": "Cannabis intoxication",
"D": "Benzodiazepine intoxication\n\""
},
"question": "A 46-year-old man is brought to the emergency department for evaluation of altered mental status. He was found on the floor in fron... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Travel to Africa",
"B": "Axillary lymph node involvement",
"C": "Previous radiation therapy",
"D": "Previous breast cancer"
},
"question": "A 77-year-old woman presents to the emergency room with the complaints of fever, malaise, and night sweats. She recently... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "22q11 deletion",
"B": "Deletion of genes on chromosome 7",
"C": "Lithium exposure in utero",
"D": "Maternal alcohol consumption"
},
"question": "A 3-month-old infant is brought to her pediatrician because she coughs and seems to have difficulty breathing while... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Legionella pneumophila infection",
"B": "Pneumocystis pneumonia",
"C": "Histoplasma capsulatum infection",
"D": "Blastomyces dermatitidis infection"
},
"question": "A 30-year-old African American woman comes to the physician for the evaluation of a dry cough a... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Streptococcus pneumoniae",
"B": "Mycobacterium tuberculosis",
"C": "Haemophilus influenzae",
"D": "Staphylococcus aureus"
},
"question": "A 62-year-old patient has been hospitalized for a week due to a stroke. One week into the hospitalization, he develops a f... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Intubate with mechanical ventilation",
"B": "Perform needle thoracostomy at the 2nd intercostal space",
"C": "Perform bronchoscopy",
"D": "Provide additional dose of methylprednisolone"
},
"question": "A 6-year-old boy is brought to the emergency department by... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Immunoglobulin class switching",
"B": "Superoxide dismutase",
"C": "Myeloperoxidase",
"D": "Respiratory burst"
},
"question": "A 5-year-old female suffers from recurrent infections by Aspergillus species, Pseudomonas species, and Staphylococcus aureus. The pat... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Increased interstitial markings",
"B": "Lobar consolidation in the lingual",
"C": "Thumbprint sign on the lateral image",
"D": "Steeple sign"
},
"question": "A 3-year-old boy presents to the emergency department with a βcough-like-a-seal barkβ and a high-pitch... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Induction of CYP3A4 by rifampin leading to decreased serum levels of ethinylestradiol and progesterone",
"B": "Induction of CYP2A6 by rifampin leading to increased inactivation of ethinylestradiol",
"C": "Interference with the intestinal absorption of the oral contrac... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Gram stain positive CSF",
"B": "Peripheral eosinophilia",
"C": "Xanthochromia on cerebrospinal fluid analysis",
"D": "Increased cerebrospinal fluid protein with normal cell count"
},
"question": "A 4-year-old previously healthy boy presents with 4 days of inte... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Foot abduction brace",
"B": "Arthrodesis of the forefoot",
"C": "Reassurance",
"D": "Tarsometatarsal capsulotomy"
},
"question": "A 3-week-old male newborn is brought to the physician because of an inward turning of his left forefoot. He was born at 38 weeks' ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Autodigestion of pancreatic parenchyma",
"B": "Fistula between the gallbladder and small intestine",
"C": "Infection with a hepatotropic virus",
"D": "Obstruction of the cystic duct"
},
"question": "A 42-year-old woman comes to the emergency department because... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Mitral valve regurgitation",
"B": "Increased systemic vascular resistance",
"C": "Increased ventricular wall stiffness",
"D": "Impaired left ventricular contractility"
},
"question": "A 72-year-old woman is admitted to the intensive care unit for shortness of ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Doxycycline",
"B": "Trimethoprim/sulfamethoxazole",
"C": "Linezolid",
"D": "Chloramphenicol"
},
"question": "A 22-year-old woman is brought to the emergency department because of a 2-day history of fever, intermittent rigors, and night sweats. She also has a 1... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Serotonin-secreting gastric tumor",
"B": "Proliferation of gastric mucus-producing cells",
"C": "Excessive somatostatin secretion",
"D": "Ectopic secretion of gastrin"
},
"question": "An otherwise healthy 50-year-old man comes to the physician because of a 6-m... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Insulin, potassium, IV fluids, and glucose",
"B": "IV fluids only",
"C": "Oral rehydration",
"D": "Supportive therapy and close monitoring"
},
"question": "A 27-year-old man presents to the emergency department. He was brought in by staff from the homeless she... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Psoriatic arthritis",
"B": "Arthritis mutilans",
"C": "Rheumatoid arthritis",
"D": "Mixed connective tissue disease"
},
"question": "A 67-year-old man who was diagnosed with arthritis 16 years ago presents with right knee swelling and pain. His left knee was s... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Duchenne muscular dystrophy",
"B": "Hypothyroidism",
"C": "Myasthenia gravis",
"D": "Paraneoplastic syndrome from small cell carcinoma of the lung"
},
"question": "A 65-year-old woman schedules an appointment with her physician for evaluation of weight loss an... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Defective T cell function",
"B": "Grossly reduced levels of B cells",
"C": "Defective isotype switching",
"D": "Selective IgA deficiency"
},
"question": "A 3-month-old boy presents to his pediatrician with persistent diarrhea, oral candidiasis, and signs and s... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "0.375",
"B": "0.5",
"C": "2.5",
"D": "2.67"
},
"question": "A 53-year-old man with recurrent pancreatic adenocarcinoma is enrolled in a clinical trial for a novel chemotherapeutic agent that his physician believes may be beneficial to his condition. The novel ... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Arcuate fasciculus",
"B": "Superior temporal gyrus",
"C": "Inferior frontal gyrus + superior temporal gyrus",
"D": "Arcuate fasciculus + inferior frontal gyrus + superior temporal gyrus"
},
"question": "A 67-year-old male is seen by neurology after he was noti... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Hypothyroidism",
"B": "Idiopathic hirsutism",
"C": "Polycystic ovarian syndrome (PCOS)",
"D": "Ovarian hyperthecosis"
},
"question": "A 27-year-old woman presents to the office with concerns about her long struggle with her physical appearance since adolescenc... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Use of atorvastatin",
"B": "Femoro-Ileal artery bypass",
"C": "Strict blood glucose control",
"D": "Lower limb amputation"
},
"question": "Π 43-ΡΠ΅Π°r-old mΠ°n ΡrΠ΅ΡΠ΅ntΡ wΡth tΡnglΡng Π°nd numbnΠ΅ΡΡ of the lowΠ΅r lΡmbΡ for 2 wΠ΅Π΅kΡ. ΠΠ΅ also ΡomΡlΠ°ΡnΡ of ΡΠ΅rΡΡΡtΠ΅nt ΡΠ°Ρ... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Duodenal atresia",
"B": "Meconium ileus",
"C": "Necrotizing enterocolitis",
"D": "Pyloric stenosis"
},
"question": "A one-day-old male is evaluated in the hospital nursery for bilious vomiting. The patient has urinated multiple times since birth but has not ye... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Inferior vena cava",
"B": "Coronary sinus",
"C": "Pulmonary artery",
"D": "Pulmonary vein"
},
"question": "A healthy 23-year-old male is undergoing an exercise stress test as part of his physiology class. If blood were to be sampled at different locations befo... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Globular 10-week sized uterus",
"B": "Adnexal mass",
"C": "Irregular 14-week sized uterus",
"D": "No remarkable physical exam finding"
},
"question": "A 45-year-old G5P4105 presents to her gynecologistβs office with six months of increasingly heavy periods. Sh... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Ethanol",
"B": "Naltrexone",
"C": "Naloxone",
"D": "Fomepizole"
},
"question": "A man is brought into the emergency department by the police department. The officer state that the man has been arrested multiple times for public alcohol intoxication, but recent... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "5",
"B": "16",
"C": "20",
"D": "50"
},
"question": "A medical research study is evaluating an investigational novel drug (medication 1) compared with standard therapy (medication 2) in patients presenting to the emergency department with myocardial infarction ... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Femoropopliteal artery stenosis",
"B": "Acute thrombosis of right popliteal vein",
"C": "Lumbar spinal stenosis",
"D": "Aortoiliac artery stenosis\n\""
},
"question": "A 55-year-old man comes to the physician because of a 6-week history of tingling pain in the... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Perform karyotyping of amniotic fluid",
"B": "Recommend autopsy of the infant",
"C": "Obtain photographs, x-ray imaging, and MRI",
"D": "Obtain consent for parental genetic testing"
},
"question": "A 29-year-old primigravid woman at 35 weeks' gestation is admi... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Sweeping of debris out of the alveoli by ciliated cells",
"B": "Excess mucus production by goblet cells",
"C": "Proliferation of surfactant-secreting cells",
"D": "Proliferation of club cells"
},
"question": "A 67-year-old man is hospitalized after several day... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Induces the formation of thymidine dimers",
"B": "Induces the formation of disulfide bonds",
"C": "Induces deamination of cytosine",
"D": "Induces breaks in double-stranded DNA"
},
"question": "A 65-year-old male is treated for anal carcinoma with therapy incl... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Aldosterone excess",
"B": "Catecholamine-secreting mass",
"C": "Cortisol excess",
"D": "Impaired kidney perfusion"
},
"question": "A 56-year-old man with a history of hypertension presents to his physician with progressive fatigue and new onset muscle cramps. ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Absent UDP-glucuronosyltransferase activity",
"B": "Increased hemoglobin breakdown",
"C": "Increased intestinal bilirubin reabsorption",
"D": "Defective hepatic bile excretion"
},
"question": "A 65-year-old man comes to the physician because of a 1-week histor... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Bethanechol",
"B": "Metoclopramide",
"C": "Atropine",
"D": "Oxybutynin"
},
"question": "A 72-year-old woman is brought to the physician by her daughter because of a 6-month history of worsening short-term memory deficits and social withdrawal. Treatment with g... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Tardive dyskinesia",
"B": "Acute dystonia",
"C": "Pseudoparkinsonism",
"D": "Palsy"
},
"question": "A 61-year-old man with schizophrenia in a locked inpatient psychiatry unit was observed making an unusual smacking motion with his lips, pursing his mouth, and ... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "KOH examination of lesion scrapings",
"B": "Nikolsky's sign on physical exam",
"C": "Gram stain of skin scrapings",
"D": "AFB stain of skin scrapings"
},
"question": "A 17-year-old football player with no significant past medical history, social history, or fa... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Agranulocytosis",
"B": "Shortened QT interval",
"C": "Gynecomastia",
"D": "Weight loss"
},
"question": "An otherwise healthy 26-year-old man comes to the physician for medication counseling after recently being diagnosed with schizophrenia. Risperidone therapy... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "B7 receptor",
"B": "Variable Ξ²-sequence of the T cell receptor",
"C": "CD3",
"D": "IgCAM"
},
"question": "A 15-year-old woman presents with fever, altered mental status and a petechial rash on her lower extremities and back since yesterday evening. She also sa... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Henoch-SchΓΆnlein Purpura",
"B": "Thrombotic thrombocytopenic purpura",
"C": "Hemolytic uremic syndrome",
"D": "Immune thrombocytopenic purpura"
},
"question": "A 2-year-old boy is brought to the physician for evaluation of pallor and increasing lethargy for 2 ... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Patients with this disorder are not further sub-typed",
"B": "Patients do not usually initiate treatment",
"C": "Patients can have a history of both anorexia and bulimia",
"D": "Patients will typically have a BMI between 17β18.5 kg/m2"
},
"question": "A 17-yea... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Giardia lamblia",
"B": "Schistosoma mansoni",
"C": "Salmonella typhi",
"D": "Clostridium perfringens"
},
"question": "A 14-year-old girl is brought to the physician by her father because of fever, chills, abdominal pain, and profuse non-bloody diarrhea. Her sy... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Acetaldehyde",
"B": "Uric acid",
"C": "Cytochrome P-450 enzymes",
"D": "Amylase"
},
"question": "A 22-year-old female college student is treated with metronidazole after presenting to student health services with itching, discharge, and pain in her vagina. At ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Serum iron level",
"B": "Serum B12 level",
"C": "Transferrin",
"D": "No tests required"
},
"question": "A 23-year-old primigravida presents for a regular prenatal care visit at 16 weeks gestation. She complains of increased fatigability, but is otherwise well.... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Insert a βstraight cathβ into the patientβs bladder",
"B": "Aggressive IV fluids",
"C": "Digital rectal exam",
"D": "Renal ultrasound"
},
"question": "An 80-year-old man is transferred from a step-down unit to a med-surg floor in the hospital. He had undergone... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Disruption of cell membrane permeability",
"B": "Disruption of microtubule formation",
"C": "Inhibition of 14-alpha-demethylase",
"D": "Inhibition of beta-glucan synthase"
},
"question": "A healthy 19-year-old man presents to his primary care provider complain... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Bulging disc impinging on lumbar spinal nerve",
"B": "Lytic lesions of the lumbar spine",
"C": "Narrowing of the lumbar disc space",
"D": "Sacroilitis and fusion of the lumbar spine"
},
"question": "A 56-year-old man presents to the clinic complaining of subac... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Get consent from the patient's brother",
"B": "Get consent from the patient",
"C": "Perform emergency laparotomy",
"D": "Delay surgery until parental consent"
},
"question": "A 4-year-old boy is brought to the emergency department because of severe abdominal p... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Transplacental passage of thyroid peroxidase antibodies",
"B": "Transplacental passage of TSH receptor antibodies",
"C": "Transplacental viral infection",
"D": "Opiate use in the mother"
},
"question": "A 3-week-old male newborn is brought to the hospital beca... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Phentolamine",
"B": "Prazosin",
"C": "Nifedipine",
"D": "Nadalol"
},
"question": "A 57-year-old female with a past medical history of alcoholism presents to the emergency room vomiting bright red blood. She is accompanied by her partner, who reports that she h... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Proceed with liver biopsy",
"B": "Refer for surgical resection",
"C": "Refer for radiofrequency ablation",
"D": "Observe and get follow-up imaging in 3 months"
},
"question": "A 65-year-old man with a history of hypertension, obesity, and alcoholic cirrhosis i... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Spontaneous bacterial peritonitis",
"B": "Metabolic alkalosis",
"C": "Portal vein thrombosis",
"D": "Hypoglycemia"
},
"question": "A 66-year-old man is brought to the emergency room by his wife due to abdominal distension and persistent somnolence for the past... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Cardiac contusion",
"B": "Hemorrhage",
"C": "Pulmonary contusion",
"D": "Takotsubo cardiomyopathy"
},
"question": "A 27-year-old man presents to the emergency department after a motor vehicle collision. The patient was the front seat unrestrained driver in a h... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Adding dopamine to his treatment regimen",
"B": "Adding lisinopril to his treatment regimen",
"C": "Liver transplantation",
"D": "Transjugular intrahepatic portosystemic shunting"
},
"question": "A 56-year-old man presents to the emergency department for progr... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Glucocorticoids",
"B": "Methimazole",
"C": "Propranolol",
"D": "Radioiodine therapy"
},
"question": "A 29-year-old woman presents to the clinic after several months of weight loss. She noticed a 6.8 kg (15 lb) unintentional weight loss over the preceding sever... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Wood lamp examination",
"B": "Skin culture",
"C": "Potassium hydroxide preparation",
"D": "Skin biopsy"
},
"question": "A 21-year-old man comes to the physician because of pruritus and a hypopigmented rash on his upper body for 5 days. He first noticed the sym... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "5",
"B": "7",
"C": "18",
"D": "21"
},
"question": "A 5-year-old female is brought to a speech therapist for continuing work on improving her communication skills. She is only able to verbalize two word sentences and has generalized developmental delay. When sh... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Pap smear",
"B": "Biopsy of the mass",
"C": "Incision and drainage",
"D": "Urine gonorrhea and chlamydia testing"
},
"question": "A 62-year old female comes to the physician because of vaginal spotting and urinary urgency for the past 4 days. She has had no fe... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Deposition of urate crystals",
"B": "Deposition of calcium pyrophosphate (CPP) crystals",
"C": "Inflammatory rheumatological syndrome",
"D": "Pathogenic inoculation of microbes"
},
"question": "A 59-year-old man is evaluated for progressive joint pain. There i... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Coarctation of the aorta",
"B": "Persistent truncus arteriosus",
"C": "Transposition of great vessels",
"D": "Tricuspid atresia"
},
"question": "A newborn is found to be extremely cyanotic immediately after birth. He then develops progressive respiratory failu... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Immediate cardiac transplant",
"B": "Watchful waiting while resuscitative fluids are initiated",
"C": "Interrupted 2-0 polypropylene suture with supporting pledgets",
"D": "Needle thoracostomy over the 2nd intercostal space"
},
"question": "A 25-year-old male ... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Hypereosinophilia",
"B": "Reid Index > 50%",
"C": "Non-caseating granulomas",
"D": "Evidence of a necrotizing infection"
},
"question": "A post-mortem lung examination of a 68-year-old male overweight male with evidence of chronic lower extremity edema, a 60 p... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Caspase-9",
"B": "CD15",
"C": "Cyclin-dependent kinase 4",
"D": "Ras pathway transcription factors"
},
"question": "A 54-year-old male makes an appointment with his primary care physician due to chronic fatigue that has left him unable to hike or do other phys... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Desmoplastic",
"B": "Nodular",
"C": "Acral lentiginous",
"D": "Superficial spreading"
},
"question": "A 44-year-old African-American woman comes to the physician for a routine examination. She is concerned about cancer because her uncle died of metastatic mela... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Jaw claudication",
"B": "Heliotrope rash",
"C": "Gastroesophageal reflux",
"D": "Pink plaques with silvery scales"
},
"question": "A 60-year-old woman is brought to the clinic by her daughter for evaluation. The daughter reports that her mother has recently be... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Loss of fallopian tube function following infection",
"B": "Smooth muscle tumor arising from the myometrium",
"C": "Endometrial tissue outside the uterine cavity",
"D": "Increased secretion of androgens and luteinizing hormone"
},
"question": "A 30-year-old wo... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Bicuspid valve",
"B": "Friable irregular masses attached to the valve",
"C": "Papillary muscle rupture",
"D": "Annular calcification"
},
"question": "A 55-year-old truck driver is brought to a physician by his wife. She states that her husband developed a feve... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Measurement of CA-125 levels",
"B": "Hysterectomy",
"C": "Laparoscopy",
"D": "Hysteroscopy"
},
"question": "A previously healthy 30-year-old woman comes to the physician for the evaluation of pain during sexual intercourse for 6 months. She also reports freque... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Blood pressure reading",
"B": "Patientβs weight",
"C": "High LDL-cholesterol",
"D": "Serum glucose level"
},
"question": "A 50-year-old man visits his physician after 20 years of not seeking any medical care. He is concerned about his health after a colleague ... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Diaphragmatic rupture",
"B": "Traumatic bronchial rupture",
"C": "Thoracic aortic rupture",
"D": "Tension pneumothorax"
},
"question": "A 26-year-old woman is brought to the emergency department 20 minutes after being involved in a high-speed motor vehicle col... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Methimazole",
"B": "Propylthiouracil",
"C": "Radioiodine therapy",
"D": "Thyroidectomy"
},
"question": "A 26-year-old G1P0 woman presents to her primary care physicianβs office with feelings of anxiety and trouble with sleep. She finds it difficult initiating ... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Undercooked pork meat",
"B": "Undercooked fish meat",
"C": "Dog feces",
"D": "Freshwater snails"
},
"question": "A 32-year-old woman comes to the physician because of a 3-week history of intermittent loose stools and a 1.2-kg (2.6-lb) weight loss. She immigrat... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "The tricuspid valve is the most common valve affected by bacterial endocarditis in uncorrected tetralogy of Fallot.",
"B": "Normal hemoglobin in patients with tetralogy of Fallot does not rule out iron deficiency anemia.",
"C": "Cerebral arterial thrombosis is more co... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Dementia",
"B": "Opioid intoxication",
"C": "Delirium",
"D": "Urinary tract infection"
},
"question": "Six days after undergoing surgical repair of a hip fracture, a previously healthy 79-year-old woman is agitated and confused. She is unarousable during the d... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Cerebral palsy",
"B": "Diabetes mellitus",
"C": "Down syndrome",
"D": "Rheumatoid arthritis"
},
"question": "A 54-year-old woman with a past medical history of mental retardation, hypertension, and diabetes presents to the emergency department with a change in... | null | null | null | null |
{
"answer": "C",
"options": {
"A": "Tracheal deviation toward the right side",
"B": "Hemoptysis",
"C": "A drop in systolic blood pressure of 14 mmHg during inspiration",
"D": "Paradoxical motion of part of the chest with breathing\n\""
},
"question": "A 24-year-old man is brought to the emergenc... | null | null | null | null |
{
"answer": "D",
"options": {
"A": "Colonoscopy",
"B": "Esophagogastroduodenoscopy",
"C": "Liver function tests",
"D": "MR angiography of the brain"
},
"question": "A 40-year-old man presents to his primary-care doctor for a follow-up of his hypertension. He is asymptomatic at his office visit a... | null | null | null | null |
{
"answer": "A",
"options": {
"A": "Autosomal dominant",
"B": "Autosomal partial dominance",
"C": "X-linked dominant",
"D": "X-linked recessive"
},
"question": "A 17-year-old female is brought to the emergency room by her father because she has been experiencing shortness of breath and chest pai... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Exotoxin release",
"B": "Antigenic variation",
"C": "Polysaccharide capsule",
"D": "Bruton's agammaglobulinemia"
},
"question": "A 26-year-old male presents to his primary care physician with complaints of burning with urination, penile discharge, and intermit... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Lateral cervical film",
"B": "Cervical immobilization",
"C": "IV methylprednisolone",
"D": "Observation overnight"
},
"question": "A 37-year-old man with no significant past medical history is rear-ended in a motor vehicle accident. He reported significant nec... | null | null | null | null |
{
"answer": "B",
"options": {
"A": "Haloperidol",
"B": "Bromocriptine",
"C": "Fluphenazine",
"D": "Risperidone"
},
"question": "A 43-year-old man with a history of schizophrenia, currently controlled with medication, comes in for an appointment with his internist. He is concerned about abnormal ... | null | null | null | null |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Introduction
This folder holds the necessary scripts to download the necessary corpora and create indices for more efficient document retrieval for the FedRAG workflow. The corpora listed below were derived from the MedRAG Toolkit [1].
The currently supported corpora are:
| Corpus | Size | #Doc. | #Snippets | Domain |
|---|---|---|---|---|
| StatPearls [3] | ~2GBs | 9.3k | 301.2k | Clinics |
| Textbooks [4] | ~209MBs | 18 | 125.8k | Medicine |
For index generation we use the FAISS library.
QA Benchmark Datasets
All the QA benchmark datasets are downloaded from the MIRAGE benchmark [1].
TODOs
Support pubmed, wikipedia, mimic-iv-ext-bhc [6], mimic-iv-note [7].
Prerequisites
Install the just command runner and the uv Python package manager, then create a virtual python env with required packages:
uv sync
source .venv/bin/activate
Running
Available Commands
| Command | Description |
|---|---|
just |
List all available commands |
just download |
Download raw datasets (statpearls, textbooks, mirage_qa) |
just chunk |
Chunk the statpearls dataset into smaller pieces |
just process |
Process statpearls corpus into mock/private datasets with FAISS indices |
just process textbooks |
Process textbooks corpus into mock/private datasets with FAISS indices |
just subset |
Create subset datasets for fast experimentation (1% mock, 5% private) |
just upload |
Upload full processed datasets to Hugging Face |
just upload-subsets |
Upload subset datasets to Hugging Face |
Step-by-Step Workflow
1. Download raw datasets
just download
The raw data for the datasets will be saved into raw_data with the following structure:
raw_data/
βββ statpearls/
β βββ statpearls_NBK430685/
β βββ statpearls_NBK430685.tar.gz
βββ textbooks/
β βββ chunk/
β βββ .gitattributes
β βββ README.md
βββ mirage_qa.json
2. Chunk the statpearls dataset
just chunk
This will process the raw statpearls XML files and create chunked JSONL files in raw_data/statpearls/chunk/. For textbooks, the downloaded raw data are already chunked.
3. Process datasets into mock and private splits
just process statpearls # for statpearls
just process textbooks # for textbooks
This will:
- Split the chunked data into mock (1%) and private (99%) datasets
- Build FAISS indices for both splits
- Save everything to
processed_data/[corpus_name]/
The processed data structure:
processed_data/
βββ statpearls/
β βββ mock/
β β βββ chunk/
β β βββ faiss.index
β β βββ all_doc_ids.npy
β βββ private/
β βββ chunk/
β βββ faiss.index
β βββ all_doc_ids.npy
βββ textbooks/
βββ mock/
β βββ chunk/
β βββ faiss.index
β βββ all_doc_ids.npy
βββ private/
βββ chunk/
βββ faiss.index
βββ all_doc_ids.npy
4. Create subsets for fast experimentation (Optional)
just subset statpearls # for statpearls
just subset textbooks # for textbooks
This creates smaller datasets for faster download and experimentation:
- Mock subset: 1% of total data
- Private subset: 5% of total data
- Saved to
subsets/[corpus_name]/
The subset data structure:
subsets/
βββ statpearls/
β βββ mock/ (1% of data)
β β βββ chunk/
β β βββ faiss.index
β β βββ all_doc_ids.npy
β β βββ README.md
β βββ private/ (5% of data)
β βββ chunk/
β βββ faiss.index
β βββ all_doc_ids.npy
β βββ README.md
βββ textbooks/
βββ mock/ (1% of data)
βββ private/ (5% of data)
5. Upload to Hugging Face (Optional)
just upload # Upload full processed datasets
just upload-subsets # Upload subset datasets only
Notes
Corpora
To download the data we use the MedRAG Toolkit and the associated MedRAG dataset repository in Hugging Face, which holds all the curated corpus.
According to the privacy policy of StatPearls, the StatPearls content is not allowed to be distributed.
The StatPearls data are downloading directly from the NCBI Bookshelf and thestatpearls.pyscript provided by MedRAG toolkit is used to chunk the data.
The download.py script is responsible for downloading the corpus and executing the required data chunking operations.
FAISS Indexer
We use the FAISS index library for index creation and querying due to its use simplicity and efficient similarity search.
To map the snippets of each corpus to an embedding space and train and create the corpus index, by default we use the all-MiniLM-L6-v2 sentence-transformer model, which maps sentences & paragraphs to a 384 dimensional dense vector space.
The index is created by the ../fedrag/retriever.py script. To build the FAISS indexer, the function build_faiss_index()
takes as an input the number of chunks (files) upon which the indexer should be built. If the value is set to 0, then all
files are considered during index creation, else only the first [:num_chunks] files are considered. The script
also provides a helper function for document retrieval, assuming the index has already been generated.
Specifically, the function query_faiss_index() reads the created index for the requested dataset, converts the input
query to its embedded representation and performs a similarity search between the query's embedded vector and the
corpus' snippet vectorized formats.
The current implementation of document retrieval for the FAISS index is built with IndexIVFFlat and uses the
faiss.METRIC_L2 metric, which means that the lower the score of a retrieved document the better, since L2 Distance
measures dissimilarity.
If you want to use another embedding model for generating the embeddings, please change the following properties
in the retriever.yaml file.
embedding_model: "sentence-transformers/all-MiniLM-L6-v2"
embedding_dimension: 384
References
Xiong, Guangzhi, Qiao Jin, Zhiyong Lu, and Aidong Zhang. "Benchmarking retrieval-augmented generation for medicine." In Findings of the Association for Computational Linguistics ACL 2024, pp. 6233-6251. 2024
PubMed corpus was created from articles located at: https://pubmed.ncbi.nlm.nih.gov/
StatPearls corpus was created by using 9,330 publicly available StatPearls articles through the NCBI Bookshelf: https://www.ncbi.nlm.nih.gov/books/NBK430685/
Textbooks corpus was used in the work of: Jin, Di, Eileen Pan, Nassim Oufattole, Wei-Hung Weng, Hanyi Fang, and Peter Szolovits. "What disease does this patient have? a large-scale open domain question answering dataset from medical exams." Applied Sciences 11, no. 14 (2021): 6421. The corpus is also available at: https://github.com/jind11/MedQA
Wikipedia corpus was used in the work of: Thakur, Nandan, Nils Reimers, Andreas RΓΌcklΓ©, Abhishek Srivastava, and Iryna Gurevych. "BEIR: A heterogenous benchmark for zero-shot evaluation of information retrieval models." In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (2021). The corpus is also available at: https://huggingface.co/datasets/wikipedia
MIMIC-IV-Ext-BHC: Labeled Clinical Notes Dataset for Hospital Course Summarization v1.2.0 (Feb. 3, 2025). https://physionet.org/content/labelled-notes-hospital-course/1.2.0/
MIMIC-IV-Note: Deidentified free-text clinical notes v2.2 (Jan. 6, 2023). https://www.physionet.org/content/mimic-iv-note/2.2/
References
- Downloads last month
- 29