← All AI Engineer talks

AI Engineer World's Fair 2026

Citation Needed: Provenance for LLM-Built Knowledge Graphs

About this talk

Daniel Chalef explains why LLM-generated knowledge graphs lose reliable source lineage when facts are synthesized, entities merge, and newer information invalidates earlier claims. Using a healthcare example, he describes Graphiti's episode-linked graph provenance, source metadata tagging, temporal fact invalidation, compliance-oriented deletion, and debugging benefits. Audience questions address graph construction, episode ingestion, vector and full-text search, and breadth-first graph traversal.

Chapters

  1. 0:00Why LLM synthesis destroys source provenance
  2. 1:14Graphiti, Zep, and a healthcare provenance failure
  3. 2:58Why source IDs fail when LLMs merge entities
  4. 4:27Episodes, temporal invalidation, and source metadata
  5. 11:08Debugging benefits and Graphiti resources
  6. 12:18Audience questions on graph construction and retrieval

Talk transcript

  1. 0:00

    [upbeat music] So LLMs are really great at pulling together data from many sources, uh, but they do so dem- d- non...

  2. 0:20

    Sorry. They do so non-deterministically. They interpret and synthesize data, generating a summary, an extracted fact, uh, a structured record, and this output artifact may not appear verbatim in the source inputs.

  3. 0:36

    Synthesis often destroys the paper trail of how these outputs were originated. And I'm going to be talking today about provenance, which is tracing how an artifact was built and why.

  4. 0:51

    Legal compliance often demands provenance, but it's also useful for debugging, deciding which sources you trust, and which artifacts to delete. And solving this at scale presents a real engineering challenge.

  5. 1:10

    If I can get my next slide going here.

  6. 1:14

    So my team and I built Graphiti, uh, the open source temporal graph framework, and Zep, our enterprise agent memory infrastructure, is built on Graphiti. Our customers derive context or agent memory from many user touchpoints.

  7. 1:32

    Those could be chat, but not only chat. Often it's voice transcripts, email, business data, and our customers have struggled with provenance. Where did this fact come from? What is the veracity of this fact?

  8. 1:47

    And over the next few f- slides, I'll share how we engineered solutions to this problem.

  9. 1:55

    So h- here's an stylized failure mode. An agent retrieves context about a patient, so this is a healthcare scenario,

  10. 2:06

    and what comes back is a clean, confident fact, patient has a penicillin allergy.

  11. 2:13

    And the context was synthesized from three sources: a lengthy EHR record, Electronic health record, a PDF lab report, and something a patient typed into an AI intake chat.

  12. 2:30

    If the agent presents the fact to a doctor in treat, in a treatment scenario without clearly indicating the source was from the patient themselves, it may mislead the doctor.

  13. 2:44

    When an agent retrieves context, can we point to the exact source and its veracity?

  14. 2:51

    For complex agent applications, the answer is often no.

  15. 2:58

    So I, I can imagine you're probably thinking, um, "But can't we just store like a source ID on the fact?"

  16. 3:07

    This can work well in structured data warehouses or data lakes. A pipeline outputs one value copied or mutated deterministically, and the sources are known and easily marked. But with context pipelines run by LLMs, this breaks in several ways.

  17. 3:26

    You prompt an LLM with several sources. Many facts are each synthesized from one or more of the sources.

  18. 3:35

    Somebody like Jay Smith and John Smith are merged into a single entity, one identity, and John's facts are derived from many different places.

  19. 3:47

    So new data might invalidate old facts. The store keeps changing underneath your pointer. And an append-only log, which often might, you know, might come to mind here,

  20. 4:00

    gets very hard to manage at scale as there's so many changes occurring. So lineage needs to be an evolving set and survive mutation.

  21. 4:13

    So sets of links between facts and their sources can be modeled on a graph as relationships, so provenance in a context or containing facts is a knowledge graph.

  22. 4:27

    We have three... In this example, we have three source data. In Graphiti, they're termed episodes. We have two entities extracted from the episodes, patient and penicillin,

  23. 4:41

    and an edge between them. This graph triple, the two entities and the edge, can be hydrated as a fact, patient has a penicillin allergy.

  24. 4:54

    Tracing a fact to its source is just a graph walk.

  25. 5:01

    So it's pretty simple and easy to map source to fact on the first write.

  26. 5:09

    But keeping it r- correct while the graph changes can be really hard.

  27. 5:16

    When new data, uh, so for example, when two entities merge, the merged entity needs to keep all source links from both. Otherwise, we silently drop a source and we lose lineage.

  28. 5:32

    And when new data contradicts existing data, mutating it, we need to capture this lineage too.

  29. 5:41

    In the right-most card, a fact is rendered invalid by new data, and in Graphiti, an invalidAt date is added

  30. 5:51

    to the mutated edge. And the source episodes that resulted in the edge mutating are noted against the fact

  31. 6:06

    So again, in Graphiti, the relationship between source data and derived artifacts, such as facts, is easily modeled on the graph.

  32. 6:16

    With metadata pro-projection, we can also model classifications that span many different episodes and facts derived from them. And so I'll give you an example here.

  33. 6:30

    In, in the prior healthcare scenario, episodes may originate from an EHR record and have an EHR tag associate-associated with them, but not all records are. And so on ingestion, we tag the episodes with the EHR tag.

  34. 6:50

    All subsequent entities and facts derived from the episode inherit the tag.

  35. 6:58

    So if the agent wants to retrieve only facts from verified clinical sources, it's very simple to filter for the appropriate tag as we walk the graph.

  36. 7:11

    So one tagging action at ingestion supports evaluating the veracity of a fact.

  37. 7:22

    But what if the fact has three parents or more? Here we have a verified flag as our metadata, and in this case, one parent is not verified.

  38. 7:34

    So is the fact verified? For the allergy flag, which could be a life and death situation, the agent missing it, missing that particular flag,

  39. 7:47

    could be a deadly mistake, so not retrieving the fact. And any source of the three should block that prescription being issued.

  40. 7:58

    But for something like a consent on file for procedure fact, the mistake is operating on unv-- on an unverified consent, so the patient hasn't actually given their consent. And every parent needs to be verified, so every single episode should have that tag.

  41. 8:18

    So the facts have very similar shapes. They have three, three parent episodes, but opposite policies. And here,

  42. 8:28

    Graphiti or the underlying store exposes that choice. It exposes which of the episodes have the gra-- the particular tag.

  43. 8:39

    But your agent needs to execute or apply your business rules. So that's not necessarily something that we bake into the graph. It's situational.

  44. 8:54

    Another situation where lineage is really important, we may have to delete source data due to retention policies or right to be forgotten requests, so privacy compliance. And this is really tricky because if we have context derived from multiple sources,

  45. 9:14

    how do we do so? Mapping lineage here is really useful. We know which facts are derived from the source data we intend on deleting. But what if only some of the source data needs to be deleted, but not all?

  46. 9:31

    So in this example, we need to delete the intake chart da-data, so what the patient filled in, which is only one of three source data. In Graphiti's model,

  47. 9:47

    the allergy fact survives the deletion, and that's because there are two parents, parent episodes still supporting the fact. However, the contact preference fact

  48. 10:00

    is deleted, as it was derived solely from the deleted source data.

  49. 10:07

    So the rule is pretty simple here, and it's easier to apply because the link exists. A fact is only deleted if no remaining episodes support it.

  50. 10:19

    So to sum it all up, deriving context is lossy and generative.

  51. 10:26

    Lineage needs to be built into the data structure, engineered into the data structure, which is a graph, not logged afterwards.

  52. 10:37

    And in Graphiti, we keep the sources verbatim, and we link everything back, everything derived from those sources back to the source.

  53. 10:47

    And provenance offers many benefits to users of Graphiti. You have compliance built in, which makes your chief compliance officer very happy.

  54. 10:59

    You can verify a fact based on its sources, so you understand veracity. Should I trust this fact?

  55. 11:08

    It's easy to debug where something came from, so why do I have this fact? How is it generated? And also determining what to delete. And most of what I've covered today is in the Graphiti framework, so you can go to, uh, the Graphiti repo on GitHub, and I have a little, uh, QR cod-QR code later that you

  56. 11:32

    can zap, uh, and try it out. So by the way, as an aside,

  57. 11:41

    lineage and provenance is expensive. Graph construction is really expensive, uh, in the way that Graphiti does it. And so we've put significant effort into reducing cost and latency of generating graph artifacts.

  58. 11:57

    I'd be happy to speak to how we've done that, uh, in, in the Q&A.

  59. 12:01

    So thanks for attending. Um, if you'd like to learn a little bit more about Zep or Graphiti, you can zap the QR codes. Uh, Zep is on the left and Graphiti on the right.

  60. 12:13

    And I don't know if we're doing Q&A here or outside.

  61. 12:18

    You can do some.

  62. 12:19

    Okay, happy to do Q&A.

  63. 12:21

    Yeah. Just repeat the question.

  64. 12:23

    Yeah.

  65. 12:24

    We have time.

  66. 12:25

    Anybody have a question? Yep. One right from the front.

  67. 12:34

    How do you go about mutating the graph

  68. 12:38

    at the edge to account for weight changes in relevancy? How do we mutate the graph- At the edge ... at the edge. Uh, uh-

  69. 12:41

    To account for weight changes in relevancy. Oh, to account for weight changes in relevancy. Um, that is a structure that we've actually built into Zep, not into Graphiti. And, um, what we do is we do have for that a-- some tracing that we do, which is kind of X of the graph.

  70. 13:02

    So not all of the, um, provenance is in the graph. I go to like fifty edges. Sorry, you? I go to like fifty edges. If you have fifty edges?

  71. 13:12

    And mine go to fifty edges. Uh, sorry, is-- was that a question? If you have fifty? Oh, there you go.

  72. 13:19

    I said I, I use fifty.

  73. 13:22

    You use fifty?

  74. 13:23

    Yeah.

  75. 13:24

    Fifty edges.

  76. 13:26

    Yeah, edges.

  77. 13:26

    Um, so, so, you know, Zep is able to, uh, look at provenance across those, but using a separate data structure from the graph.

  78. 13:36

    Oh, okay. Thank you.

  79. 13:38

    Great.

  80. 13:38

    For that particular problem.

  81. 13:42

    You're next.

  82. 13:43

    So, uh, does the agent also create the edges, edge types and the entities itself, or how does it resolve those edge-

  83. 13:50

    Yeah

  84. 13:51

    ... entity types?

  85. 13:51

    So in Graphiti, you can search across the entire graph. Uh, it has, um, vector similarity search against various textual artifacts, um, full-text search, as well as graph relational operations, things like BFS.

  86. 14:08

    Um, it depends on the underlying, uh, graph database that's used. And so your agent can walk the graph, it can search semantically, et cetera.

  87. 14:19

    And obviously, from anywhere you hit in the graph, you're then able to understand the provenance of a particular artifact that you've hit.

  88. 14:29

    Uh, I find it very, uh, fascinating this, uh, temporal, uh, support out, right out of the Graphiti database. Can you, uh, tell just a little more, um, under the hood, what are those really the, the episodes are nodes in the graph, just like the other nodes?

  89. 14:49

    And how do you extract-- So I saw the API that, let's say I give some, uh, add, add episode. How do we extract information from the add episode call under the hood, like large language models and, and edges?

  90. 15:04

    Yeah. Yeah. So, uh, yes, episodes are an entity on the graph, uh, or a node on the graph. Um, it makes sense to model them that way. Um, in Zep and Graphiti, we have various odd derived artifacts that are, um, nodes on the graph as well, because they too need to have lineage, and

  91. 15:29

    we need to understand how they were derived. Um,

  92. 15:34

    and in terms of how the add episode method works,

  93. 15:39

    there's a pretty complicated, uh, pipeline that gets run on, um, uh, episode ingestion. And I'll just give it the very high-level, uh, uh, outline for you. So there's a structured extraction,

  94. 15:56

    extracting entities and the relationships between them, and candidate facts. And those are the materialized or hydrated fact triples. So two entities and a fact. Um, and it's structured as, uh, a fact is structured as, um, um, a subject, well, ob-- subject, uh, verb, object.

  95. 16:21

    Um, and after that, there is a, uh, deconfliction process that runs, a deduplication and deconfliction process. We deduplicate entities, and we deconflict facts, 'cause there might be existing facts in the graph that are gonna be mutated by a new learned fact.

  96. 16:41

    So Daniel loves Adidas shoes. Three months later, Daniel's shoes fell apart. He sends it back to-- the, the shoes back to the return application, and he sends a nasty gram along with it.

  97. 16:53

    Well, now Daniel returned shoes is a fact, and Daniel was unhappy about Adidas. We need to invalidate the Daniel loves Adidas shoes fact. And so that is part of that pipeline as well.

  98. 17:06

    A lot of what we do uses LLMs, but we try very hard not to use LLMs in this process as well. So where we're able to deploy more traditional information retrieval techniques, more traditional NLP techniques, uh, looking at things like entropy and a bunch of other, you know, using, um, SimHash and a bunch of other approaches to

  99. 17:30

    dedupe, uh, we do so. Uh, far cheaper, far faster, deter-- far more deterministic.

  100. 17:38

    Hopefully, that answers your question.

  101. 17:41

    Yep. Uh, thank you for the great talk. Um, just wanted to ask a question. So it seems like a common theme these days in, uh, memory systems is more file-based memory and wikis and knowledge bases.

  102. 17:56

    And, uh, I'm just wondering, have-- is Zep working on something like that? And also, uh, could some of the ideas here be represented in that paradigm?

  103. 18:05

    Yeah. Uh, Markdown suffers from provenance. File-based, um- File-based, uh, memory starts to break down with provenance. It's very difficult when you mu- mutate lines in a file to understand the lineage or the provenance of why those changes occurred.

  104. 18:30

    Um, not only that, but in multi-agent, multi-user, and multi-source scenarios, it can be very challenging to manage markdown files at scale. I think they work really well, um, for desktop usage.

  105. 18:47

    Uh, they sometimes work well in, uh, agentic use cases that are server-based, not necessarily desktop or single user, single agent scenarios. Um,

  106. 18:59

    but what we found is that it's, um, they just break down with the types of enterprise problems that we're solving and particularly-- in particular provenance as an example. Does that answer your question?

  107. 19:14

    Oh, more. I don't know how much time we have left, but maybe one more.

  108. 19:17

    Just one.

  109. 19:18

    Yeah.

  110. 19:19

    Uh, Daniel, thank you. Um, question on the write back. How do you do that explicitly or implicitly? Um, how do you create the facts? Do you ask the LLM to summarize the conversation-

  111. 19:31

    Yeah

  112. 19:31

    ... or at, at every turn you do that? And, and-

  113. 19:34

    Yeah

  114. 19:34

    ... which component does it, Zepp or, uh-

  115. 19:37

    Yeah. So, so we do, um, as pa- we actually as part of the extraction, we've managed to get, um, a single shot extraction working that extracts entities and the relationships between them and facts.

  116. 19:55

    And we're able to do so really cheaply as a consequence. Um, and so yes, we're using an LLM for that. Uh, we do have a reflection step or some reflection built in to ensure that the things that we've retrieved, um, are actually accurate, um, as well as to do some other stuff around, uh, uh,

  117. 20:20

    more, more richness to the lineage. So why did something change? Not just this was related, but also why did it change?

  118. 20:30

    Uh, where was that?

  119. 20:31

    Uh, th- that's, uh, partly in Graphiti, partly in Zepp.

  120. 20:35

    Yeah. All right. Well, thank you everybody. [outro music]