The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
schema_version: int64
corpus_scope: string
source_filename: string
source_file_hash: string
issuer: string
law_name: string
source_url: string
source_page_count: int64
included_pages: list<item: int64>
child 0, item: int64
excluded_pages: string
extraction_method: string
parent_provisions: int64
retrieval_children_x_x_only: int64
deep_child_policy: string
parent_child_contract: string
embedding_model: string
embedding_endpoint: string
embedding_dimensions: int64
embedding_normalization: string
raw_embedding_norm_min: double
raw_embedding_norm_max: double
created_at: string
embedding_provenance: string
parent_id: string
heading: string
node_role: string
citation_label: string
node_type: string
parent_ref: struct<id: string, node_type: string, structural_id: string, heading: string, structural_path: list< (... 14 chars omitted)
child 0, id: string
child 1, node_type: string
child 2, structural_id: string
child 3, heading: string
child 4, structural_path: list<item: string>
child 0, item: string
retrieval_allowed: bool
content: string
content_sha256: string
citation_id: string
source_sha256: string
structural_path: list<item: string>
child 0, item: string
record_id: string
dataset_id: string
source_section_ids: list<item: string>
child 0, item: string
page_start: int64
page_end: int64
passage_text: string
topic: string
to
{'dataset_id': Value('string'), 'record_id': Value('string'), 'node_role': Value('string'), 'node_type': Value('string'), 'retrieval_allowed': Value('bool'), 'citation_label': Value('string'), 'citation_id': Value('string'), 'source_section_ids': List(Value('string')), 'law_name': Value('string'), 'heading': Value('string'), 'topic': Value('string'), 'parent_id': Value('string'), 'parent_ref': {'id': Value('string'), 'node_type': Value('string'), 'structural_id': Value('string'), 'heading': Value('string'), 'structural_path': List(Value('string'))}, 'structural_path': List(Value('string')), 'page_start': Value('int64'), 'page_end': Value('int64'), 'source_url': Value('string'), 'source_sha256': Value('string'), 'content_sha256': Value('string'), 'content': Value('string'), 'passage_text': Value('string')}
because column names don't match
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 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
schema_version: int64
corpus_scope: string
source_filename: string
source_file_hash: string
issuer: string
law_name: string
source_url: string
source_page_count: int64
included_pages: list<item: int64>
child 0, item: int64
excluded_pages: string
extraction_method: string
parent_provisions: int64
retrieval_children_x_x_only: int64
deep_child_policy: string
parent_child_contract: string
embedding_model: string
embedding_endpoint: string
embedding_dimensions: int64
embedding_normalization: string
raw_embedding_norm_min: double
raw_embedding_norm_max: double
created_at: string
embedding_provenance: string
parent_id: string
heading: string
node_role: string
citation_label: string
node_type: string
parent_ref: struct<id: string, node_type: string, structural_id: string, heading: string, structural_path: list< (... 14 chars omitted)
child 0, id: string
child 1, node_type: string
child 2, structural_id: string
child 3, heading: string
child 4, structural_path: list<item: string>
child 0, item: string
retrieval_allowed: bool
content: string
content_sha256: string
citation_id: string
source_sha256: string
structural_path: list<item: string>
child 0, item: string
record_id: string
dataset_id: string
source_section_ids: list<item: string>
child 0, item: string
page_start: int64
page_end: int64
passage_text: string
topic: string
to
{'dataset_id': Value('string'), 'record_id': Value('string'), 'node_role': Value('string'), 'node_type': Value('string'), 'retrieval_allowed': Value('bool'), 'citation_label': Value('string'), 'citation_id': Value('string'), 'source_section_ids': List(Value('string')), 'law_name': Value('string'), 'heading': Value('string'), 'topic': Value('string'), 'parent_id': Value('string'), 'parent_ref': {'id': Value('string'), 'node_type': Value('string'), 'structural_id': Value('string'), 'heading': Value('string'), 'structural_path': List(Value('string'))}, 'structural_path': List(Value('string')), 'page_start': Value('int64'), 'page_end': Value('int64'), 'source_url': Value('string'), 'source_sha256': Value('string'), 'content_sha256': Value('string'), 'content': Value('string'), 'passage_text': Value('string')}
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.
Thai NCB and BOT Digital Fraud Structural RAG Corpus
Two small, page-anchored Thai corpora prepared for retrieval experiments and classroom-style RAG work. The aim is to make the source structure easier to explore while keeping a clear path back to the original document.
About the experiment
This dataset sits behind a small Qwen3.6-35B-A3B Q5 versus OpenThai 2.0 Legal BF16 test. The short write-up, result table and UI captures are on GitHub: https://github.com/lengtsp/OpenThai-2.0-Legal-Test-Result
This material is shared for education and experiment only. The original legal and notice text is not rewritten or substantively changed here; the dataset only arranges it into a traceable parent-and-child structure for retrieval. The original BOT documents remain the authoritative source.
Who put this together
This dataset and the linked GitHub page were put together by an independent tester as part of the experiment. They are not official model repositories, and the tester is not part of, employed by, or speaking for the teams that develop or publish Qwen or OpenThai 2.0 Legal on Hugging Face or GitHub.
Contents
| Config | Records | Indexable children | Structure |
|---|---|---|---|
ncb_credit_info_act_2559 |
76 | 66 | 9 หมวด parents + one preliminary group; primary มาตรา children only |
bot_digital_fraud_management_2568 |
17 | 11 | 6 top-level parents; ข้อ X.X children only |
Only rows where retrieval_allowed=true may be embedded/indexed. Parent rows have empty content and passage_text, preventing duplicate parent/child embeddings.
How the structure works
- NCB: official BOT copy, pp. 1–18. Exactly 66 primary article children. Source articles
20/1and31/1remain in their adjacent primary groups (20and31); headers/footers are excluded. - Digital Fraud: BOT Notice 57/2568, pp. 2–13. Exactly 11 retrieval/citation children at level
X.X.X.X.Xand lower material remains inside the content of its owningX.Xchild and is never an independent row. - Every child carries
parent_idandparent_reffor direct, inspectable provenance.
Sources
Each record points back to its source URL, page anchor and source SHA-256. The original PDFs are not bundled here. The card does not change the rights attached to the source documents.
- NCB official BOT copy: https://www.bot.or.th/content/dam/bot/documents/th/laws-and-rules/laws-and-regulations/legal-department/7-ncb-act/7-1-ncb-act/7.1.2-Law_TH_CreditBureau%20Updated-2559.pdf
- BOT Digital Fraud Notice 57/2568: https://www.bot.or.th/content/dam/bot/fipcs/documents/FPG/2568/ThaiPDF/25680254.pdf
Data fields
dataset_id, record_id, node_role, node_type, retrieval_allowed, citation_label, citation_id, source_section_ids, law_name, heading, topic, parent_id, parent_ref, structural_path, page_start, page_end, source_url, source_sha256, content_sha256, content, and passage_text.
No question, answer, reference answer, expected citation, model output, embedding vector, or benchmark score is included.
- Downloads last month
- 25