doc_id stringclasses 11
values | page_num int64 1 166 | chunk_idx int64 0 6 | char_start int64 0 5.56k | char_end int64 21 6.56k |
|---|---|---|---|---|
active-directory | 1 | 0 | 0 | 229 |
active-directory | 3 | 0 | 0 | 1,288 |
active-directory | 4 | 0 | 0 | 843 |
active-directory | 4 | 1 | 667 | 1,451 |
active-directory | 4 | 2 | 1,280 | 2,132 |
active-directory | 4 | 3 | 1,947 | 2,727 |
active-directory | 4 | 4 | 2,560 | 3,316 |
active-directory | 4 | 5 | 3,139 | 3,480 |
active-directory | 5 | 0 | 0 | 801 |
active-directory | 5 | 1 | 629 | 1,510 |
active-directory | 5 | 2 | 1,337 | 2,239 |
active-directory | 5 | 3 | 2,075 | 2,937 |
active-directory | 5 | 4 | 2,750 | 3,493 |
active-directory | 5 | 5 | 3,309 | 3,960 |
active-directory | 6 | 0 | 0 | 806 |
active-directory | 6 | 1 | 627 | 1,388 |
active-directory | 6 | 2 | 1,230 | 2,135 |
active-directory | 6 | 3 | 1,972 | 2,856 |
active-directory | 6 | 4 | 2,675 | 3,205 |
active-directory | 7 | 0 | 0 | 1,245 |
active-directory | 7 | 1 | 979 | 2,307 |
active-directory | 7 | 2 | 2,040 | 2,509 |
active-directory | 8 | 0 | 0 | 1,396 |
active-directory | 8 | 1 | 1,128 | 2,369 |
active-directory | 9 | 0 | 0 | 1,394 |
active-directory | 9 | 1 | 1,204 | 2,329 |
active-directory | 9 | 2 | 2,124 | 2,635 |
active-directory | 10 | 0 | 0 | 1,574 |
active-directory | 10 | 1 | 1,302 | 2,506 |
active-directory | 11 | 0 | 0 | 1,324 |
active-directory | 11 | 1 | 1,056 | 2,552 |
active-directory | 12 | 0 | 0 | 1,429 |
active-directory | 12 | 1 | 1,205 | 2,569 |
active-directory | 12 | 2 | 2,308 | 2,627 |
active-directory | 13 | 0 | 0 | 1,407 |
active-directory | 13 | 1 | 1,247 | 2,534 |
active-directory | 14 | 0 | 0 | 1,353 |
active-directory | 14 | 1 | 1,139 | 2,349 |
active-directory | 15 | 0 | 0 | 1,545 |
active-directory | 15 | 1 | 1,270 | 2,748 |
active-directory | 16 | 0 | 0 | 1,462 |
active-directory | 16 | 1 | 1,123 | 2,339 |
active-directory | 17 | 0 | 0 | 1,474 |
active-directory | 17 | 1 | 1,120 | 2,678 |
active-directory | 17 | 2 | 2,399 | 3,061 |
active-directory | 18 | 0 | 0 | 1,373 |
active-directory | 18 | 1 | 1,114 | 2,452 |
active-directory | 18 | 2 | 2,225 | 2,783 |
active-directory | 19 | 0 | 0 | 1,988 |
active-directory | 20 | 0 | 0 | 1,206 |
active-directory | 20 | 1 | 951 | 2,114 |
active-directory | 20 | 2 | 1,931 | 3,080 |
active-directory | 20 | 3 | 2,847 | 3,232 |
active-directory | 21 | 0 | 0 | 1,189 |
active-directory | 21 | 1 | 1,018 | 2,281 |
active-directory | 21 | 2 | 2,056 | 2,394 |
active-directory | 22 | 0 | 0 | 1,585 |
active-directory | 23 | 0 | 0 | 1,361 |
active-directory | 23 | 1 | 1,108 | 2,359 |
active-directory | 23 | 2 | 2,222 | 2,591 |
active-directory | 24 | 0 | 0 | 1,481 |
active-directory | 24 | 1 | 1,159 | 2,584 |
active-directory | 24 | 2 | 2,350 | 2,870 |
active-directory | 25 | 0 | 0 | 1,364 |
active-directory | 25 | 1 | 1,157 | 2,560 |
active-directory | 25 | 2 | 2,294 | 3,100 |
active-directory | 26 | 0 | 0 | 1,480 |
active-directory | 26 | 1 | 1,219 | 2,606 |
active-directory | 26 | 2 | 2,359 | 3,227 |
active-directory | 27 | 0 | 0 | 1,339 |
active-directory | 27 | 1 | 1,097 | 2,713 |
active-directory | 27 | 2 | 2,453 | 2,930 |
active-directory | 28 | 0 | 0 | 1,376 |
active-directory | 28 | 1 | 1,110 | 2,590 |
active-directory | 28 | 2 | 2,317 | 3,294 |
active-directory | 29 | 0 | 0 | 1,402 |
active-directory | 29 | 1 | 1,136 | 2,528 |
active-directory | 29 | 2 | 2,262 | 3,077 |
active-directory | 30 | 0 | 0 | 1,520 |
active-directory | 30 | 1 | 1,242 | 2,684 |
active-directory | 30 | 2 | 2,442 | 3,118 |
active-directory | 31 | 0 | 0 | 1,354 |
active-directory | 31 | 1 | 1,092 | 2,637 |
active-directory | 31 | 2 | 2,358 | 2,895 |
active-directory | 32 | 0 | 0 | 1,382 |
active-directory | 32 | 1 | 1,080 | 2,574 |
active-directory | 33 | 0 | 0 | 666 |
active-directory | 34 | 0 | 0 | 1,326 |
active-directory | 34 | 1 | 1,113 | 2,096 |
active-directory | 35 | 0 | 0 | 1,317 |
active-directory | 35 | 1 | 1,112 | 2,149 |
active-directory | 35 | 2 | 1,977 | 2,898 |
active-directory | 36 | 0 | 0 | 1,316 |
active-directory | 36 | 1 | 1,077 | 2,473 |
active-directory | 36 | 2 | 2,173 | 2,714 |
active-directory | 37 | 0 | 0 | 1,474 |
active-directory | 37 | 1 | 1,205 | 2,461 |
active-directory | 38 | 0 | 0 | 1,495 |
active-directory | 38 | 1 | 1,172 | 2,614 |
active-directory | 39 | 0 | 0 | 2,104 |
ANSSI cybersecurity guides — BGE-M3 embeddings
Semantic embeddings of 11 ANSSI (French national cybersecurity agency)
guides, produced by the open-source project
llm-verification-harness.
Project positioning. Transpose aerospace/defense IVVQ (Integration, Verification, Validation, Qualification) practices to non-deterministic RAG/LLM systems. The project's signature deliverable is a Verification Control Document auto-generated per run (Brique 7). This dataset is an intermediate, machine-verifiable artifact from Brique 2.
Contents
embeddings.npy—float32matrix of shape(1231, 1024). Each row = one ANSSI corpus chunk encoded withBAAI/bge-m3. L2-normalized at production time, somatrix @ queryreturns cosine similarity directly.embeddings_index_public.jsonl— 1231 JSON lines, row-aligned withembeddings.npy(matrix rowi↔ JSONL linei). Fields per row:doc_id,page_num,chunk_idx,char_start,char_end.
Chunk source text is not included here — see Corpus governance below.
Contract by properties, not bit-for-bit SHA256
A neural embedding is not bit-for-bit reproducible across machines
(BLAS/MKL versions, CPU/GPU float sum order, FP non-associativity).
Locking embeddings.npy SHA256 as a blocking regression would be a
faux contrat — it would fail on the first machine change. The GitHub
repo records the hash for traceability but tests verifiable
properties:
matrix.ndim == 2,matrix.shape[1] == 1024,dtype == float32∀i, |‖matrix[i]‖₂ − 1| < 1e-5— the L2 contract that letsmatrix @ querybehave as cosine similaritymatrix.shape[0] == len(embeddings_index_public.jsonl)— row-alignment- Ordered subset of
chunks.jsonlfrom the GitHub repo (REQ-CHUNK-04filter: chunks under 10 tokens excluded from the index but kept in the sourcechunks.jsonlfor audit)
Producer environment (pinned)
embeddings.npy was produced under this exact environment, frozen in
the repo's corpus/manifest.yaml under
derived_artifacts.embeddings_npy.producer_env:
| Component | Version |
|---|---|
| model | BAAI/bge-m3 |
| revision | 5617a9f61b028005a4858fdac845db406aefb181 |
| device | cpu |
| dtype | float32 |
| dim | 1024 |
| normalize_embeddings | true |
| sentence-transformers | 5.6.0 |
| torch | 2.13.0 |
| transformers | 5.13.0 |
| huggingface_hub | 1.23.0 |
| numpy | 2.5.1 |
Corpus governance — why the text is not in the index
The source corpus (11 ANSSI guides) is distributed by ANSSI on cyber.gouv.fr under Licence Ouverte 2.0 (Etalab). The project respects that governance by:
- not republishing the source text here — the HF index carries
identifiers only (
doc_id,page_num,chunk_idx,char_start,char_end), nothing textual. - publishing the raw chunks (with text) in the GitHub repo under
corpus/chunks.jsonl— closer to source, undergitaudit. - keeping source PDFs out of the repo (on-demand download with
falsifiable SHA256 verification via
download_corpus.py).
A user who wants to reconstitute the chunk text from this index can:
- Clone the GitHub repo
adriencr81/llm-verification-harness - Load
corpus/chunks.jsonl - Join on
(doc_id, page_num, chunk_idx)between the two files
The gesture "publish the computable artifacts, respect the source corpus governance" is an IVVQ posture: sensitive data never rides in the public artifacts of a verification chain.
Reproduce retrieve() locally
import numpy as np
import json
from sentence_transformers import SentenceTransformer
from huggingface_hub import hf_hub_download
REPO_ID = "adriencr81/anssi-bge-m3-embeddings"
npy_path = hf_hub_download(REPO_ID, "embeddings.npy", repo_type="dataset")
idx_path = hf_hub_download(REPO_ID, "embeddings_index_public.jsonl", repo_type="dataset")
matrix = np.load(npy_path, allow_pickle=False)
index = [json.loads(line) for line in open(idx_path, encoding="utf-8") if line.strip()]
model = SentenceTransformer(
"BAAI/bge-m3",
revision="5617a9f61b028005a4858fdac845db406aefb181",
device="cpu",
)
q = model.encode(
["Quelles recommandations MFA de l'ANSSI ?"],
normalize_embeddings=True,
)[0].astype(np.float32)
scores = matrix @ q
top4 = np.argsort(-scores)[:4]
for i in top4:
print(f"{scores[i]:.4f}", index[i])
To also get the chunk text field for each hit, use retrieve.py in
the GitHub repo — it joins the same matrix with corpus/chunks.jsonl
locally.
Downstream use
Consumed by the RAG pipeline in the same project
(ask.py,
Brique 3): question → retrieval on this matrix → LLM call →
citation-parsed answer. The Brique 7 Verification Control Document
will report bench results against these embeddings.
License
- Embeddings and public index (this HF dataset):
CC-BY-4.0— attribution required. - Source corpus text (not redistributed here): remains under ANSSI's Licence Ouverte 2.0 (Etalab).
Cite
Deleuil, A. (2026). llm-verification-harness — Applying aerospace IVVQ
to RAG/LLM systems. https://github.com/adriencr81/llm-verification-harness
Contact
Adrien Deleuil — huggingface.co/adriencr81
- Downloads last month
- 39