Sefer APIs

The shape of the graph

What is in it, where each edge came from, and the vocabulary it speaks.

This page is the graph's ground truth: counts, vocabulary, and provenance, measured from the serving database rather than described from memory. Every figure below was measured on 2026-09-11 against build sefer-serving-v3. Where a number would rot, the method to re-measure it is given with it.

What is in it

count
citation edges8,714,855
segments4,253,435
works6,855

Edges are deduplicated on (source_ref, target_ref, citation_type, layer). The pre-dedup extraction total is larger; the served graph is the distinct set.

Two provenances, and they do not mix

Every edge carries a provenance. There are exactly two values.

provenanceedgesconfidencecarries evidence_hebrew
curated6,536,721always exactly 1.00 (0.00%)
gemini_l12,178,1340.01.0, mean 0.8722,175,315 (99.87%)

curated edges come from Sefaria's own curated link set. They are inherited, not derived here. Their confidence is an asserted constant, not a measurement: the column holds exactly one distinct value across all 6,536,721 rows. Read 1.0 on a curated edge as "this came from the curated set", never as "this was scored and came out perfect."

gemini_l1 edges are extracted here. Their confidence varies and is meaningful in the ordinary sense — 5,910 of them sit below 0.5, and those low scores are kept rather than filtered, because an edge that announces its own weakness is more useful than one quietly dropped.

The vocabulary is two disjoint sets

citation_type has 21 values, and no value appears under both provenances. Provenance is therefore readable off the type alone, without consulting the provenance column.

Inherited from the curated set — 5 types, uppercase:

typeedges
COMMENTARY2,742,409
OTHER1,946,036
SOURCE1,804,474
TARGUM34,726
REFERENCE9,076

Extracted here — 16 types, snake_case:

typeedgestypeedges
back_reference376,392unknown20,209
explicit_verse343,935explicit_braita19,960
explicit_talmud340,555structural18,320
conceptual_dependency285,504explicit_source5,944
named_position269,363explicit_commentary4,265
explicit_mishnah219,681gezeira_shava1,960
allusion169,922explicit_midrash1,679
paraphrased_verse69,804legal_principle30,641

The two casings are not a style inconsistency to be tidied away. They mark two different origins, and flattening them into one vocabulary would destroy information a caller can currently read for free.

What is actually differentiated

The graph is majority-inherited: 75% of its edges are Sefaria's curated links, available from Sefaria directly. Any honest account of what is added here rests on the other 2,178,134 — and on one property those edges have that inherited links do not.

99.87% of extracted edges carry evidence_hebrew: the exact Hebrew words in the source that ground the citation. That is what makes an extracted edge auditable rather than asserted. A caller can check it against the text at both ends; with an inherited edge there is nothing to check against, only a link to trust.

So the claim this graph can defend is not volume. It is 2.18 million machine-extracted citations that show their work, each carrying its proof-text and a confidence that varies honestly.

Re-measuring

These counts are properties of a build, and builds change. To re-measure rather than trust this page:

SELECT provenance, count(*), min(confidence), max(confidence),
       sum(CASE WHEN length(trim(evidence_hebrew)) > 0 THEN 1 ELSE 0 END)
FROM citations GROUP BY 1;

SELECT citation_type, provenance, count(*)
FROM citations GROUP BY 1, 2 ORDER BY 3 DESC;

On this page