TriShieldRAG: A Three-Ring Defense-in-Depth Framework Against Knowledge Corruption in Retrieval-Augmented Generation
Paper • 2607.23838 • Published
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
id: string
title: string
text: string
source: string
embeddings/nq_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/hotpotqa_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
ragshield_2m.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
msmarco.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/nq_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/hotpotqa_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
hotpotqa.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/msmarco_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/msmarco_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
to
{'embeddings/nq_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/hotpotqa_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/msmarco_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'ragshield_2m.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'hotpotqa.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'msmarco.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/nq_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/hotpotqa_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/msmarco_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}}
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
id: string
title: string
text: string
source: string
embeddings/nq_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/hotpotqa_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
ragshield_2m.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
msmarco.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/nq_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/hotpotqa_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
hotpotqa.index: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/msmarco_embeddings.npy: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
embeddings/msmarco_embeddings.meta.json: struct<sha256: string, bytes: int64>
child 0, sha256: string
child 1, bytes: int64
to
{'embeddings/nq_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/hotpotqa_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/msmarco_embeddings.npy': {'sha256': Value('string'), 'bytes': Value('int64')}, 'ragshield_2m.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'hotpotqa.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'msmarco.index': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/nq_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/hotpotqa_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}, 'embeddings/msmarco_embeddings.meta.json': {'sha256': Value('string'), 'bytes': Value('int64')}}
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.
Artifacts for TriShieldRAG: A Three-Ring Defense-in-Depth Framework Against Knowledge Corruption in Retrieval-Augmented Generation.
| File | Size | Description |
|---|---|---|
emb_*.npy (27) |
7.7 GB | Embeddings, 100k passages per chunk, corpus order |
nq_ivf_nlist6550.index |
7.8 GB | FAISS IVF index, nlist=6550, inner product |
corpus split, 2,681,468 passagesimport faiss
from huggingface_hub import hf_hub_download
p = hf_hub_download("rpaut03l/trishieldrag-nq-mpnet-embeddings",
"nq_ivf_nlist6550.index", repo_type="dataset")
index = faiss.read_index(p)
index.nprobe = 409
Paper: https://arxiv.org/abs/2607.23838 Code: https://github.com/SPriTLab-iitj/TriShieldRAG and/or https://github.com/rpaut03l/poisonedrag-ragshield-group6-iitj_TriShieldRAG