Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
run_id: string
model_name: string
model_revision_requested: null
model_commit: null
model_class: string
dtype: string
quantization: null
enable_thinking: bool
generation_params: struct<do_sample: bool, num_beams: int64, max_new_tokens: int64, repetition_penalty: double, eos_tok (... 34 chars omitted)
  child 0, do_sample: bool
  child 1, num_beams: int64
  child 2, max_new_tokens: int64
  child 3, repetition_penalty: double
  child 4, eos_token_id: int64
  child 5, pad_token_id: int64
seed: int64
batch_size: int64
prompt_template: string
dataset: string
data_file: string
data_sha256: string
n_cases: int64
environment: struct<python: string, torch: string, transformers: string, accelerate: string, cuda: string, gpus:  (... 117 chars omitted)
  child 0, python: string
  child 1, torch: string
  child 2, transformers: string
  child 3, accelerate: string
  child 4, cuda: string
  child 5, gpus: list<item: struct<index: int64, name: string, total_memory_gb: double, compute_capability: string>>
      child 0, item: struct<index: int64, name: string, total_memory_gb: double, compute_capability: string>
          child 0, index: int64
          child 1, name: string
          child 2, total_memory_gb: double
          child 3, compute_capability: string
  child 6, on_kaggle: bool
output_token_ids: list<item: int64>
  child 0, item: int64
expected_reason: string
language: string
rendered_prompt: string
stopped_on_eos: bool
id: string
category: string
case_text: string
scenario_id: string
pair_id: string
evidence_flip: string
question: string
raw_model_output_no_special_tokens: string
raw_model_output: string
generation_seconds: double
n_prompt_tokens: int64
expected_answer: string
n_output_tokens: int64
to
{'id': Value('string'), 'pair_id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'case_text': Value('string'), 'question': Value('string'), 'expected_answer': Value('string'), 'scenario_id': Value('string'), 'expected_reason': Value('string'), 'evidence_flip': Value('string'), 'raw_model_output': Value('string'), 'raw_model_output_no_special_tokens': Value('string'), 'output_token_ids': List(Value('int64')), 'n_prompt_tokens': Value('int64'), 'n_output_tokens': Value('int64'), 'stopped_on_eos': Value('bool'), 'generation_seconds': Value('float64'), 'rendered_prompt': Value('string'), 'model_name': Value('string'), 'model_commit': Value('null'), 'dtype': Value('string'), 'enable_thinking': Value('bool'), 'generation_params': {'do_sample': Value('bool'), 'num_beams': Value('int64'), 'max_new_tokens': Value('int64'), 'repetition_penalty': Value('float64'), 'eos_token_id': Value('int64'), 'pad_token_id': Value('int64')}, 'run_id': Value('string'), 'dataset': Value('string'), 'data_sha256': Value('string')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, 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 127, 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 483, 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 2951, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, 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 547, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, 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 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              run_id: string
              model_name: string
              model_revision_requested: null
              model_commit: null
              model_class: string
              dtype: string
              quantization: null
              enable_thinking: bool
              generation_params: struct<do_sample: bool, num_beams: int64, max_new_tokens: int64, repetition_penalty: double, eos_tok (... 34 chars omitted)
                child 0, do_sample: bool
                child 1, num_beams: int64
                child 2, max_new_tokens: int64
                child 3, repetition_penalty: double
                child 4, eos_token_id: int64
                child 5, pad_token_id: int64
              seed: int64
              batch_size: int64
              prompt_template: string
              dataset: string
              data_file: string
              data_sha256: string
              n_cases: int64
              environment: struct<python: string, torch: string, transformers: string, accelerate: string, cuda: string, gpus:  (... 117 chars omitted)
                child 0, python: string
                child 1, torch: string
                child 2, transformers: string
                child 3, accelerate: string
                child 4, cuda: string
                child 5, gpus: list<item: struct<index: int64, name: string, total_memory_gb: double, compute_capability: string>>
                    child 0, item: struct<index: int64, name: string, total_memory_gb: double, compute_capability: string>
                        child 0, index: int64
                        child 1, name: string
                        child 2, total_memory_gb: double
                        child 3, compute_capability: string
                child 6, on_kaggle: bool
              output_token_ids: list<item: int64>
                child 0, item: int64
              expected_reason: string
              language: string
              rendered_prompt: string
              stopped_on_eos: bool
              id: string
              category: string
              case_text: string
              scenario_id: string
              pair_id: string
              evidence_flip: string
              question: string
              raw_model_output_no_special_tokens: string
              raw_model_output: string
              generation_seconds: double
              n_prompt_tokens: int64
              expected_answer: string
              n_output_tokens: int64
              to
              {'id': Value('string'), 'pair_id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'case_text': Value('string'), 'question': Value('string'), 'expected_answer': Value('string'), 'scenario_id': Value('string'), 'expected_reason': Value('string'), 'evidence_flip': Value('string'), 'raw_model_output': Value('string'), 'raw_model_output_no_special_tokens': Value('string'), 'output_token_ids': List(Value('int64')), 'n_prompt_tokens': Value('int64'), 'n_output_tokens': Value('int64'), 'stopped_on_eos': Value('bool'), 'generation_seconds': Value('float64'), 'rendered_prompt': Value('string'), 'model_name': Value('string'), 'model_commit': Value('null'), 'dtype': Value('string'), 'enable_thinking': Value('bool'), 'generation_params': {'do_sample': Value('bool'), 'num_beams': Value('int64'), 'max_new_tokens': Value('int64'), 'repetition_penalty': Value('float64'), 'eos_token_id': Value('int64'), 'pad_token_id': Value('int64')}, 'run_id': Value('string'), 'dataset': Value('string'), 'data_sha256': Value('string')}
              because column names don't match

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.

ArabicMedReason

A controlled Arabic–English benchmark of matched, minimal-pair clinical reasoning cases. It tests whether a small open-weight language model (Qwen/Qwen3.5-4B) reasons about clinical evidence equally well in both languages. Prepared for the Fatima Institute of Technology (FIT) technical challenge.

Research Question

Do small frontier language models perform clinical reasoning consistently in Arabic compared with English, particularly when small changes in clinical evidence should change the correct conclusion?

Motivation

As an Arabic-speaking AI student, I wanted to know whether a model that looks competent in English stays equally consistent when the same evidence is given in Arabic. I focused on small evidence changes because accuracy alone cannot show whether a model is tracking the decisive fact. Many standard medical benchmarks score only the final answer. They rarely include matched Arabic and English cases, rarely flip a single piece of evidence, and do not check whether the stated reason agrees with the label. An English-only evaluation that scores only the final answer could therefore miss instability that appears only in Arabic.

Benchmark

  • 100 synthetic cases: 50 Arabic (Modern Standard Arabic) and 50 semantically matched English cases.
  • 25 minimal pairs (A/B) per language. One decisive fact differs between A and B and flips the correct answer.
  • 5 categories with 20 cases each: temporal_reasoning, contradiction_detection, missing_evidence, false_premise, causal_reasoning.
  • Columns: id, category, language, pair_id, scenario_id, case_text, question, expected_answer, expected_reason, evidence_flip. Only case_text and question were shown to the model.

Setup

Qwen/Qwen3.5-4B, float16, thinking disabled, greedy decoding (do_sample=False, num_beams=1), max_new_tokens=512, seed 42, batch size 1, Kaggle 2 × Tesla T4. The full configuration and prompt template are in results/evaluation_run_config.json.

Per-case outputs were reviewed using a structured rubric covering final-answer correctness, reason support, unsupported assumptions and error type. Aggregate metrics were then computed from these labels. Reference answers were hidden from the model, raw outputs are preserved exactly, and no LLM judge was used.

Results

Metric Arabic English Overall
Final-answer accuracy 37/50 (74%) 44/50 (88%) 81/100 (81%)
Reason supported 36/50 (72%) 44/50 (88%) 80/100 (80%)
Minimal-pair consistency (A and B both correct) 12/25 (48%) 19/25 (76%) —

Matched scenarios: 35 both correct, 9 English only correct, 2 Arabic only correct, 4 both incorrect (exact McNemar p = 0.065).

Key observations (descriptive; the matched-scenario difference did not reach statistical significance):

  • Arabic accuracy was lower in every category. Minimal-pair consistency was 48% in Arabic against 76% in English.
  • All 12 Arabic errors on binary items were an expected نعم (Yes) answered لا (No). Arabic accuracy was 8/20 on expected-Yes items against 20/20 on expected-No items.
  • The most common error was answer–reason mismatch (8 cases, 6 Arabic): the explanation identified the decisive evidence, but the final label contradicted it.
  • False-premise items were handled comparatively well (19/20).

See analysis/error_analysis.md for the full analysis and limitations.

Blind Spot and Proposed Path Forward

Blind spot. Small frontier models can look competent on standard accuracy benchmarks while their evidence tracking, minimal-pair robustness and answer–reason consistency are weaker in Arabic than in matched English cases.

Proposed path forward (not tested here): Arabic–English matched minimal-pair data; contrastive training on evidence flips; supervision for answer–reason consistency; balanced Yes/No polarity; Arabic instruction tuning across Modern Standard Arabic and dialects; and calibration or abstention when the reasoning and the answer disagree.

Files

data/evaluation.csv                  100-case benchmark
results/evaluation_raw_outputs.jsonl raw model responses (one JSON record per case)
results/evaluation_run_config.json   model, decoding, environment and dataset hash
analysis/summary_metrics.json        all computed metrics
analysis/summary_metrics.csv         headline metrics (long format)
analysis/error_analysis.md           results and error analysis
notebooks/evaluation.ipynb           Kaggle inference notebook

The validation and summary scripts are in the project code repository.

Code repository: https://github.com/ShahadAlsultan/armed Hugging Face dataset: https://huggingface.co/datasets/dataaishahad/ArabicMedReason

Limitations

The cases are synthetic, and only one model, one prompt and one decoding setup were evaluated. With 100 cases and a single review pass with no second reviewer, the results are descriptive. This work makes no claim about real-world clinical safety or medical competence.

Downloads last month
53