The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type string to null
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2303, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1852, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2059, in cast_array_to_feature
_c(array.field(name) if name in array_fields else null_array, subfeature)
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2143, in cast_array_to_feature
return array_cast(
array,
...<2 lines>...
allow_decimal_to_str=allow_decimal_to_str,
)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1854, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2005, in array_cast
raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
TypeError: Couldn't cast array of type string to nullNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
SafeDrug
SafeDrug is a research benchmark for evaluating large language models on pharmacovigilance and drug-safety tasks, including adverse drug event (ADE) prediction, drug–drug interaction (DDI) prediction, polypharmacy risk, mechanism reasoning, evidence grounding, and drug substitution.
Research-use-only warning: SafeDrug is an evaluation resource. It is not a medical device, clinical decision-support system, prescribing tool, or a substitute for professional medical judgment. Benchmark outputs must not be used to diagnose, treat, prescribe, replace drugs, or make patient-specific safety decisions.
Dataset contents
Single_Drug_Globla_Data.jsonl: integrated structural data derived from public drug-safety and clinical-trial resources.data.zip: task-specific train/development/test files for SafeDrug-Large and SafeDrug-Small.- The accompanying code repository contains evaluation scripts and detailed task schemas.
Data provenance
SafeDrug is derived from previously released public research resources,
including CT-ADE, DDInter 2.0, HODDI, SIDER, OFFSIDES, DrugBank, and a
pediatric adverse-drug-reaction resource. Individual records retain
source-related fields where available, such as source_dataset, clinical
trial identifiers, and drug identifier mappings.
The benchmark creators did not prospectively recruit participants or collect new patient data. Source-specific extraction, curation, mapping, deduplication, and task-construction procedures are described in the accompanying paper and repository documentation.
Consent and licensing
SafeDrug reuses public secondary research data. Consent for any underlying human-subject data is governed by the original data providers and studies; the SafeDrug creators did not obtain new participant consent and cannot provide participant-level consent verification beyond the documentation supplied by the original sources.
Users must comply with the licenses, access conditions, attribution requirements, and redistribution restrictions of every underlying source. The repository's software license does not override source-dataset terms. Where a source does not permit unrestricted redistribution, SafeDrug provides derived evaluation artifacts or source pointers rather than relicensing the underlying records. Users are responsible for verifying source-specific terms for their intended use.
Privacy and sensitive information
The released benchmark is intended to contain public, de-identified, or aggregate drug-safety information and does not intentionally include direct personal identifiers such as names, contact information, addresses, or medical-record numbers. Public study identifiers such as NCT numbers may be retained for provenance and traceability.
Because the data are aggregated from heterogeneous external resources, complete absence of residual sensitive or identifying information cannot be guaranteed. Users who discover potential personal or sensitive information should stop processing the affected record and report it to the dataset maintainers. Users must not attempt re-identification or linkage to individual patients.
Potential biases
SafeDrug may inherit biases and coverage gaps from its source datasets, including:
- disproportionate representation of adult populations relative to children and older adults;
- uneven reporting across drugs, adverse events, demographic groups, geographic regions, study phases, and healthcare systems;
- spontaneous-reporting, clinical-trial-selection, indication, and surveillance biases;
- missing or inconsistent demographic, severity, frequency, mechanism, and drug-identifier fields;
- label imbalance, especially in some polypharmacy risk subsets;
- uncertainty introduced by entity normalization, source integration, automated processing, and LLM-assisted construction of selected explanations or rationales;
- temporal limitations because drug knowledge, labeling, and safety guidance change over time.
Benchmark scores should therefore not be interpreted as evidence that a model is safe, clinically validated, unbiased, or equally reliable across populations.
Intended uses
Permitted and intended uses include:
- reproducible research on LLM evaluation for drug safety;
- comparison of model behavior across pharmacovigilance tasks;
- analysis of evidence grounding, robustness, demographic performance gaps, and polypharmacy failure modes;
- development and validation of evaluation methods;
- educational research conducted with appropriate expert supervision.
Out-of-scope and prohibited uses
SafeDrug and models evaluated on it must not be used:
- for diagnosis, treatment, prescribing, dosing, drug substitution, or patient-specific risk assessment;
- as the sole or primary basis for any clinical or regulatory decision;
- to replace a physician, pharmacist, toxicologist, or other qualified healthcare professional;
- to infer or re-identify individual patients;
- to make claims of clinical safety, efficacy, fairness, or regulatory approval based only on benchmark performance;
- in settings that violate the terms of an underlying data source.
Known limitations
- SafeDrug is a benchmark, not a prospective clinical validation study.
- Labels may be incomplete, noisy, outdated, source-dependent, or affected by class imbalance.
- Exact-match and overlap metrics do not fully measure pharmacological reasoning or factual safety.
- LLM-as-a-Judge scores may exhibit calibration and ceiling effects and have not been established as a substitute for clinician evaluation.
- Performance on held-out benchmark examples does not demonstrate safety in real-world clinical workflows.
- SafeDrug-Small contains a limited number of generation examples; conclusions from those tasks should be reported with appropriate uncertainty.
Risk-mitigation recommendations
Researchers should report task-level metrics, class distributions, trivial baselines, sample sizes, and subgroup results rather than a single aggregate score. Generated explanations should be checked against their supplied source context. Any clinical interpretation requires independent review by qualified domain experts. Human evaluation protocols should document reviewer qualifications, agreement, and disagreement resolution.
Maintenance and reporting
Users should cite the SafeDrug paper and all applicable underlying sources. Please use the repository issue or discussion channel to report suspected privacy issues, licensing problems, incorrect labels, data leakage, or other harmful content. Affected records should not be redistributed until reviewed.
For a machine-readable version of these fields, see
responsible_ai_metadata.json.
- Downloads last month
- 40