rpaut03l commited on
Commit
0a643cf
·
verified ·
1 Parent(s): 8fffec3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +21 -31
README.md CHANGED
@@ -1,42 +1,32 @@
1
  ---
2
  license: apache-2.0
3
- task_categories:
4
- - feature-extraction
5
- tags:
6
- - rag
7
- - retrieval
8
- - embeddings
9
- - rag-security
10
  ---
11
 
12
- # TriShieldRAG — BeIR NQ corpus embeddings
13
 
14
- Precomputed sentence embeddings for the full BeIR Natural Questions
15
- corpus, used in the evaluation of TriShieldRAG.
16
 
17
- | | |
18
- |---|---|
19
- | Corpus | BeIR/nq, `corpus` split |
20
- | Passages | 2,681,468 |
21
- | Model | sentence-transformers/all-mpnet-base-v2 |
22
- | Dimension | 768 |
23
- | Normalized | yes (unit L2, for inner-product search) |
24
- | Precision | float32 |
25
- | Format | 27 `.npy` chunks of 100k, ordered by filename |
26
 
27
- ## Loading
 
 
 
28
 
29
  ```python
30
- import glob, numpy as np
31
- files = sorted(glob.glob('emb_*.npy'))
32
- vecs = np.vstack([np.load(f) for f in files]) # (2681468, 768)
 
 
 
33
  ```
34
 
35
- Row order matches the BeIR NQ corpus order exactly.
36
-
37
- ## Paper
38
-
39
- TriShieldRAG: A Three-Ring Defense-in-Depth Framework Against
40
- Knowledge Corruption in Retrieval-Augmented Generation
41
- - arXiv: https://arxiv.org/abs/2607.23838
42
- - Codde: https://github.com/rpaut03l/poisonedrag-ragshield-group6-iitj_TriShieldRAG
 
1
  ---
2
  license: apache-2.0
3
+ task_categories: [feature-extraction]
4
+ tags: [rag, retrieval, embeddings, rag-security, faiss]
 
 
 
 
 
5
  ---
6
 
7
+ # TriShieldRAG — BeIR NQ embeddings and FAISS index
8
 
9
+ Artifacts for *TriShieldRAG: A Three-Ring Defense-in-Depth Framework
10
+ Against Knowledge Corruption in Retrieval-Augmented Generation*.
11
 
12
+ | File | Size | Description |
13
+ |---|---|---|
14
+ | `emb_*.npy` (27) | 7.7 GB | Embeddings, 100k passages per chunk, corpus order |
15
+ | `nq_ivf_nlist6550.index` | 7.8 GB | FAISS IVF index, nlist=6550, inner product |
 
 
 
 
 
16
 
17
+ - Corpus: BeIR/nq `corpus` split, 2,681,468 passages
18
+ - Model: sentence-transformers/all-mpnet-base-v2, 768-d, L2-normalised
19
+
20
+ ## Load the index
21
 
22
  ```python
23
+ import faiss
24
+ from huggingface_hub import hf_hub_download
25
+ p = hf_hub_download("rpaut03l/trishieldrag-nq-mpnet-embeddings",
26
+ "nq_ivf_nlist6550.index", repo_type="dataset")
27
+ index = faiss.read_index(p)
28
+ index.nprobe = 409
29
  ```
30
 
31
+ Paper: https://arxiv.org/abs/2607.23838
32
+ Code: https://github.com/rpaut03l/poisonedrag-ragshield-group6-iitj_TriShieldRAG