Why Your Company Needs a Context Graph (and How to Build It) — Gil Feig, Merge

summarized

TLDR

Live API calls (MCP) alone cannot handle semantic queries across large datasets; a context graph with synced data, skills, and memory is necessary. The talk outlines a four-tier context architecture: prompt skills/memory, live API calls, cached synced data, and derived context. Traceability and provenance are critical for business decisions.

Key points

MCP live lookups are insufficient for semantic queries across large datasets; a synced data layer is required.

A context graph includes four tiers: prompt skills/memory, live API calls, cached synced data, and derived context.

Skills define company-specific processes and guide data retrieval for agents.

Traceability and provenance (source, timestamp, permissions) are essential for business-critical AI decisions.

Prefer live API calls for simple lookups (cheaper) and cached data for complex semantic queries.

Tools mentioned

Techniques

  • context graph architecture
  • synced data layer
  • router and summarizer
  • skills and memory
  • derived context
  • traceability and provenance
Transcript (captions)

0:12 Right. Thank you all for for coming. Um my name is Gil Feyg. I am the co-founder and CTO of Merge. Merge helps companies build production AI very easily. We are the connective infrastructure uh to make

0:26 everything come together. Uh today I'm going to be talking about why you need a context graph and how to build it. What I'm not going to do is talk about specific technology you

0:35 should be using. Uh you can talk to your agent about that. It will help you. There's a lot of good technologies that can back this. Uh the focus of this is uh why you need a context graph and then

0:45 sort of in a in a higher level how you should structure it, what the components should be, uh and how things come together to build the best possible uh brain for your company.

0:56 If you haven't gotten a hat yet, by the way, my team is walking around passing out hats. They're They say well connected. Um so

1:03 let's dive in here. So I'm not going to spend much talking about Merge, but just a quick overview of us. Um we have over 400 enterprise customers, OpenAI, Ramp, Netflix, Perplexity, a lot of companies

1:14 across the board using us for both internal and customer-facing AI use cases. Uh we have three different products, Unified, Agent Handler, and Gateway that cover a lot of the

1:24 components of it. Um we were founded 6 years ago by me and my co-founder Shen Shi. We've raised three rounds. Uh we're 130 employees in the three most beautiful cities in the world.

1:35 All right. So quick agenda here. Step one or number one, we will talk about what a context graph even is and why it's so important that every company has one. We'll go into the different tiers

1:45 of context, what what types of data, what types of of uh sort of logic from your company should be making it into your graph. We'll talk about context selection

1:54 strategy. How are we picking the most relevant content for our agents or contexts for our agents at any moment in time? Traceability and provenance. How do we

2:03 know where that data came from, who requested it, when it when it's from, is it fresh, all of that. And then lastly, some final key takeaways. At the end, I'll stick around if you do

2:12 have any questions. Uh so, feel free to to come up to me afterwards. All right. So, what is a context graph in this talk? We're not going to go into the nodes and the edges that connect

2:25 each node in a true graph infrastructure. We're going to talk about the company brain. Your company context graph consists of a lot of different components. It has

2:35 third-party data. What are the other systems you use, like NetSuite, uh like like Jira. Um it has structured context. Uh so, that could be uh data coming in from other third parties. That could be

2:47 data that that you all have put into your context layer. Uh things like things like static documents that you want to always be passed to your agents. We have memories. These are things that

2:58 are formed. We all know memory, things that are formed as you're using the agent, telling it to remember things, things that your agent thinks that it should remember on its own. And then we

3:06 also have skills. Uh and skills are a very very important part of your context graph, which we'll get to. All right. I see some picture Okay, cool. Uh so, moving on. Let's get Let's

3:19 go through an example here. We're going to use this example to guide why it's not it's not enough to just connect a single MCP server or a couple MCP servers and call it a day.

3:29 So, let's ask this simple question. One of one of your employees or or customers asks your agent, "Why was customer A upset last week?" Pretty simple question to answer. The

3:40 agent goes, it sees it has access to your Zendesk ticketing, and it can check and say, "Hey, what it what tickets were filed by this customer last week?" Great. We saw that they saw that the API

3:50 sync was broken, um and specific details about what went wrong. We also see the customer filed three tickets total, all of that. Great, that answers that question. But what if we want to extend

4:01 that? And what if we want to say, "Which customers were upset last week?" That becomes a lot harder because you now have to have your agent load in every single ticket from Zendesk that

4:11 happened in the last week. What if we're saying, "Which customers were upset in the last year?" We should be able to answer that. Our agent should be able to answer that, but it can't if it has to

4:19 live live look up and pull tickets 100 at a time, thousands and thousands of those until it times out and it just can't answer the question. So, MCP is not fully solving a lot of

4:28 these problems because the underlying access patterns of the APIs of these other platforms don't support a live look up methodology. If you could ask your ticketing system

4:40 something semantically, if Jira exposed an endpoint that said, you know, that you could query in English, "Which customers were upset last week?" and it returned that data, that would be great.

4:49 But no platforms incentivize to do that because it costs them money to vectorize it and it makes it so you don't have to visit their platform as often. So, you need a sinking layer on top of

5:00 this. You can't just use MCP to live look up for things that you want to go deeper into, that you want to semantically question, you need to actually sync a copy of the data

5:10 locally. Okay? This doesn't apply to everything. So, you might have you know, let's say static look ups to Stripe. We're always going to be asking Stripe a question

5:19 about a specific customer. We're always going to be taking a single action in Stripe. That can be MCP. That can be live. But if you need any form of semantic look ups, any form of analysis

5:28 that is beyond a simple look up, simple question, but requires looking across a a vast data set, you have to sync a copy. So, that becomes the next part of your

5:37 sinking layer of your of your, uh, context layer. So, you have your MCPs, your live look ups, you have your synced or your cached look ups as well. And that you're pulling in from a

5:47 third-party, you're putting in a vector database locally. Again, AI can build that vector DB for you relatively easily. Uh you got to you got to you know, work on your strategy of how you

5:56 store data in the context layer and how you retrieve from it uh for that sync to cache layer. Um but that's sort of the next component here. But the next problem is, all right, now

6:06 we have all this relevant data. We're we're pulling from our vector database to get, you know, semantic data and we're doing live lookups for other data we might want on top. Now, we need to

6:15 bring all that data together cuz we can't just dump a massive amount of retrieved context back to our agent. So, that's where we introduce the router and the summarizer. The router is

6:24 sending things to the right place at the beginning. The prompt comes in. It decides where, you know, who should be handling this, where it should be sent. Once that data's all aggregated in

6:32 there, our summarizer then takes that data from from the the synced context and from the live context, summarizes it, and sends it back to the agent that sent the prompt over.

6:44 But you all notice, we have one thing here that we haven't talked about, and that's memory and skills. That could live separately. Why is it important for your context layer? The reason is that

6:54 getting context is actually a set of company principles and processes in and of itself. For example, which customer was upset last week can mean something very different to one company versus

7:05 another. It could be number of tickets that are opened. Um but actually, what if those tickets were positive? What if actually we don't use a ticketing system and that we know that for customer

7:13 happiness, we need to actually always go look at Qualtrics first and see survey data cuz that's just how our company works. We're different. That's why skills are important because you need

7:22 skills like how do we determine if a customer is happy? So, now your agent should first check the skills before it then goes and starts checking your synced layer, your your uh live layer

7:33 for what data to get and then summarizing and returning it. So, the flow here is prompt comes in, gets routed to the right agent. The agent looks to see if it has any memory

7:42 or skills associated with the question or the task at hand. Based on that, it then knows where to look in the synced cache DB and from the live MCP lookups, summarize, send back.

7:57 There's no magic here. There really is none. It's all physics as long as you know how to calculate, you know, within within your own sort of use case, you're great. This

8:06 flow here where we looked at the number of open tickets again would not have been possible with live lookups, but with a local lookup it was really simple and we were able to basically gather all

8:14 customers, number of tickets they have, summarize their tickets, and then give a status on each one. So, it's a mix of some live lookups, some cache lookups. That's all coming

8:24 together here to build really really rich data for any question that gets asked. All right. And so, there are different tiers of context and some might debate

8:35 whether prompt skills and memory are context. Context is anything that's being passed into the agent. We're going to put this all here because they all belong in your context layer.

8:45 So, you have your prompt skills and memory. We talked about how those are going to really drive the the where do we get data from? You have your live API calls. These are

8:53 easy easier to build, easier to add on, they're cheaper to run than synced context. So, you should prefer these when you know you're going to have simple lookups, simple retrievals.

9:02 Cached data is absolutely essential if you want that that sort of semantic data, the complex lookups, deep deep questions about about any data. But, keep in mind it's a little bit more

9:14 complicated to set up and build. It's more expensive to run because you have to have a vector database and you're constantly having to sync that data. So, it is tougher to keep up to date.

9:24 And then lastly, something we didn't quite discuss yet is derived context, which is basically any additional context you create when you're pulling in data from the third party. So, this

9:34 could be, you You as we're live pulling in all tickets, we're also for every time a customer's full set of tickets comes in, we're summarizing those and we're actually storing in our stored

9:45 context, our structured stored context, we're storing a summary of the data that we pulled in. So, that in the future, if we have a common question, we don't have to then also go go re-look up and

9:55 re-summarize everything. Awesome. So, all four of those come together. You saw the the chart for how they do that. Um and yeah, those are the tiers. So,

10:05 quick flowchart of how this works when when a query comes in or a prompt comes in. So, first thing here is do we have a skill or memory match? If so, yes, we want to execute that skill. Does the

10:16 skill need external data? No, then we're just generating a response and we're sending that right back. Unfortunately, it's not always this easy. So, what happens if we don't have

10:26 a skill or memory match? No? Well, then let's go right to to data selection here. Uh and same thing for if that skill needs external data. So, we say yes, the first thing we're doing is

10:35 checking our cache or our synced data store and we're saying, is the data here fresh? Is it within our SLAs? Can we use this data cuz it's viewed as fresh enough?

10:44 Yes, then let's use that cache context. No? Then, unfortunately, we have to go down and we have to call the live API. Now, once we do have enough context, we're going to loop through these a few

10:56 times till we build up the context we need. Once we do have enough context, we might want to store a memory of of whatever we just we just discovered or or figured out, uh store that to memory

11:06 and then generate the response and send it back. And then, same thing here, if we didn't have enough context, I I just showed that, but we have to call the live API

11:14 and then we will we will uh generate that response back to the client. I'll leave it here for a second. I I see some people looking and taking pictures. All right.

11:31 So, last piece here, pretty much at the end, traceability and provenance. Doesn't seem important at front up front. Do not drop where the data is coming from. Always store it. You you

11:43 have that from MCP. You also have that in if for anything you're syncing in Vector DBs, there's something called metadata. You want to store it in there. It's associated with the data. It is

11:51 critical. It's similar to, you know, the way that this surface is in ChatGPT or any surface that you're using is when it tells you a fact or it says something, at the end it says three sources and it

12:00 links to where it came from. That is even more important when you're making business critical decisions off of that data. When that data is is versioned, when that data can become outdated, when

12:09 you're letting it make a decision on data that it synced a year ago. You don't want that. So, you need to know where it came from. Where did we fetch it? When did we fetch it? Which is not

12:17 here. Under what idea under what ID and what scopes? Who accessed the data? What permissions were used to access it? Was it transformed? What did it originally look like? And then lastly, what should

12:28 invalidate it? That could be age, for example. The data is more than more than a month old, we don't want to consider this ever. Really important for showing in your

12:37 platform and if not for showing in your internal platform or whatever you're building, even for for being able to investigate when something does go wrong, cuz it will.

12:47 So, putting it all together, here's another example of one that we might use. So, give me a one paragraph status update on our customer Acme. Include renewal risk and last support

12:57 interaction. First, we're going to check the cache for the account summary. We're going to assume there's no skills here. So, we'll check that. If it's still or missing, we're going to call the CRM

13:06 using a live API lookup. Then, we'll query the ticketing system for the last support interaction. Again, that's cached if within the SLA, otherwise it might have to do a live

13:15 lookup. We're only we only want to pull five tickets. We can't pull the full history because again, when we have live lookups, we run into timeout risk. And then lastly, we'll generate a

13:24 derived summary. We might store that derived summary, and we'll pass that back. So, key takeaways, tools are not context. A context graph is going to

13:37 help you reason across the whole company. It's not just tools. It's data. It's synced data. It's processes that you have as a business. Who is documenting, you know, when a customer

13:46 complains, what do we do? How does it know to always route to the right place? That is a skill. These It's your company's skills. It's your processes. It's your data, and it's your tools and

13:56 actions you need to take. More data, not always better. You want fresh, high-quality data. You want to pull only what you need. When you do have to sync data, you want to structure

14:05 it properly, so it's accessed in the right way. And then lastly, every answer has to be traceable. You do not want to be left in a position where your AI made a bad

14:14 decision, and you have no idea why it did that. So, last piece, plugging merch here. Enterprise AI runs on us. We power these features for a lot of companies. We have

14:25 Gateway, which is an LLM router. We have Unified, which helps you sync data from third parties out of your customers' platforms. And then we have Agent Handler, which is live MCP connections

14:36 pre-built across hundreds of tools, governed identity all built in, uh including provenance, uh and yeah, it's plug and play for both internal and customer-facing use cases.

14:46 So, if you want to build an easy context layer, hit us up. Thank you, everyone, for listening. >> [music]

Frontier News · by Hyperjump Technology