AI Engineer World's Fair 2026

Citation Needed: Provenance for LLM-Built Knowledge Graphs

Daniel Chalef· Founder and CEO, Zep AI20:54

Read the talk

Citation Needed: Provenance for LLM-Built Knowledge Graphs

A fact in agent memory is only useful if its origins survive synthesis, entity merges, contradictions and deletion. Graphiti models that changing evidence as part of the graph.

From a talk by Daniel Chalef

Before you start: Familiarity with LLM extraction and basic graph concepts—nodes, edges and traversal—is helpful; no Graphiti experience is required.

Where did this fact come from?

When an LLM produces a fact that never appeared verbatim in its inputs, how can you trace where it came from? A summary, extracted fact or structured record can combine several sources through nondeterministic interpretation. That synthesis can erase the paper trail. Provenance preserves how an artifact was built and why—information needed for debugging, evaluating source trust, deciding what to delete and supporting legal compliance.

Daniel Chalef’s team built Graphiti, an open-source temporal graph framework underlying Zep’s enterprise agent memory infrastructure. Its inputs extend beyond chat: voice transcripts, email and business data all contribute context. Once these sources become agent memory, two questions recur: where did a fact come from, and how trustworthy is its evidence?

Consider the talk’s stylized healthcare example. An agent retrieves a confident statement: the patient has a penicillin allergy. Its context was synthesized from a lengthy electronic health record, a PDF lab report and an AI intake chat. If the allergy information came from the patient’s own chat message, presenting it to a treating doctor without that origin can mislead. The presence of clinical documents elsewhere in the input does not establish that they supplied this particular fact. The retrieval needs to expose both the exact source and the basis for trusting it.

Slide titled “The retrieval you can't trust” shows a patient allergy statement, synthesized facts, and a question mark above EHR record, lab report, and intake chat sources.Open full source frame
A penicillin-allergy fact with its source trail missing.
0:200:36
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:20 · section reference included

A source pointer becomes an evolving set

A source_id works well when a warehouse or data-lake pipeline copies or deterministically transforms a value from known inputs. An LLM context pipeline introduces several different changes:

  • Synthesis: each extracted fact may depend on one or more of the sources supplied in a prompt.
  • Identity resolution: Jay Smith and John Smith may become one entity whose facts originate in different places.
  • Invalidation: new information may contradict an old fact, changing what the store knows beneath an existing pointer.

Chalef argues that an append-only change log becomes difficult to manage as these mutations accumulate. The requirement is an evolving set of source relationships that survives the mutations themselves.

2:583:07
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:58 · section reference included

Keeping lineage correct as the graph changes

Graphiti calls source records episodes. In the healthcare example, three episodes supply the input data. The extracted patient and penicillin entities are connected by an edge; together, those two entities and their relationship form a triple that can be rendered as the allergy fact. Relationships back to the episodes make source attribution a graph walk.

Creating those links on the first write is straightforward. Preserving them requires rules for every mutation. When two entities merge, the merged entity must retain the union of their source links; otherwise, identity resolution silently removes evidence. When new information contradicts a fact, the graph must preserve the lineage of that change as well. The described invalidation operation adds a date to the affected edge and records the episodes responsible for invalidating it.

Slide titled “Keeping lineage correct as the graph mutates” contains three diagram panels: Multi-source facts, Entity resolution, and Temporal invalidation.Open full source frame
Preserving lineage through multiple sources, entity merges, and temporal invalidation.

The talk calls the invalidation date invalidAt. Current Zep fact documentation uses invalid_at for when the fact ceased to hold in the world and expired_at for when the system learned the change. These are different clocks: the event and its later discovery need not coincide. The architectural point is that both derived facts and changes to those facts remain connected to their source data.

4:134:27
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:13 · section reference included

Source metadata does not decide policy

Metadata projection carries source classifications into derived context. At ingestion, an episode originating in an EHR receives an EHR tag. Entities and facts derived from that episode inherit the tag, allowing retrieval to filter for the relevant clinical-source classification while traversing the graph. One tagging operation at ingestion supports later evaluation of the evidence.

Multiple parents make the policy more interesting. Suppose a fact has three parent episodes and one is unverified. Whether that fact is sufficient for an action depends on the consequences of being wrong.

ContextDangerous mistakePolicy in the example
Penicillin allergyMissing an allergy warningAny source reporting the allergy should block the prescription
Consent on fileActing on unverified consentEvery parent must be verified

The allergy policy retains a warning even when its evidence is patient-reported. The consent policy withholds authorization unless all supporting parents satisfy verification. The same graph shape therefore supports opposite decision rules.

The graph exposes evidence; the agent applies the business rule. Graphiti can expose which parent episodes have a tag, but it does not determine the appropriate risk policy for every application. This distinction also matters when implementing filters: current Zep metadata projection documentation says a search result matches when at least one associated episode satisfies the filter. Combining predicates with AND requires those predicates to hold within that episode; it does not establish that every parent is verified. An all-parent consent rule needs that separate evaluation.

6:166:30
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:16 · section reference included

Deleting a source without deleting every derived fact

Retention policies and right-to-be-forgotten requests introduce another mutation: deleting source data. Lineage identifies the facts affected by that deletion, but a fact can have other surviving support. In the deletion example, the intake chat is one of three episodes supporting the allergy fact. Removing that chat leaves the EHR and lab-report episodes, so the allergy fact survives. A contact-preference fact supported only by the intake chat disappears. Delete a fact only when no remaining episodes support it.

Proposed deletion of the intake chat

Constructed example: The identifiers ehr, lab_report, intake_chat, penicillin_allergy and contact_preference are teaching labels for the talk's source episodes and facts. The comparison models the proposed operation, not an executed deletion.

Deletion request — unchanged
Delete episode intake_chat.

Operation: Remove intake_chat and its support associations; delete facts whose remaining support set is empty.

EHR episode

Before: Before proposed deletion
Present
After: Result under the support-set rule · Unchanged
Present

Lab-report episode

Before: Before proposed deletion
Present
After: Result under the support-set rule · Unchanged
Present

Intake-chat episode

Before: Before proposed deletion
Present
After: Result under the support-set rule · Removed
Not present

penicillin_allergy

Before: Before proposed deletion
Supported by: ehr, lab_report, intake_chat
After: Result under the support-set rule · Changed
Supported by: ehr, lab_report

contact_preference

Before: Before proposed deletion
Supported by: intake_chat
After: Result under the support-set rule · Removed
Not present
Removing one source preserves facts with other support and removes facts left without any.

The support-set operation can be expressed directly in Python. This models the proposed deletion of the intake chat and the resulting fact associations:

python

supports = {
    "penicillin_allergy": {"ehr", "lab_report", "intake_chat"},
    "contact_preference": {"intake_chat"},
}
deleted_episodes = {"intake_chat"}

remaining_supports = {
    fact: parents - deleted_episodes
    for fact, parents in supports.items()
}
retained_facts = {
    fact: parents
    for fact, parents in remaining_supports.items()
    if parents
}
deleted_facts = set(supports) - set(retained_facts)

assert retained_facts == {
    "penicillin_allergy": {"ehr", "lab_report"}
}
assert deleted_facts == {"contact_preference"}

This rule concerns support associations. Current Zep deletion documentation specifies additional limits: shared-node names and summaries are not regenerated and can retain information from a deleted episode. Deleting an episode that invalidated a fact also does not restore that fact. Association-based cleanup therefore does not, by itself, establish complete erasure.

8:549:14
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:54 · section reference included

Build lineage into the data structure

Because deriving context is lossy and generative, lineage needs to be engineered into the data structure instead of reconstructed from logs afterward. Graphiti retains source content verbatim and links derived artifacts back to it. Those links support source verification, debugging and deletion decisions, as well as compliance workflows. Most of the capabilities described in the prepared talk are available in Graphiti’s repository.

Key insights slide lists three takeaways about engineered lineage, verbatim sources, and provenance benefits, with github.com/getzep/graphiti below.Open full source frame
Engineer lineage into the graph and link derived data back to verbatim sources.

Supporting compliance is not the same as guaranteeing it. Chalef’s companion article places request handling, verification and auditing around deletion propagation. The graph provides the dependency information those processes need.

That information has a construction cost. Chalef describes Graphiti-style graph construction as expensive and says the team has invested in reducing the cost and latency of generating graph artifacts. The recording supplies no quantitative cost or latency result. His closing slide offers Zep on the left and Graphiti on the right before the discussion turns to implementation questions.

10:1910:26
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

10:19 · section reference included

Where provenance lives and how agents reach it

A question about changing relevance weights exposes a boundary in the graph-centric design. Chalef says that capability belongs to Zep, not Graphiti, and that its provenance tracing uses a separate data structure outside the graph. For this particular problem, not all provenance is represented by graph relationships.

Asked about entity and edge creation, Chalef first describes how agents retrieve graph artifacts:

  • Vector similarity search finds textual artifacts by semantic similarity.
  • Full-text search finds textual matches.
  • Graph operations, including breadth-first search, follow relationships.

The available operations depend on the underlying graph database. Whichever route leads an agent to an artifact, its provenance can then be inspected. This explains access to evidence, rather than specifying how entity or edge types are chosen.

12:3412:38
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:34 · section reference included

From an episode to a changing fact

The next question goes underneath episode ingestion. Episodes are themselves graph nodes, and other derived artifacts can also be nodes because they need their own lineage. Adding an episode runs a pipeline whose high-level sequence is:

  1. Extract structure: identify entities, relationships and candidate facts. A hydrated fact triple has a subject, verb and object.
  2. Deduplicate entities: reconcile newly extracted entities with identities already in the graph.
  3. Deconflict facts: compare new facts with existing ones and invalidate those that the new evidence changes.

The pipeline must therefore handle both additions and mutations; extracting triples alone is insufficient.

Chalef illustrates deconfliction with a preference. Initially, Daniel loves Adidas shoes. Three months later, the shoes fall apart, he returns them and includes an angry message. The new evidence yields facts that Daniel returned the shoes and was unhappy with Adidas. It also invalidates the older preference. Retaining both statements without accounting for the change would leave the agent with stale context.

Although much of the pipeline uses LLMs, the team tries to avoid them where conventional techniques suffice. Chalef names information retrieval, traditional NLP, entropy-related techniques and SimHash among approaches used for deduplication. He describes these alternatives as cheaper, faster and more deterministic than LLM processing, without reporting numerical comparisons.

14:2914:49
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:29 · section reference included

The provenance burden of file-based memory

Files, wikis and Markdown knowledge bases offer another way to represent agent memory. The audience asks whether Zep is pursuing that direction and whether these provenance ideas transfer. Chalef identifies a specific difficulty: after an agent mutates lines in a file, understanding why those changes occurred and which sources justified them becomes hard.

The burden grows in multi-agent, multi-user and multi-source settings. Chalef says Markdown works well for desktop usage and sometimes for server-based agentic applications. His objection concerns the enterprise problems his team encounters, particularly maintaining provenance at scale; it is not a claim that file memory fails in every setting. The answer does not establish a Zep roadmap for file-based memory.

17:4117:56
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

17:41 · section reference included

Extract together, then examine why things changed

The final question asks how memory is written back: explicitly or implicitly, through a conversation summary or at every turn, and by which component. Chalef describes the extraction design rather than specifying its trigger cadence. A single-shot LLM extraction produces entities, relationships and facts together.

Chalef attributes inexpensive extraction to that consolidation. Reflection then checks accuracy and enriches the lineage: the goal is to capture why an artifact changed, beyond recording that two artifacts are related. He places the described functionality partly in Graphiti and partly in Zep without assigning each individual step to a product. The resulting memory needs to preserve not only the latest fact, but the evidence and change history that make that fact intelligible.

19:1919:31
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

19:19 · section reference included

Resources

From the talk

  • Open-source temporal knowledge graph framework with installation instructions, examples and hybrid retrieval.

Updates since the talk

Transcript download
Read the transcript and explore slides

Loading transcript and slides…