Datasets:
id stringlengths 21 53 | reference stringlengths 7 25 | volume stringclasses 5
values | book stringclasses 87
values | chapter int32 1 150 | verse int32 1 176 | verse_text stringlengths 11 1.17k | chapter_context stringlengths 294 742 | contextual_text stringlengths 380 1.91k | embedding list |
|---|---|---|---|---|---|---|---|---|---|
old-testament_1-chronicles_1_1 | 1 Chronicles 1:1 | Old Testament | 1 Chronicles | 1 | 1 | Adam, Sheth, Enosh, | The following passage is from **1 Chronicles 1:1** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs descendants thr... | **Context**: "The following passage is from **1 Chronicles 1:1** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs d... | [
0.0164031982421875,
0.004154205322265625,
-0.01087188720703125,
0.037811279296875,
-0.031890869140625,
-0.0035305023193359375,
0.03631591796875,
0.00545501708984375,
0.032470703125,
0.027618408203125,
0.01059722900390625,
-0.023193359375,
-0.0274658203125,
0.031036376953125,
0.0497741699... |
old-testament_1-chronicles_1_2 | 1 Chronicles 1:2 | Old Testament | 1 Chronicles | 1 | 2 | Kenan, Mahalaleel, Jered, | The following passage is from **1 Chronicles 1:2** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs descendants thr... | **Context**: "The following passage is from **1 Chronicles 1:2** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs d... | [
0.0189361572265625,
-0.004840850830078125,
-0.01519775390625,
0.0335693359375,
-0.00847625732421875,
-0.0218048095703125,
0.0035114288330078125,
-0.0037860870361328125,
0.024017333984375,
0.03704833984375,
0.0152130126953125,
-0.0185089111328125,
-0.0357666015625,
0.0377197265625,
0.0454... |
old-testament_1-chronicles_1_3 | 1 Chronicles 1:3 | Old Testament | 1 Chronicles | 1 | 3 | Henoch, Methuselah, Lamech, | The following passage is from **1 Chronicles 1:3** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs descendants thr... | **Context**: "The following passage is from **1 Chronicles 1:3** from the **Old Testament**. This chapter contains 54 verses and records genealogies from Adam through Noahβs sons and their descendants, listing the lines of Japheth, Ham (including Nimrod and Philistine origins), and Shem to Abraham. It names Abrahamβs d... | [
0.0206451416015625,
-0.004535675048828125,
-0.0155792236328125,
0.0413818359375,
-0.0161895751953125,
-0.0081634521484375,
0.0208282470703125,
-0.001842498779296875,
0.024810791015625,
0.045867919921875,
0.013458251953125,
-0.006610870361328125,
-0.039337158203125,
0.031646728515625,
0.0... |
old-testament_1-chronicles_1_4 | 1 Chronicles 1:4 | Old Testament | 1 Chronicles | 1 | 4 | Noah, Shem, Ham, and Japheth. | "The following passage is from **1 Chronicles 1:4** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:4** from the **Old Testament**. This (...TRUNCATED) | [0.005889892578125,0.01543426513671875,-0.0137786865234375,0.04656982421875,-0.00429534912109375,-0.(...TRUNCATED) |
old-testament_1-chronicles_1_5 | 1 Chronicles 1:5 | Old Testament | 1 Chronicles | 1 | 5 | The sons of Japheth; Gomer, and Magog, and Madai, and Javan, and Tubal, and Meshech, and Tiras. | "The following passage is from **1 Chronicles 1:5** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:5** from the **Old Testament**. This (...TRUNCATED) | [-0.00241851806640625,-0.0059661865234375,-0.01666259765625,0.046356201171875,-0.004123687744140625,(...TRUNCATED) |
old-testament_1-chronicles_1_6 | 1 Chronicles 1:6 | Old Testament | 1 Chronicles | 1 | 6 | And the sons of Gomer; Ashchenaz, and Riphath, and Togarmah. | "The following passage is from **1 Chronicles 1:6** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:6** from the **Old Testament**. This (...TRUNCATED) | [-0.01239013671875,-0.0092010498046875,-0.020538330078125,0.042694091796875,0.005596160888671875,-0.(...TRUNCATED) |
old-testament_1-chronicles_1_7 | 1 Chronicles 1:7 | Old Testament | 1 Chronicles | 1 | 7 | And the sons of Javan; Elishah, and Tarshish, Kittim, and Dodanim. | "The following passage is from **1 Chronicles 1:7** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:7** from the **Old Testament**. This (...TRUNCATED) | [0.0010576248168945312,0.0062713623046875,-0.016082763671875,0.029693603515625,-0.0277099609375,-0.0(...TRUNCATED) |
old-testament_1-chronicles_1_8 | 1 Chronicles 1:8 | Old Testament | 1 Chronicles | 1 | 8 | The sons of Ham; Cush, and Mizraim, Put, and Canaan. | "The following passage is from **1 Chronicles 1:8** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:8** from the **Old Testament**. This (...TRUNCATED) | [-0.0012416839599609375,0.017791748046875,-0.0137176513671875,0.0399169921875,-0.00394439697265625,-(...TRUNCATED) |
old-testament_1-chronicles_1_9 | 1 Chronicles 1:9 | Old Testament | 1 Chronicles | 1 | 9 | "And the sons of Cush; Seba, and Havilah, and Sabta, and Raamah, and Sabtecha. And the sons of Raama(...TRUNCATED) | "The following passage is from **1 Chronicles 1:9** from the **Old Testament**. This chapter contain(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:9** from the **Old Testament**. This (...TRUNCATED) | [0.0240020751953125,0.01369476318359375,-0.01263427734375,0.064208984375,0.00927734375,-0.0120697021(...TRUNCATED) |
old-testament_1-chronicles_1_10 | 1 Chronicles 1:10 | Old Testament | 1 Chronicles | 1 | 10 | And Cush begat Nimrod: he began to be mighty upon the earth. | "The following passage is from **1 Chronicles 1:10** from the **Old Testament**. This chapter contai(...TRUNCATED) | "**Context**: \"The following passage is from **1 Chronicles 1:10** from the **Old Testament**. This(...TRUNCATED) | [0.01413726806640625,-0.009185791015625,-0.00746917724609375,0.034576416015625,0.025238037109375,-0.(...TRUNCATED) |
Disclosure:
The work represented in this research was neither sponsored by nor affiliated with the Church of Jesus Christ of Latter-day Saints. The content used in this dataset was derived from the public-domain. Intellectual property belonging to the Church of Jesus Christ of Latter-day Saints, such as chapter headings and footnotes, was intentionally omitted out of respect and diligence owed to the IP owner. This work is intended for academic use only and does not reflect the views of the Church of Jesus Christ of Latter-day Saints. To learn more about the Church of Jesus Christ of Latter-day Saints visit Who We Are - The Church of Jesus Christ of Latter-day Saints
Standard Works β Contextual Retrieval Embeddings
41,995 verses from the "Standard Works" (sourced from public-domain editions), each paired with an LLM-generated chapter-context block and a 3072-dimension embedding of the two combined.
This dataset is an independent test of Anthropic's Contextual Retrieval technique on a domain its original evaluation did not cover: short, archaic, formulaic religious text from antiquity.
Background: Anthropic's Contextual Retrieval
Contextual Retrieval is Anthropic's improvement to Retrieval-Augmented Generation (RAG). Traditional RAG splits documents into small chunks and embeds them, but these chunks often lose critical context. Anthropic solves this by adding a short, generated contextual description to each chunk before embedding, improving semantic retrieval accuracy.
The technique was introduced in Introducing Contextual Retrieval (Anthropic, 2024), which describes two components β Contextual Embeddings (prepend generated context before embedding) and Contextual BM25 (prepend it before lexical indexing). Anthropic reported that Contextual Embeddings alone reduced the top-20 retrieval failure rate by 35% (5.7% β 3.7%), rising to 49% combined with Contextual BM25 and 67% with an added reranking stage. Their evaluation covered codebases, fiction, ArXiv papers, and science papers, with context generated by Claude 3 Haiku at roughly 50β100 tokens per chunk.
All credit for the technique belongs to Anthropic. This dataset contributes an independent replication on a new domain, the artifacts to reproduce it, and one finding that diverges from Anthropic's.
Replication result
Measured in Anthropic's own metric β the share of queries with no correct result in the top _k_:
| Metric | Bare-verse embeddings | Contextual embeddings | Failure-rate reduction |
|---|---|---|---|
| Failure rate @1 | 35.5% | 25.7% | 28% |
| Failure rate @5 | 10.5% | 6.6% | 38% |
| Failure rate @10 | 7.2% | 4.6% | 36% |
Anthropic reported a 35% reduction at top-20 for Contextual Embeddings alone. This corpus produced 36% at top-10, with a different text type, a different embedding model, and a different k. The convergence is close enough to be worth reporting and loose enough that it should not be read as a precise match β the evaluation sets, cutoffs, and models all differ.
Where this implementation differs from Anthropic's
- Context granularity is coarser. Anthropic generates chunk-specific context describing how each chunk relates to its document. This dataset generates one chapter-level summary shared by every verse in that chapter, varying only by the verse reference it names. That is a weaker form of the technique, and the result below suggests it carries a cost.
- Context is longer. Roughly 125 tokens per verse here, against the 50β100 tokens Anthropic describes.
- Contextual BM25 was not implemented. Only the Contextual Embeddings half of the technique was tested.
A divergence worth noting
Anthropic found that adding a reranking stage improved results substantially (49% β 67% failure-rate reduction). On this corpus, reranking hurt, dropping recall@1 from 77% to 53% (see Secondary finding below).
The most likely explanation is the granularity difference above. Because every verse in a chapter carries an identical context block, verses within a chapter look nearly the same to a cross-encoder, which then reorders on chapter-level relevance rather than verse-level relevance. Anthropic's chunk-specific context would not have this property. Anyone applying chapter- or section-level context rather than chunk-specific context should expect reranking to behave differently than the original post reports.
What is in it
| Column | Type | Description |
|---|---|---|
id |
string | Stable identifier, e.g., book-of-mormon_1-nephi_3_7 |
reference |
string | Human-readable citation, e.g., 1 Nephi 3:7 |
volume |
string | One of five volumes (see distribution below) |
book |
string | Book name, e.g., 1 Nephi, Isaiah, Doctrine and Covenants |
chapter |
int32 | Chapter or section number |
verse |
int32 | Verse number |
verse_text |
string | The verse alone, no additions |
chapter_context |
string | LLM-generated summary of the chapter this verse belongs to |
contextual_text |
string | The Context + Verse block that was actually embedded |
embedding |
list[float32] (3072) | text-embedding-3-large over contextual_text |
| Volume | Verses |
|---|---|
| Old Testament | 23,145 |
| New Testament | 7,957 |
| Book of Mormon | 6,604 |
| Doctrine and Covenants | 3,654 |
| Pearl of Great Price | 635 |
| Total | 41,995 |
chapter_context is identical for every verse in a chapter apart from the verse reference it names. That repetition is the mechanism under test, and it is also the source of this approach's main weakness (see Limitations).
from datasets import load_dataset
ds = load_dataset("Atreyu4EVR/standard-works-contextual-embeddings", split="train")
ds[0]["reference"] # '1 Chronicles 1:1'
len(ds[0]["embedding"]) # 3072
The finding
Two embedding variants of the same 41,995 verses were compared on 152 retrieval questions. This is the Contextual Embeddings half of Anthropic's technique, measured in isolation:
- A β contextual: embed
contextual_text(chapter summary + verse). Shipped here. - B β bare: embed
verse_textalone. Not shipped, but exactly reproducible β embed theverse_textcolumn with the same model.
A question counts as a hit when any of its accepted gold verses appears in the top k.
| n | MRR | recall@1 | recall@5 | recall@10 | |
|---|---|---|---|---|---|
| A β contextual | 152 | 0.832 | 74.3% | 93.4% | 95.4% |
| B β bare verse | 152 | 0.751 | 64.5% | 89.5% | 92.8% |
Ξ MRR = +0.081, 95% bootstrap CI [+0.038, +0.126], exact two-sided sign test p = 0.00039. Per question: contextual better on 34, bare better on 10, tied on 108.
Where the gain comes from
Questions were split at the median (0.50) on an objective measure β the fraction of a question's content words, stopwords removed, that literally appear in its gold verse. Low overlap means the verse does not contain the words the question asks with, so a bare-verse embedding has little surface to match on.
| Stratum | n | MRR ctx | MRR bare | Ξ | 95% CI | sign-test p |
|---|---|---|---|---|---|---|
| Low overlap | 61 | 0.700 | 0.576 | +0.124 | [+0.048, +0.204] | 0.004 |
| High overlap | 91 | 0.921 | 0.868 | +0.053 | [+0.004, +0.104] | 0.064 |
The effect is 2.3Γ larger where the verse does not restate the question. The largest individual gains all come from verses whose bare text omits the entity the question names:
| Question | Gold verse | Rank ctx | Rank bare |
|---|---|---|---|
| What did Enos pray about all day and night? | Enos 1:4 | 1 | not retrieved |
| What did the sons of Mosiah want to preach? | Mosiah 28:3 | 1 | not retrieved |
| What did Esther risk going to the king? | Esther 4:16 | 3 | not retrieved |
| What did Job say after losing everything? | Job 1:21 | 1 | 9 |
| What did the voice say when Christ descended? | 3 Nephi 11:8 | 2 | 10 |
| What did the brother of Jared ask about the stones? | Ether 3:4 | 3 | 7 |
Ether 3:4 never says "brother of Jared". Exodus 14:16 never says "Moses" or "Red Sea". D&C 121:7 never says "Joseph Smith" or "Liberty Jail". The chapter context is the only place where that information exists, so it is the only thing an embedding can match on.
The practical reading: contextual retrieval is decisive when the passage does not restate the question, and close to neutral when it does. On lexically distinctive queries the gain is +0.053 MRR and not individually significant. Budget the extra tokens accordingly β the benefit is real but unevenly distributed.
Method and controls
- Same embedding model on both sides, verified rather than assumed: cosine 0.999999 between an independently stored vector and a fresh embedding of the same text.
- The same query vector was sent to both indexes, eliminating query-side variance.
- Exhaustive kNN, so no approximate-search recall loss could confound the comparison.
- All gold verses confirmed present in both indexes with identical reference strings before scoring.
- 152 questions across all five volumes; every gold verse was checked against the actual indexed text to confirm it answers its question. Three initial references were wrong and were corrected during that check.
- Statistics: exact two-sided sign test on discordant pairs, plus a 20,000-resample bootstrap CI on the MRR difference.
An earlier 48-question run of the same comparison produced p = 0.21 and could not distinguish the two. The effect was present but the sample was underpowered. It is reported here because it is the more common outcome when people evaluate this technique on a small question set, and it is easy to misread as evidence of no effect.
Secondary finding: reranking hurt this corpus
Measured on the contextual embeddings, comparing retrieval modes:
| Mode | MRR | recall@1 |
|---|---|---|
| Pure vector | 0.872 | 80% |
| Hybrid (BM25 + vector β RRF) | 0.810 | 77% |
| BM25 only | 0.667 | 63% |
| Semantic hybrid (vector + BM25 + cross-encoder rerank) | 0.661 | 53% |
Adding a cross-encoder reranker cost recall on this corpus, dropping recall@1 from 77% to 53%. Verses are short, archaic and formulaic ("And it came to pass..."), so lexical scoring latches onto high-frequency filler and onto proper nouns that recur across centuries of narrative β the corpus contains two Lehis, two Nephis, two Almas, and two Moronis separated by hundreds of years. The reranker then reorders an already-poor candidate set. Rerankers tuned on modern prose should not be assumed to transfer to this text type.
Limitations
- Context repeats within a chapter. Every verse in a chapter carries the same summary, so verses within a chapter are less separable in vector space. This is what makes cross-encoder reranking underperform above. A retrieval-only setup handles it well; a reranking stage may not.
- Verse-level chunking blocks aggregation. Answers requiring several verses are never in a single hit. "How many sons did Lehi have?" needs 1 Nephi 2:5 and 1 Nephi 18:7 combined. Retrieve k β₯ 10 and synthesize.
- Name collisions are unresolvable by retrieval alone. Consumers must read
volume,book, andchapter_contextto determine which Lehi, Nephi, Alma, or Moroni a verse refers to. - Chapter summaries are model-generated and unreviewed at scale. They are interpretive, not authoritative, and should not be quoted as scripture or as commentary. Two generation defects were found and repaired before release (see Provenance); others may remain.
- Single embedding model. All results use
text-embedding-3-large. The direction is likely to generalize; the magnitude may not. - English only, and one specific textual tradition.
- The benchmark questions were authored by the same process that analyzed them. Strata were assigned by an objective lexical measure rather than by hand to limit this, but the question set is not independently constructed.
Provenance
- Verse text is drawn from public-domain editions. Copyright-protected editorial apparatus β chapter headings, footnotes, cross-references, and study aids β was deliberately excluded.
chapter_contextis LLM-generated summary text created for this dataset, not sourced from any published commentary.- Embeddings were generated with OpenAI
text-embedding-3-large(3072 dimensions) overcontextual_text.
Citation
@misc{vallejo_standard_works_contextual_embeddings,
title = {Standard Works β Contextual Retrieval Embeddings},
author = {Vallejo, Ron},
year = {2026},
url = {https://huggingface.co/datasets/Atreyu4EVR/standard-works-contextual-embeddings}
}
Please also cite the original technique:
@misc{anthropic_contextual_retrieval_2024,
title = {Introducing Contextual Retrieval},
author = {{Anthropic}},
year = {2024},
url = {https://www.anthropic.com/engineering/contextual-retrieval}
}
Released under CC BY 4.0. Verse text is public domain; the license covers the chapter summaries, embeddings, and dataset arrangement.
- Downloads last month
- 39