The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
epoch: int64
metrics: struct<MRR: double, Hit@1: double, Hit@3: double, Hit@5: double, Hit@10: double, positive_recall@5: (... 110 chars omitted)
child 0, MRR: double
child 1, Hit@1: double
child 2, Hit@3: double
child 3, Hit@5: double
child 4, Hit@10: double
child 5, positive_recall@5: double
child 6, first_positive_rank_mean: double
child 7, first_positive_rank_median: double
child 8, first_positive_rank_p90: double
base_model: string
revision: string
classifier_frozen: bool
selection_primary: string
selection_secondary: string
monteclora_config: null
arrow_config: null
target_modules: list<item: string>
child 0, item: string
lora_alpha: int64
modules_to_save: null
base_model_name_or_path: string
use_qalora: bool
r: int64
exclude_modules: null
ensure_weight_tying: bool
lora_ga_config: null
peft_version: string
use_dora: bool
auto_mapping: struct<base_model_class: string, parent_library: string>
child 0, base_model_class: string
child 1, parent_library: string
bias: string
init_lora_weights: bool
megatron_core: string
qalora_group_size: int64
alpha_pattern: struct<>
peft_type: string
trainable_token_indices: null
task_type: null
corda_config: null
eva_config: null
layers_to_transform: null
layer_replication: null
layers_pattern: null
loftq_config: struct<>
use_bdlora: null
fan_in_fan_out: bool
rank_pattern: struct<>
lora_bias: bool
alora_invocation_tokens: null
target_parameters: null
inference_mode: bool
velora_config: null
lora_dropout: double
megatron_config: null
use_rslora: bool
to
{'alora_invocation_tokens': Value('null'), 'alpha_pattern': {}, 'arrow_config': Value('null'), 'auto_mapping': {'base_model_class': Value('string'), 'parent_library': Value('string')}, 'base_model_name_or_path': Value('string'), 'bias': Value('string'), 'corda_config': Value('null'), 'ensure_weight_tying': Value('bool'), 'eva_config': Value('null'), 'exclude_modules': Value('null'), 'fan_in_fan_out': Value('bool'), 'inference_mode': Value('bool'), 'init_lora_weights': Value('bool'), 'layer_replication': Value('null'), 'layers_pattern': Value('null'), 'layers_to_transform': Value('null'), 'loftq_config': {}, 'lora_alpha': Value('int64'), 'lora_bias': Value('bool'), 'lora_dropout': Value('float64'), 'lora_ga_config': Value('null'), 'megatron_config': Value('null'), 'megatron_core': Value('string'), 'modules_to_save': Value('null'), 'monteclora_config': Value('null'), 'peft_type': Value('string'), 'peft_version': Value('string'), 'qalora_group_size': Value('int64'), 'r': Value('int64'), 'rank_pattern': {}, 'revision': Value('null'), 'target_modules': List(Value('string')), 'target_parameters': Value('null'), 'task_type': Value('null'), 'trainable_token_indices': Value('null'), 'use_bdlora': Value('null'), 'use_dora': Value('bool'), 'use_qalora': Value('bool'), 'use_rslora': Value('bool'), 'velora_config': Value('null')}
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 2840, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, 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 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
epoch: int64
metrics: struct<MRR: double, Hit@1: double, Hit@3: double, Hit@5: double, Hit@10: double, positive_recall@5: (... 110 chars omitted)
child 0, MRR: double
child 1, Hit@1: double
child 2, Hit@3: double
child 3, Hit@5: double
child 4, Hit@10: double
child 5, positive_recall@5: double
child 6, first_positive_rank_mean: double
child 7, first_positive_rank_median: double
child 8, first_positive_rank_p90: double
base_model: string
revision: string
classifier_frozen: bool
selection_primary: string
selection_secondary: string
monteclora_config: null
arrow_config: null
target_modules: list<item: string>
child 0, item: string
lora_alpha: int64
modules_to_save: null
base_model_name_or_path: string
use_qalora: bool
r: int64
exclude_modules: null
ensure_weight_tying: bool
lora_ga_config: null
peft_version: string
use_dora: bool
auto_mapping: struct<base_model_class: string, parent_library: string>
child 0, base_model_class: string
child 1, parent_library: string
bias: string
init_lora_weights: bool
megatron_core: string
qalora_group_size: int64
alpha_pattern: struct<>
peft_type: string
trainable_token_indices: null
task_type: null
corda_config: null
eva_config: null
layers_to_transform: null
layer_replication: null
layers_pattern: null
loftq_config: struct<>
use_bdlora: null
fan_in_fan_out: bool
rank_pattern: struct<>
lora_bias: bool
alora_invocation_tokens: null
target_parameters: null
inference_mode: bool
velora_config: null
lora_dropout: double
megatron_config: null
use_rslora: bool
to
{'alora_invocation_tokens': Value('null'), 'alpha_pattern': {}, 'arrow_config': Value('null'), 'auto_mapping': {'base_model_class': Value('string'), 'parent_library': Value('string')}, 'base_model_name_or_path': Value('string'), 'bias': Value('string'), 'corda_config': Value('null'), 'ensure_weight_tying': Value('bool'), 'eva_config': Value('null'), 'exclude_modules': Value('null'), 'fan_in_fan_out': Value('bool'), 'inference_mode': Value('bool'), 'init_lora_weights': Value('bool'), 'layer_replication': Value('null'), 'layers_pattern': Value('null'), 'layers_to_transform': Value('null'), 'loftq_config': {}, 'lora_alpha': Value('int64'), 'lora_bias': Value('bool'), 'lora_dropout': Value('float64'), 'lora_ga_config': Value('null'), 'megatron_config': Value('null'), 'megatron_core': Value('string'), 'modules_to_save': Value('null'), 'monteclora_config': Value('null'), 'peft_type': Value('string'), 'peft_version': Value('string'), 'qalora_group_size': Value('int64'), 'r': Value('int64'), 'rank_pattern': {}, 'revision': Value('null'), 'target_modules': List(Value('string')), 'target_parameters': Value('null'), 'task_type': Value('null'), 'trainable_token_indices': Value('null'), 'use_bdlora': Value('null'), 'use_dora': Value('bool'), 'use_qalora': Value('bool'), 'use_rslora': Value('bool'), 'velora_config': Value('null')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
VietLegal-RAG Runtime Artifacts
Public runtime artifact repository for VietLegal-RAG, an evidence-grounded Vietnamese legal question-answering system.
This repository is artifact hosting, not a conventional tabular dataset. The Hugging Face Dataset Viewer is therefore not expected to provide a normal row/column preview.
Project
VietLegal-RAG combines hybrid legal retrieval, chunk-level neural reranking, structured legal evidence aggregation, grounded generation, citation validation, deterministic citation repair, and a conservative final shipping gate.
Canonical runtime architecture:
Question
↓
Query normalization
↓
Dense Parent + VietLegal-Harrier Chunk + BM25 Parent + BM25 Chunk
↓
Weighted Reciprocal Rank Fusion
↓
Parent-local expansion + direct chunk candidates
↓
V3 chunk-only neural reranker
↓
Top evidence chunks
↓
Structured legal evidence aggregation
↓
Qwen3.5-2B + Stage2-v2 grounded generation
↓
Citation + grounding validation
↓
Deterministic citation repair when uniquely supported
↓
Mandatory revalidation
↓
Final grounded answer + trusted evidence
Runtime artifact bundle
The frozen runtime bundle contains 151 project-specific files with a total size of approximately 4.592 GiB.
It includes:
- dense parent embeddings and metadata
- VietLegal-Harrier chunk retrieval shards and metadata
- SQLite FTS5 BM25 parent/chunk stores
- canonical corpus SQLite runtime store
- V3 reranker LoRA adapter
- Stage2-v2 generator LoRA adapter
- generator tokenizer/runtime compatibility files
- integrity metadata used by the public downloader
Runtime artifacts are verified by size and SHA256 through the project's artifact_manifest.json.
Reproducibility
Frozen source release:
Git tag : v2.1.0
Source commit : a0c3d8e3498bf3c7a42e03431eba23a9d4cf562f
Frozen artifact revision used by the public downloader:
17876627834fa9982b5c57cad3fb54394591ee32
The artifact manifest uses commit-pinned Hugging Face URLs. Updating this Dataset Card creates a newer repository HEAD but does not change the immutable artifact revision above or the files downloaded by the frozen v2.1.0 manifest.
Download
Clone the source repository and run:
git clone https://github.com/GiaPhucs/VietLegal-RAG.git
cd VietLegal-RAG
pip install -e .
python scripts/download_artifacts.py
Then verify the runtime layout:
python scripts/run_pipeline.py --check-only
Run a legal question:
python scripts/run_pipeline.py --question "Thời điểm nào sẽ thông báo phạm nhân hết hạn chấp hành án phạt tù?"
VietLegal-RAG v2.1.0 benchmark
The primary v2.1.0 evaluation uses a frozen 200-query final holdout (finalholdout200).
- Train5600 query-ID overlap: 0
- Historical Dev600 query-ID overlap: 0
- Silver Oracle coverage: 200/200
- Oracle used during inference: No
- Runtime errors: 0
- Benchmark SHA256:
66167e8b5845be10115fe46dbbb8178e0e461ad1c6c8a4e9fba5b221f2c069be - Retrieval/reranking protocol:
afe7b10870b5855d - Generation/grounding protocol:
8edf37148b32a119
| Category | Metric | Result |
|---|---|---|
| Retrieval | Hybrid Parent AnyHit@5 | 91.00% |
| Retrieval | Hybrid Parent MRR@20 | 0.7469 |
| Reranking | V3 Exact AnyHit@5 | 80.00% |
| Reranking | V3 Parent AnyHit@5 | 97.00% |
| Reranking | V3 Parent MRR@20 | 0.8404 |
| Candidate Pool | Any Exact Gold | 98.00% |
| Candidate Pool | Any Parent Gold | 99.50% |
| Evidence | Silver Parent Precision | 51.59% |
| Evidence | Silver Parent Recall | 41.78% |
| Trusted Citation | Parent Precision | 72.73% |
| Trusted Citation | Parent Recall | 12.81% |
| Trusted Citation | Coverage | 41.03% |
| Grounding Proxy | Supported Claim Rate | 88.02% |
| Grounding Proxy | Unsupported Claim Rate | 3.49% |
| Shipping Gate | PASS | 42.50% |
The deterministic citation repair layer reduced explicit citation mismatches from 93 to 6, a 93.55% reduction.
Runtime — Tesla T4
| Stage | p50 | p95 |
|---|---|---|
| Retrieval + V3 reranking | 14.15 s | 16.21 s |
| Generator | 59.54 s | 61.81 s |
| Full downstream generation/validation | 59.59 s | 61.95 s |
- Retrieval throughput: 0.0705 queries/s
- Generator throughput: 8.36 tokens/s
- Retrieval/V3 peak CUDA allocated: 6.70 GB
- Generator peak VRAM: 2.14 GB
Full benchmark documentation
- Full benchmark report
- Machine-readable JSON summary
- Metrics CSV
- Benchmark documentation commit:
ed47a9dddd81f9d542d0694bd5fa00586b06b4a9
Evaluation notes and limitations
Evidence and citation metrics use answer-aware Silver Oracle labels. They are not official human-annotated gold citation labels.
Silver Oracle evidence is used only for evaluation and is never used during inference.
Supported/unsupported claim metrics are generated by the frozen deterministic legal-aware lexical validator. The reported 3.49% Unsupported Claim Rate must not be described as a definitive hallucination rate.
The 42.50% shipping-gate PASS rate is not answer accuracy. It measures compliance with the deliberately conservative runtime citation and grounding release gate.
Historical Dev600 and competition-era generation metrics are not the primary v2.1.0 benchmark.
Artifact safety / scope
This public repository contains runtime artifacts required to reproduce the released pipeline. Per-query benchmark outputs and Silver Oracle evaluation labels are intentionally not published here.
Generated legal answers should not be treated as professional legal advice. The project is an engineering and research system for evidence-grounded Vietnamese legal question answering.
- Downloads last month
- 144