| { | |
| "version": "1.0", | |
| "description": "50-prompt labeled test set for DSPy Tool Selector training and evaluation", | |
| "created": "2025-11-21", | |
| "ambiguous_query_policy": "If query asks for patients themselves (filtered by condition/medication) -> condition_cohort_tool. If asks for related entities (medications OF patients) -> multi_hop_graph_rag.", | |
| "test_set": [ | |
| { | |
| "id": 1, | |
| "query": "Show me diabetic patients", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Primary test case - simple patient listing by condition" | |
| }, | |
| { | |
| "id": 2, | |
| "query": "Patients with diabetes", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Variant phrasing" | |
| }, | |
| { | |
| "id": 3, | |
| "query": "List patients with hypertension", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Explicit 'list' keyword" | |
| }, | |
| { | |
| "id": 4, | |
| "query": "How many patients have diabetes?", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_count", | |
| "notes": "Count query" | |
| }, | |
| { | |
| "id": 5, | |
| "query": "Count patients with prediabetes", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_count", | |
| "notes": "Explicit count keyword" | |
| }, | |
| { | |
| "id": 6, | |
| "query": "Show me patients with asthma", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Different condition" | |
| }, | |
| { | |
| "id": 7, | |
| "query": "Find patients with heart disease", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "'Find' keyword variant" | |
| }, | |
| { | |
| "id": 8, | |
| "query": "Who has diabetes?", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Colloquial phrasing" | |
| }, | |
| { | |
| "id": 9, | |
| "query": "Patients diagnosed with diabetes", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "'Diagnosed' keyword" | |
| }, | |
| { | |
| "id": 10, | |
| "query": "List diabetic patients", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Adjective form" | |
| }, | |
| { | |
| "id": 11, | |
| "query": "Diabetic patients in the system", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_list", | |
| "notes": "Standalone adjective form" | |
| }, | |
| { | |
| "id": 12, | |
| "query": "Patients with both diabetes and hypertension", | |
| "expected_tool": "condition_cohort_tool", | |
| "category": "cohort_comorbidity", | |
| "notes": "Comorbidity - still asking for patients" | |
| }, | |
| { | |
| "id": 13, | |
| "query": "What medications do diabetic patients take?", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Asks for related entity (medications)" | |
| }, | |
| { | |
| "id": 14, | |
| "query": "Show medications for patients with diabetes", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Medications OF patients with condition" | |
| }, | |
| { | |
| "id": 15, | |
| "query": "Find conditions in patients taking metformin", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Conditions OF patients on medication" | |
| }, | |
| { | |
| "id": 16, | |
| "query": "Medications for hypertensive patients", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Shortened relationship query" | |
| }, | |
| { | |
| "id": 17, | |
| "query": "What drugs are prescribed for diabetes?", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Drug-condition relationship" | |
| }, | |
| { | |
| "id": 18, | |
| "query": "Patients with diabetes who take metformin", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Intersection query - condition AND medication" | |
| }, | |
| { | |
| "id": 19, | |
| "query": "Diabetic patients on insulin", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Ambiguous but involves medication - traversal needed" | |
| }, | |
| { | |
| "id": 20, | |
| "query": "How many diabetic patients take metformin?", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Count of intersection" | |
| }, | |
| { | |
| "id": 21, | |
| "query": "What conditions do patients on lisinopril have?", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Medication to condition traversal" | |
| }, | |
| { | |
| "id": 22, | |
| "query": "Common medications among diabetic patients", | |
| "expected_tool": "multi_hop_graph_rag", | |
| "category": "relationship", | |
| "notes": "Aggregation over relationship" | |
| }, | |
| { | |
| "id": 23, | |
| "query": "How many male patients?", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Gender count" | |
| }, | |
| { | |
| "id": 24, | |
| "query": "Show female patients", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Gender filter" | |
| }, | |
| { | |
| "id": 25, | |
| "query": "Gender breakdown", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Distribution query" | |
| }, | |
| { | |
| "id": 26, | |
| "query": "Race distribution", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Demographic stats" | |
| }, | |
| { | |
| "id": 27, | |
| "query": "Database statistics", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "General stats" | |
| }, | |
| { | |
| "id": 28, | |
| "query": "Total patient count", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Overall count" | |
| }, | |
| { | |
| "id": 29, | |
| "query": "How many patients in the database?", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Database-level query" | |
| }, | |
| { | |
| "id": 30, | |
| "query": "Age distribution of patients", | |
| "expected_tool": "demographics_analytics_tool", | |
| "category": "demographics", | |
| "notes": "Age demographic" | |
| }, | |
| { | |
| "id": 31, | |
| "query": "Most prescribed medication", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Top-1 medication" | |
| }, | |
| { | |
| "id": 32, | |
| "query": "Most common condition", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Top-1 condition" | |
| }, | |
| { | |
| "id": 33, | |
| "query": "Top medications", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Top-N medications" | |
| }, | |
| { | |
| "id": 34, | |
| "query": "What is the most prescribed drug?", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Question form" | |
| }, | |
| { | |
| "id": 35, | |
| "query": "Most frequent diagnosis", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Variant wording" | |
| }, | |
| { | |
| "id": 36, | |
| "query": "Top 10 conditions", | |
| "expected_tool": "topn_analytics_tool", | |
| "category": "topn", | |
| "notes": "Explicit N" | |
| }, | |
| { | |
| "id": 37, | |
| "query": "Find patient John Smith", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "Name search" | |
| }, | |
| { | |
| "id": 38, | |
| "query": "Search for Maria Rodriguez", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "Alternate wording" | |
| }, | |
| { | |
| "id": 39, | |
| "query": "Look up patient MRN 12345", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "MRN search" | |
| }, | |
| { | |
| "id": 40, | |
| "query": "Find John Doe", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "Minimal form" | |
| }, | |
| { | |
| "id": 41, | |
| "query": "Patient named Williams", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "Last name search" | |
| }, | |
| { | |
| "id": 42, | |
| "query": "Search patient Robert", | |
| "expected_tool": "find_patient", | |
| "category": "patient_lookup", | |
| "notes": "First name search" | |
| }, | |
| { | |
| "id": 43, | |
| "query": "What medications is this patient taking?", | |
| "expected_tool": "get_medications", | |
| "category": "patient_data", | |
| "notes": "Current patient context" | |
| }, | |
| { | |
| "id": 44, | |
| "query": "Show diagnoses for patient", | |
| "expected_tool": "get_medications", | |
| "category": "patient_data", | |
| "notes": "Patient-specific data" | |
| }, | |
| { | |
| "id": 45, | |
| "query": "Get encounters for patient", | |
| "expected_tool": "get_encounters", | |
| "category": "patient_data", | |
| "notes": "Encounter history" | |
| }, | |
| { | |
| "id": 46, | |
| "query": "Patient's medication list", | |
| "expected_tool": "get_medications", | |
| "category": "patient_data", | |
| "notes": "Possessive form" | |
| }, | |
| { | |
| "id": 47, | |
| "query": "What is the weather?", | |
| "expected_tool": "out_of_scope", | |
| "category": "out_of_scope", | |
| "notes": "Non-medical query" | |
| }, | |
| { | |
| "id": 48, | |
| "query": "Write me a poem", | |
| "expected_tool": "out_of_scope", | |
| "category": "out_of_scope", | |
| "notes": "Creative request" | |
| }, | |
| { | |
| "id": 49, | |
| "query": "Tell me a joke", | |
| "expected_tool": "out_of_scope", | |
| "category": "out_of_scope", | |
| "notes": "Entertainment request" | |
| }, | |
| { | |
| "id": 50, | |
| "query": "How do I cook pasta?", | |
| "expected_tool": "out_of_scope", | |
| "category": "out_of_scope", | |
| "notes": "Unrelated topic" | |
| } | |
| ], | |
| "category_distribution": { | |
| "cohort_list": 11, | |
| "cohort_count": 2, | |
| "cohort_comorbidity": 1, | |
| "relationship": 10, | |
| "demographics": 8, | |
| "topn": 6, | |
| "patient_lookup": 6, | |
| "patient_data": 4, | |
| "out_of_scope": 4 | |
| }, | |
| "tool_distribution": { | |
| "condition_cohort_tool": 12, | |
| "multi_hop_graph_rag": 10, | |
| "demographics_analytics_tool": 8, | |
| "topn_analytics_tool": 6, | |
| "find_patient": 6, | |
| "get_medications": 3, | |
| "get_encounters": 1, | |
| "out_of_scope": 4 | |
| } | |
| } | |