Knowledge graphs that quote the page they came from.
LoreGraph turns a novel, play, screenplay or libretto into a queryable graph: characters, objects, events, concepts, and the typed relations between them. Every claim carries an evidence_span, so clicking any relation lands you on the sentence it came from.
A graph that quietly invents a relationship is worse than no graph.
Most tools that pull a knowledge graph out of text extract triples and ask you to trust them. For fiction that is fatal. LoreGraph holds one rule instead: every extracted claim carries an evidence_span, a literal substring of the source, and the verification pass rejects any claim whose span is not a 95% literal match.
the text in front of it.
It is told, explicitly,
to forget the Elizabeth
Bennet it already knows.
The engineering was researched against these projects. The corpus comes from public sources.
Strict about evidence, relaxed about models.
Reading Splink, ComEM and GraphRAG settled four things: a literal-evidence gate, entity resolution that works across scripts, per-pass commits with idempotent re-runs, and a client that is not tied to one provider.
Every claim
cites its line
The extractor writes an evidence_span as it goes, and the verification pass drops anything under a 95% literal match.
Only the text
in front of it
The model is told to forget the Elizabeth Bennet or 孫悟空 it already knows, and to report what this book says.
Eight passes from raw text to a claim you can check.
Passes 1 and 4 are deterministic. Passes 2, 3, 5, 6 and 8 call a model. Pass 7 is a gate, not a suggestion. Every pass commits on its own, so a failed run resumes with --from N and nothing is written twice.
Chunk →
Deterministic, chapter-aware splitting that reads English headings and 第N回 alike. Each chunk gets a position in global story time.

Extract →
Typed mentions, entity resolution (lexical plus embedding-kNN blocking, then batched matching), coreference, five typed relations, and the facts they imply.

Verify →
Chain-of-verification. A claim whose evidence span is not a literal match of the source is dropped here. The gate is 95%.

Note
One Hybrid Note per entity: facts and inferences in separate columns, every inference labelled with a confidence, plus a subtype and an importance tier.

Novels, plays, operas, early films
Pride and Prejudice, Journey to the West, Crime and Punishment, Faust, Les Misérables and eighty more, across eleven languages. Source text stays in its original script; nothing is transliterated.

Source texts are never committed
data/books/ is git-ignored. Only derived data is published: the graph, short fair-use evidence spans, profile notes. Full reading text ships for public-domain works only; works still in copyright are processed locally.

Three commands and your own book has a graph.
uv sync, then alembic upgrade head against Postgres 16+ with pgvector, then loregraph ingest and loregraph extract. One OpenRouter key is enough. A mid-size novel runs in minutes rather than hours, and a per-book budget ceiling of $20 is enforced between passes.




