Max00035's picture
publish ragbench-v1 benchmark dataset
56ee4b5
Raw History Blame Contribute Delete
16.3 kB
{"chunk_id": "bm25-93f1e9d3f2::chunk-0000", "doc_id": "bm25-93f1e9d3f2", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# BM25 lexical ranking BM25 is a bag-of-words ranking function. It increases a document score when query terms occur in that document, while inverse document frequency gives uncommon terms more influence than ubiquitous ones. The method does not require training data or neural inference. The"}
{"chunk_id": "bm25-93f1e9d3f2::chunk-0001", "doc_id": "bm25-93f1e9d3f2", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "data or neural inference. The parameter k1 controls how quickly repeated term frequency saturates. The parameter b controls document-length normalization. A common baseline uses k1 equal to 1.5 and b equal to 0.75, although useful values depend on the collection. Because BM25 operates on tokens,"}
{"chunk_id": "bm25-93f1e9d3f2::chunk-0002", "doc_id": "bm25-93f1e9d3f2", "metadata": {"word_count": 29, "word_start": 80}, "position": 2, "text": "Because BM25 operates on tokens, transparent tokenization matters. Lowercasing improves case-insensitive matching, while punctuation rules determine whether identifiers remain intact. Stable tie handling is also necessary for reproducible experiments."}
{"chunk_id": "chunking-62e846459e::chunk-0000", "doc_id": "chunking-62e846459e", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Chunk construction Chunking divides source documents into retrieval units. Very large chunks can mix unrelated topics, while very small chunks may separate a claim from the details needed to understand it. A useful configuration balances evidence completeness with ranking precision. Overlapping windows repeat boundary"}
{"chunk_id": "chunking-62e846459e::chunk-0001", "doc_id": "chunking-62e846459e", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "precision. Overlapping windows repeat boundary words in neighboring chunks. Overlap can preserve a sentence that crosses a boundary, but excessive overlap creates near-duplicate candidates that crowd the ranking. This benchmark uses deterministic word windows so identical inputs and settings always produce identical chunk identifiers. Changing"}
{"chunk_id": "chunking-62e846459e::chunk-0002", "doc_id": "chunking-62e846459e", "metadata": {"word_count": 38, "word_start": 80}, "position": 2, "text": "produce identical chunk identifiers. Changing chunk size or overlap changes the evidence collection and therefore invalidates old relevance labels. Corpus versions must record these settings. Benchmark annotations should be reviewed whenever the source text or chunk configuration changes."}
{"chunk_id": "context-generation-65559dddab::chunk-0000", "doc_id": "context-generation-65559dddab", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Context and generation Retrieved chunks are placed into the generator context in rank order. The prompt tells the model to answer only from supplied evidence and to say it does not know when the evidence is insufficient. The complete prompt remains in the generation"}
{"chunk_id": "context-generation-65559dddab::chunk-0001", "doc_id": "context-generation-65559dddab", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "prompt remains in the generation artifact for inspection. A token-aware input budget protects the limited encoder window of FLAN-T5-small. Full chunks are added while they fit. If necessary, only the final included chunk is truncated, and later chunks are omitted. Greedy decoding disables sampling and"}
{"chunk_id": "context-generation-65559dddab::chunk-0002", "doc_id": "context-generation-65559dddab", "metadata": {"word_count": 33, "word_start": 80}, "position": 2, "text": "Greedy decoding disables sampling and improves ordinary repeatability on the same CPU software stack. It does not guarantee that an answer is correct or grounded. Generation quality is evaluated separately from retrieval quality."}
{"chunk_id": "dense-embeddings-7a474808ec::chunk-0000", "doc_id": "dense-embeddings-7a474808ec", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Dense semantic retrieval An embedding encoder converts text into a fixed-width numeric vector. The reference dense retriever uses all-MiniLM-L6-v2, which produces 384-dimensional sentence embeddings and runs locally on a CPU. Corpus vectors are computed once for each benchmark process. Both query and corpus vectors"}
{"chunk_id": "dense-embeddings-7a474808ec::chunk-0001", "doc_id": "dense-embeddings-7a474808ec", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "Both query and corpus vectors are L2-normalized. Their dot product is therefore equivalent to cosine similarity. This avoids adding a separate similarity library and keeps the ranking calculation visible in NumPy. Semantic vectors can connect paraphrases such as service slowdown and increased response latency. They"}
{"chunk_id": "dense-embeddings-7a474808ec::chunk-0002", "doc_id": "dense-embeddings-7a474808ec", "metadata": {"word_count": 26, "word_start": 80}, "position": 2, "text": "and increased response latency. They are less dependable for opaque strings such as ZXQ-417 or build tag r2025.04, because those identifiers carry little reusable linguistic meaning."}
{"chunk_id": "evaluation-94f7633331::chunk-0000", "doc_id": "evaluation-94f7633331", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Evaluation discipline Retrieval Recall at K measures the fraction of labeled relevant chunks found among the first K results. Mean Reciprocal Rank uses the reciprocal position of the first relevant result. These metrics answer different questions and should remain visible separately. Normalized exact match"}
{"chunk_id": "evaluation-94f7633331::chunk-0001", "doc_id": "evaluation-94f7633331", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "visible separately. Normalized exact match is strict: a prediction must equal an accepted answer after documented text normalization. Token F1 gives partial credit for overlapping answer tokens. Neither metric proves that an answer is supported by retrieved evidence. Failure decomposition distinguishes retrieval failure from generation"}
{"chunk_id": "evaluation-94f7633331::chunk-0002", "doc_id": "evaluation-94f7633331", "metadata": {"word_count": 45, "word_start": 80}, "position": 2, "text": "distinguishes retrieval failure from generation failure. If labeled evidence was retrieved but the answer misses the reference, the case is a generation failure under the exact-match rule. An exact answer without labeled evidence is retained as a separate diagnostic category rather than silently called success."}
{"chunk_id": "hybrid-rrf-4479d7429d::chunk-0000", "doc_id": "hybrid-rrf-4479d7429d", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Hybrid rank fusion Hybrid retrieval combines evidence from lexical and semantic rankers. Reciprocal Rank Fusion, abbreviated RRF, assigns each candidate a contribution of one divided by k plus its rank from every component list. The project uses k equal to 60. RRF combines ordering"}
{"chunk_id": "hybrid-rrf-4479d7429d::chunk-0001", "doc_id": "hybrid-rrf-4479d7429d", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "to 60. RRF combines ordering rather than raw scores. That matters because a BM25 score and a cosine similarity have unrelated numeric scales. Rank fusion needs no learned calibration and gives candidates appearing in both lists a useful cumulative advantage. Each component retrieves up to"}
{"chunk_id": "hybrid-rrf-4479d7429d::chunk-0002", "doc_id": "hybrid-rrf-4479d7429d", "metadata": {"word_count": 43, "word_start": 80}, "position": 2, "text": "Each component retrieves up to twenty candidates before fusion, even when the final request asks for only five. The final tie rule sorts by fused score, then best component rank, then stable chunk identifier. One MiniLM instance is reused inside the hybrid retriever."}
{"chunk_id": "mlops-reproducibility-7e14c23dfe::chunk-0000", "doc_id": "mlops-reproducibility-7e14c23dfe", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Reproducible ML systems An experiment should record code, configuration, data versions, and model identity. A metric without those inputs is difficult to audit. Run artifacts should be immutable or use distinct run identifiers to prevent accidental comparison with overwritten settings. Deterministic preprocessing means the"}
{"chunk_id": "mlops-reproducibility-7e14c23dfe::chunk-0001", "doc_id": "mlops-reproducibility-7e14c23dfe", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "settings. Deterministic preprocessing means the same source files and configuration produce the same ordered chunks and stable IDs. Timestamps may record when a build occurred, but they must not influence content identifiers or ranking tie rules. The environment lock resolves package versions, while corpus-v1 names"}
{"chunk_id": "mlops-reproducibility-7e14c23dfe::chunk-0002", "doc_id": "mlops-reproducibility-7e14c23dfe", "metadata": {"word_count": 27, "word_start": 80}, "position": 2, "text": "package versions, while corpus-v1 names the evidence release. The benchmark in this project instead uses the coordinated public label ragbench-v1 for both its corpus and question annotations."}
{"chunk_id": "model-serving-e5ce6a03a3::chunk-0000", "doc_id": "model-serving-e5ce6a03a3", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Model serving operations Online inference services often batch compatible requests to improve accelerator utilization. Dynamic batching waits briefly for nearby requests, which can increase throughput but also adds queueing delay. Operators must balance batch efficiency against tail latency objectives. A readiness probe indicates whether"}
{"chunk_id": "model-serving-e5ce6a03a3::chunk-0001", "doc_id": "model-serving-e5ce6a03a3", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "A readiness probe indicates whether an instance should receive traffic. A liveness probe asks whether the process should be restarted. Confusing these signals can create restart loops during slow model loading or send requests to an instance before weights are available. Model artifact version ms-2025-07-rc3"}
{"chunk_id": "model-serving-e5ce6a03a3::chunk-0002", "doc_id": "model-serving-e5ce6a03a3", "metadata": {"word_count": 28, "word_start": 80}, "position": 2, "text": "available. Model artifact version ms-2025-07-rc3 is approved for the canary pool. The rollback target is ms-2025-06-stable. These opaque release identifiers are deliberately included to test exact lexical retrieval."}
{"chunk_id": "observability-6ae870f273::chunk-0000", "doc_id": "observability-6ae870f273", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Retrieval observability Useful RAG telemetry separates retrieval latency, context construction time, and generation latency. A single end-to-end duration cannot identify which stage caused a slowdown. Percentiles such as p95 describe tail behavior better than an average alone. Trace correlation identifier TRACE-RAG-8841 links a user"}
{"chunk_id": "observability-6ae870f273::chunk-0001", "doc_id": "observability-6ae870f273", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "identifier TRACE-RAG-8841 links a user request to its retrieval and generation spans. Logs should record chunk identifiers and ranks without copying sensitive document text. Metrics should aggregate behavior without exposing prompts. Retrieval drift can appear when new documents change term statistics or embedding distributions. A"}
{"chunk_id": "observability-6ae870f273::chunk-0002", "doc_id": "observability-6ae870f273", "metadata": {"word_count": 21, "word_start": 80}, "position": 2, "text": "statistics or embedding distributions. A versioned evaluation set provides an early warning by rerunning stable questions and relevance labels before deployment."}
{"chunk_id": "retrieval-basics-021fa30859::chunk-0000", "doc_id": "retrieval-basics-021fa30859", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Retrieval stages A retrieval system accepts a query and returns ranked evidence units. In this benchmark, each evidence unit is a text chunk with a stable identifier. Recall at a cutoff measures how much labeled evidence appears near the top. Reciprocal rank instead rewards"}
{"chunk_id": "retrieval-basics-021fa30859::chunk-0001", "doc_id": "retrieval-basics-021fa30859", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "top. Reciprocal rank instead rewards placing the first relevant chunk early. Lexical retrieval matches query terms against document terms. It is often effective for exact product codes, error identifiers, and uncommon acronyms. Its weakness appears when a question and its evidence express the same idea"}
{"chunk_id": "retrieval-basics-021fa30859::chunk-0002", "doc_id": "retrieval-basics-021fa30859", "metadata": {"word_count": 43, "word_start": 80}, "position": 2, "text": "evidence express the same idea with different vocabulary. Dense retrieval maps queries and chunks into numeric vectors. Nearby vectors can represent similar meanings even without exact word overlap. Dense search can miss rare literal identifiers, so lexical and semantic approaches expose complementary behavior."}
{"chunk_id": "security-privacy-aa437fce64::chunk-0000", "doc_id": "security-privacy-aa437fce64", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Security and privacy boundaries Retrieval systems should apply authorization filtering before evidence reaches a generator. Post-generation redaction is not a substitute for preventing unauthorized chunks from entering context. Tenant and document access rules belong in the retrieval path. Prompt logs may contain private questions"}
{"chunk_id": "security-privacy-aa437fce64::chunk-0001", "doc_id": "security-privacy-aa437fce64", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "logs may contain private questions or source passages. A safer observability design records stable chunk IDs, timing, and aggregate metrics while limiting raw text retention. Access to evaluation artifacts should follow the sensitivity of their source data. The marker SEC-POL-009 identifies the benchmark's synthetic access-control"}
{"chunk_id": "security-privacy-aa437fce64::chunk-0002", "doc_id": "security-privacy-aa437fce64", "metadata": {"word_count": 25, "word_start": 80}, "position": 2, "text": "identifies the benchmark's synthetic access-control policy. It is not an external standard. The marker exists as an identifier-heavy retrieval case and carries no operational authority."}
{"chunk_id": "vector-indexing-21fd7fc623::chunk-0000", "doc_id": "vector-indexing-21fd7fc623", "metadata": {"word_count": 45, "word_start": 0}, "position": 0, "text": "# Vector index choices Exact vector search compares a query against every stored embedding. For a small evaluation corpus, a NumPy matrix multiplication is simple, deterministic, and fast enough. It also avoids adding a persistent vector database. Approximate nearest neighbor indexes trade some recall for"}
{"chunk_id": "vector-indexing-21fd7fc623::chunk-0001", "doc_id": "vector-indexing-21fd7fc623", "metadata": {"word_count": 45, "word_start": 40}, "position": 1, "text": "indexes trade some recall for lower search cost at large scale. Parameters controlling graph construction and query exploration can materially change both latency and retrieval quality, so they belong in experiment metadata. The code name HNSW refers to Hierarchical Navigable Small World graphs. This public"}
{"chunk_id": "vector-indexing-21fd7fc623::chunk-0002", "doc_id": "vector-indexing-21fd7fc623", "metadata": {"word_count": 25, "word_start": 80}, "position": 2, "text": "Small World graphs. This public benchmark does not use HNSW, FAISS, or a hosted vector service. Its focus is controlled comparison rather than production-scale indexing."}