See it work
schema = GraphSchema(...) # you name the
# entities, relations, and patterns
graph = await Graph.open(
schema=schema,
graph_store=build_graph_store("neo4j"),
embedder=build_embedder(
"ibm-granite/granite-embedding-small-english-r2"),
extractor=GlinerExtractor(),
)
result = await graph.add(text=(
"Satya Nadella works at Microsoft. "
"Bill Gates founded Microsoft. "
"Microsoft is headquartered in Redmond."
))
print("entities extracted:",
result.extraction.entities_extracted)
entities extracted: 6 relations extracted: 3
The first run downloads two local models, about 385 MB.
agent = build_agent(
engine=engine,
llm_settings=llm_settings,
graph_schema=schema,
)
question = (
"Who founded the company "
"that Satya Nadella works at?"
)
result = await agent.ainvoke(
{"messages": [{"role": "user",
"content": question}]}
)
print(answer.content)
Satya Nadella works at Microsoft (E1, E3), which was founded by Bill Gates (E2, E3, C1). evidence keys: E1, E2, E3, E4, C1, V1
Example output; answers vary with your model. Every claim cites its evidence: E keys are entities, C keys chunks, V keys graph-query values.
Run the full Quickstart — a free Neo4j Aura instance, two models, and about ten minutes.
What it does
Loads your files
One Graph.add() call reads text, Markdown, HTML, CSV, JSON, and, with Docling, PDF, Word, PowerPoint, and images.
Extracts with a schema you define
You name the entity types, the relation types, and the valid patterns. A local GLiNER model runs first, and an LLM takes over only for weak chunks.
Merges duplicates with care
Exact, fuzzy, embedding, and LLM-checked tiers compare mentions. An uncertain or failed comparison never merges, and matches are stored as edges so both entities stay in the graph.
Retrieves across graph and vectors
Entity, chunk, community, text-to-Cypher, and graph-expansion search run together. Reciprocal rank fusion and reranking order the results.
Answers with citations
An agent plans sub-questions, researches them, and verifies the evidence. Each claim points to a source, and OpenTelemetry records the run.
Scores itself on your questions
Judged evals measure extraction, resolution, answers, and agent trajectories against your own gold sets, so regressions surface before your users see them.
Build your first graph
Free Neo4j Aura, two models, about ten minutes to a working graph.
Concepts
See how the pipeline turns documents into answers.
Ingest your own corpus
Chunking, schema-guided extraction, and duplicate resolution over your files.
Run the citing agent
Plan, research, verify — an answer where every claim carries an evidence key.