Publish artifacts for clinical-rag-safety-gateway-20260815
Browse files- README.md +59 -0
- data/test.jsonl +4 -0
- data/train.jsonl +14 -0
- project.json +52 -0
- sources.json +12 -0
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: Clinical RAG Safety Gateway Synthetic Evaluation Set
|
| 6 |
+
size_categories:
|
| 7 |
+
- n<1K
|
| 8 |
+
task_categories:
|
| 9 |
+
- question-answering
|
| 10 |
+
tags:
|
| 11 |
+
- synthetic
|
| 12 |
+
- healthcare-ai
|
| 13 |
+
- evaluation
|
| 14 |
+
- question-answering
|
| 15 |
+
- sentence-similarity
|
| 16 |
+
- text-classification
|
| 17 |
+
- summarization
|
| 18 |
+
configs:
|
| 19 |
+
- config_name: default
|
| 20 |
+
data_files:
|
| 21 |
+
- split: train
|
| 22 |
+
path: data/train.jsonl
|
| 23 |
+
- split: test
|
| 24 |
+
path: data/test.jsonl
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
# Clinical RAG Safety Gateway Synthetic Dataset
|
| 28 |
+
|
| 29 |
+
## Summary
|
| 30 |
+
|
| 31 |
+
This dataset contains 14 training examples and 4
|
| 32 |
+
held-out examples for **Clinical assistants need retrieval, source attribution, and explicit abstention before answers reach care teams.**
|
| 33 |
+
|
| 34 |
+
Every record is synthetic and includes:
|
| 35 |
+
|
| 36 |
+
- `input`: query, event, or feature description
|
| 37 |
+
- `label`: expected class, route, relation, or evidence category
|
| 38 |
+
- `context`: synthetic supporting context
|
| 39 |
+
- `source`: fictional source identifier
|
| 40 |
+
- `variant`: generation pattern
|
| 41 |
+
- `synthetic`: always `true`
|
| 42 |
+
|
| 43 |
+
## Uses
|
| 44 |
+
|
| 45 |
+
- Reproducible unit and integration tests
|
| 46 |
+
- Baseline model training
|
| 47 |
+
- Evaluation harness development
|
| 48 |
+
- Schema and architecture demonstrations
|
| 49 |
+
|
| 50 |
+
## Limitations
|
| 51 |
+
|
| 52 |
+
Synthetic educational data only. The baseline must not provide diagnosis, treatment, or emergency medical advice.
|
| 53 |
+
|
| 54 |
+
This dataset does not represent real users, patients, customers, production
|
| 55 |
+
traffic, or licensed media. It must not be presented as real-world evidence.
|
| 56 |
+
|
| 57 |
+
## Related Model
|
| 58 |
+
|
| 59 |
+
[RKB109/clinical-rag-safety-gateway-20260815-model](https://huggingface.co/RKB109/clinical-rag-safety-gateway-20260815-model)
|
data/test.jsonl
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id":"clinical-rag-safety-2-1","input":"What requires pharmacist review?","label":"medication-policy","context":"High-risk medication changes require pharmacist review before release.","source":"med-policy-02","variant":"direct","synthetic":true}
|
| 2 |
+
{"id":"clinical-rag-safety-3-2","input":"In an operations review, When should urgent symptoms be escalated?","label":"triage-policy","context":"Urgent or life-threatening symptoms require immediate escalation to qualified clinical staff.","source":"triage-01","variant":"operations","synthetic":true}
|
| 3 |
+
{"id":"clinical-rag-safety-4-3","input":"For an evaluation case, Can the assistant diagnose a patient?","label":"triage-policy","context":"The assistant must abstain from diagnosis and direct the user to a qualified clinician.","source":"triage-02","variant":"evaluation","synthetic":true}
|
| 4 |
+
{"id":"clinical-rag-safety-6-1","input":"Can protected health data be used in test prompts?","label":"privacy-policy","context":"Use synthetic or properly de-identified records for testing and evaluation.","source":"privacy-02","variant":"direct","synthetic":true}
|
data/train.jsonl
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"id":"clinical-rag-safety-1-1","input":"When should medication reconciliation be completed?","label":"medication-policy","context":"Complete medication reconciliation during admission, transfer, and discharge.","source":"med-policy-01","variant":"direct","synthetic":true}
|
| 2 |
+
{"id":"clinical-rag-safety-1-2","input":"In an operations review, When should medication reconciliation be completed?","label":"medication-policy","context":"Complete medication reconciliation during admission, transfer, and discharge.","source":"med-policy-01","variant":"operations","synthetic":true}
|
| 3 |
+
{"id":"clinical-rag-safety-1-3","input":"For an evaluation case, When should medication reconciliation be completed?","label":"medication-policy","context":"Complete medication reconciliation during admission, transfer, and discharge.","source":"med-policy-01","variant":"evaluation","synthetic":true}
|
| 4 |
+
{"id":"clinical-rag-safety-2-2","input":"In an operations review, What requires pharmacist review?","label":"medication-policy","context":"High-risk medication changes require pharmacist review before release.","source":"med-policy-02","variant":"operations","synthetic":true}
|
| 5 |
+
{"id":"clinical-rag-safety-2-3","input":"For an evaluation case, What requires pharmacist review?","label":"medication-policy","context":"High-risk medication changes require pharmacist review before release.","source":"med-policy-02","variant":"evaluation","synthetic":true}
|
| 6 |
+
{"id":"clinical-rag-safety-3-1","input":"When should urgent symptoms be escalated?","label":"triage-policy","context":"Urgent or life-threatening symptoms require immediate escalation to qualified clinical staff.","source":"triage-01","variant":"direct","synthetic":true}
|
| 7 |
+
{"id":"clinical-rag-safety-3-3","input":"For an evaluation case, When should urgent symptoms be escalated?","label":"triage-policy","context":"Urgent or life-threatening symptoms require immediate escalation to qualified clinical staff.","source":"triage-01","variant":"evaluation","synthetic":true}
|
| 8 |
+
{"id":"clinical-rag-safety-4-1","input":"Can the assistant diagnose a patient?","label":"triage-policy","context":"The assistant must abstain from diagnosis and direct the user to a qualified clinician.","source":"triage-02","variant":"direct","synthetic":true}
|
| 9 |
+
{"id":"clinical-rag-safety-4-2","input":"In an operations review, Can the assistant diagnose a patient?","label":"triage-policy","context":"The assistant must abstain from diagnosis and direct the user to a qualified clinician.","source":"triage-02","variant":"operations","synthetic":true}
|
| 10 |
+
{"id":"clinical-rag-safety-5-1","input":"How should patient identifiers be handled?","label":"privacy-policy","context":"Use the minimum necessary patient information and never place identifiers in public logs.","source":"privacy-01","variant":"direct","synthetic":true}
|
| 11 |
+
{"id":"clinical-rag-safety-5-2","input":"In an operations review, How should patient identifiers be handled?","label":"privacy-policy","context":"Use the minimum necessary patient information and never place identifiers in public logs.","source":"privacy-01","variant":"operations","synthetic":true}
|
| 12 |
+
{"id":"clinical-rag-safety-5-3","input":"For an evaluation case, How should patient identifiers be handled?","label":"privacy-policy","context":"Use the minimum necessary patient information and never place identifiers in public logs.","source":"privacy-01","variant":"evaluation","synthetic":true}
|
| 13 |
+
{"id":"clinical-rag-safety-6-2","input":"In an operations review, Can protected health data be used in test prompts?","label":"privacy-policy","context":"Use synthetic or properly de-identified records for testing and evaluation.","source":"privacy-02","variant":"operations","synthetic":true}
|
| 14 |
+
{"id":"clinical-rag-safety-6-3","input":"For an evaluation case, Can protected health data be used in test prompts?","label":"privacy-policy","context":"Use synthetic or properly de-identified records for testing and evaluation.","source":"privacy-02","variant":"evaluation","synthetic":true}
|
project.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "Clinical RAG Safety Gateway",
|
| 3 |
+
"problem": "Clinical assistants need retrieval, source attribution, and explicit abstention before answers reach care teams.",
|
| 4 |
+
"domain": "healthcare-ai",
|
| 5 |
+
"architecture": "retrieval",
|
| 6 |
+
"hugging_face_tasks": [
|
| 7 |
+
"question-answering",
|
| 8 |
+
"sentence-similarity",
|
| 9 |
+
"text-classification",
|
| 10 |
+
"summarization"
|
| 11 |
+
],
|
| 12 |
+
"recommended_stack": [
|
| 13 |
+
"FastAPI for typed service endpoints",
|
| 14 |
+
"LangGraph for durable safety and escalation workflows",
|
| 15 |
+
"LlamaIndex for ingestion and retrieval abstractions",
|
| 16 |
+
"PostgreSQL plus pgvector for filtered vector search",
|
| 17 |
+
"Redis for caching and rate limiting",
|
| 18 |
+
"OpenTelemetry plus Phoenix for traces and evaluation"
|
| 19 |
+
],
|
| 20 |
+
"real_world_data_sources": [
|
| 21 |
+
{
|
| 22 |
+
"name": "ClinicalTrials.gov API v2",
|
| 23 |
+
"url": "https://clinicaltrials.gov/api/v2/studies?pageSize=5",
|
| 24 |
+
"purpose": "Public study metadata for retrieval and citation tests"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "openFDA drug labels",
|
| 28 |
+
"url": "https://api.fda.gov/drug/label.json?limit=5",
|
| 29 |
+
"purpose": "Public drug-label text for safety-oriented ingestion"
|
| 30 |
+
}
|
| 31 |
+
],
|
| 32 |
+
"job_description_skills": [
|
| 33 |
+
"Production RAG design and retrieval evaluation",
|
| 34 |
+
"Healthcare AI safety, abstention, and auditability",
|
| 35 |
+
"Vector databases and metadata-aware retrieval",
|
| 36 |
+
"Agent orchestration with human review",
|
| 37 |
+
"LLMOps tracing, regression tests, and release gates"
|
| 38 |
+
],
|
| 39 |
+
"impact_targets": [
|
| 40 |
+
"Reach Recall@5 >= 0.85 on a reviewed retrieval set",
|
| 41 |
+
"Maintain 100% citation coverage for non-abstained answers",
|
| 42 |
+
"Block 100% of diagnosis or emergency-advice test prompts",
|
| 43 |
+
"Keep p95 retrieval latency below 300 ms at 50 requests/second"
|
| 44 |
+
],
|
| 45 |
+
"baseline_evaluation": {
|
| 46 |
+
"test_examples": 4,
|
| 47 |
+
"accuracy": 1,
|
| 48 |
+
"synthetic_evaluation": true
|
| 49 |
+
},
|
| 50 |
+
"estimated_delivery": "8-12 weeks for one engineer",
|
| 51 |
+
"generated_baseline_is_production_ready": false
|
| 52 |
+
}
|
sources.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"name": "ClinicalTrials.gov API v2",
|
| 4 |
+
"url": "https://clinicaltrials.gov/api/v2/studies?pageSize=5",
|
| 5 |
+
"purpose": "Public study metadata for retrieval and citation tests"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"name": "openFDA drug labels",
|
| 9 |
+
"url": "https://api.fda.gov/drug/label.json?limit=5",
|
| 10 |
+
"purpose": "Public drug-label text for safety-oriented ingestion"
|
| 11 |
+
}
|
| 12 |
+
]
|