Agentic AI at Glean with Eddie Zhou

22 Apr 2025 · 43 min

Ask about this episode

Ask anything about it. ChatGPT or Claude reads this page and answers with the times it was said.

Connect VO and ask about every podcast you hear, including the moments you saved. Add to ChatGPT · Add to Claude

In short

Podcast Notes: Agentic AI at Glean with Eddie Zhou

Episode Overview

  • Podcast Title: Software Engineering Daily
  • Episode Title: Agentic AI at Glean with Eddie Zhou
  • Description: A discussion on Glean's evolution from an enterprise search company to integrating agentic AI capabilities, enhancing productivity and decision-making through personalized search and retrieval of information.

Key Participants

  • Eddie Zhou: Founding Engineer at Glean, previously worked at Google.
  • Sean Falconer: Host of the episode.

Glean's Mission and Evolution

  • Initial Vision: Glean started as an enterprise search tool aimed at improving information retrieval for knowledge workers across various roles.
  • Evolution: Transitioned from simple search functionalities to more advanced agentic AI, expanding capabilities:
  • User Journey Enhancement: Aims to make the journey of knowledge workers easier by reducing the effort needed to access relevant information.
  • Personalized Search Results: Leverages AI for tailored results based on internal data.

Key Concepts Discussed Agentic AI

  • Definition of a Reasoning Agent: A system that can formulate and execute plans using a set of tools to achieve specific goals.
  • Distinction from Other Systems:
  • Compared to RAG (Retrieve and Generate): Agentic systems extend beyond mere retrieval, allowing for multi-step processes and execution of actions.
  • Difference from Workflows: Unlike static workflows, reasoning agents can dynamically adapt their execution plan based on ongoing inputs and feedback.

Contextual Data in AI Systems

  • Importance of Context Injection: Integrating company-specific knowledge into AI systems is crucial for generating accurate and relevant outputs.
  • Challenges of Contextual Knowledge: Distinguishing between world knowledge and specific company knowledge is essential for enhancing system performance.

AI System Components

  • Anatomy of an Agent:
  • Central System: Interfaces with various tools and manages the plan development.
  • Tool Access: Ability to use multiple tools for actions, including retrieval and execution.
  • In-context Examples: Using curated examples to train and guide the agent in decision-making.

Managing Complexity

  • Multi-Agent Systems: Breaking down tasks into smaller, manageable agents can enhance efficiency and allow parallel work on different components.
  • Execution Limits: Implementing guardrails to control the number of iterations or executions to avoid unbounded loops in agent behavior.

Error Management and Debugging

  • Debugging Strategies: Tracking the flow of queries and identifying breakdowns in the system for troubleshooting.
  • External and Internal Dependencies: Managing dependencies effectively is key to system reliability and performance.

Evaluation and Metrics

  • Measuring Success of Agents: Focus on usage metrics and user outcomes to evaluate the effectiveness of agents.
  • Continuous Improvement: Importance of an evaluation framework to gauge the performance of agents after changes are made.

Technical Challenges and Future Directions

  • Tooling Maturity: The need for better evaluation tools to enable developers to iterate and improve agent capabilities effectively.
  • Risk Management: Balancing the innovative use of AI with the potential risks of deploying these systems in customer-facing applications.

Conclusion

  • Eddie Zhou emphasizes the importance of adhering to core engineering principles while developing AI systems, highlighting the continuous evolution of Glean's products to meet user needs while remaining adaptable to market changes.

Key Takeaway

  • The integration of agentic AI into workplace tools can significantly enhance productivity by streamlining access to information and facilitating decision-making, provided that the challenges of contextual knowledge and evaluation are adequately addressed.

Written by AI. May contain mistakes. Listen to the episode to check what was said.

Hear the part that matters, and keep it.Open this episode in VO. Double tap your headphones to save a moment as you listen.
Get VO free

Transcript

Automatic transcript. May contain errors.

0:00Glean is a workplace search and knowledge discovery company that helps organizations find and access information across various internal tools and data sources. Their platform uses AI to provide personalized search results to assist members of an organization in retrieving relevant documents, emails, and conversations. The rise of LLM-based agentic reasoning systems now presents new opportunities to build advanced functionality using an organization's internal data. Eddie Zhao is a founding engineer at Glean and previously worked at Google. He joined Sean Falconer to discuss the engineering and design considerations around building agentic tooling to enhance productivity and decision making.

0:42This episode is hosted by Sean Falconer. Check the show notes for more information on Sean's work and where to find him.

1:00Eddie, welcome to the show. Thanks, Sean. Great to be here. Yeah, absolutely. I'm really looking forward to this. So I'm fairly familiar with Glean. A bunch of my former colleagues at Google have gone and moved on to working at Glean. And I'm curious about how is the original vision of Glean evolved from this enterprise search company to now working and having a still a reasoning agent as part of their offering? Yeah, yeah, definitely. I'd like to think that our vision actually hasn't changed that much. And Enterprise Search was really just the first way that we could deliver part of that vision.

1:37And so the way I like to think about it is with Enterprise Search, we were meeting knowledge workers in a little slice of their sort of job to be done, their user journey, right? You know, they open their computer, they need to do something, whether they're an engineer writing code, a PM researching other products, a salesperson prepping for a call. They all kind of have some journey they need to do. and we were looking basically to make that journey more meaningful easier and sort of free them up to do more things right and so with search it was really about okay if this person can do the work of thinking what is my high level goal what do i need to do identifying that i need to find some information and then going and interfacing with a search product to get that information right so you've really sort of helped them in that little segment right and all we've done as we've evolved from clean search to assistant and now to this agent platform is sort of broaden that segment both to the left and to the right, sort of helping them need to do a little bit less work to understand what do they need to know to do this task, meeting them earlier on in that journey, as well as to the right, sort of helping them get more done after they found the information, right?

2:46Maybe it's just synthesizing the information on the result page. Maybe it's actually starting to help them do whatever they're going to actually do with that information, So I really see that sort of evolution from enterprise search into where we are today as an extension of the same vision we had to sort of help knowledge workers everywhere. Yeah, I think one of the unique aspects of Glean and how you've managed to position yourself in the market is with the models themselves, they're very, very smart, but they're really, really dumb about your data, essentially. They know all of this stuff, but they don't really know anything about you and your company.

3:22And that's where the challenge is to build actual meaningful applications. And I also think that's one of the challenges with some of the other agent offerings that are available in the market. It's like, it's great. This tool can be amazing, do all this reasoning capability, but we're essentially getting that data. And since Glean is already plugged into that from sort of the very beginning, has access to all the sort of really rich information that you essentially want these agents to have access to. Right, right. And I think that that's an important sort of nuance for people to understand as the underlying LLMs that power these agentic systems get better.

3:57Because them getting better is useful for everyone, but it's important to define what they get better at, right? They're not getting better at knowing your company's knowledge. That's a binary thing. Have they seen it or have they not, right? And so you're right that figuring out how to inject, we call it context injection, putting enterprise context at the right places throughout an agentic systems execution is really important to actually getting them to work. Yeah, because I've seen you have a really powerful model, but if you don't have good data, it doesn't really help. You can have essentially a lower power model that has access to the right data at the right time, but perform the best model in the world.

4:40So it really comes down to, I think, the central challenge for most companies building any kind of AI experience today is how do I kind of liberate the data and find that subset of data to provide stuff into that context window so I can actually steer the model in the correct direction to generate a meaningful response. That's right. This sort of notion of world knowledge and then company knowledge as a layer on top is something sort of tying back to your first question that we've been thinking about in the search world for a while. When someone comes to a product in their work life, a search bar, a chat interface, they're not sort of only in the company context.

5:17They're an employee of this company, but they've built on top of a foundation of world knowledge. And so we have to build our systems in the same way. So even in the search setting, if you think about embedding models used for retrieval, you still run into the same dynamic of, hey, have these models seen this new data or this data that's specific to the company? If they haven't, they're not going to perform well. So how do you sort of layer on that new understanding? How do you adjust these models to account for that? The same thing goes for all the generative products and the generative use cases in the agent world.

5:46How do you effectively acknowledge that there is a prior, if you will, in that world knowledge, but you need to augment it with what's there? And it's a really hard problem. I'm not going to claim we've fully solved it by any means, but I think we're really well positioned to keep making progress and building things that give value to people. So I think it's worth stopping down for a second and actually explaining from your perspective, what exactly is a reasoning agent? I think there's a lot of variation in terms of what people think about an agent. And I know Hugging Face recently came out with this nice framework of kind of like the levels of agentic AI.

6:21So how do you essentially define a reasoning agent? Yeah. And I want to preface this by saying, by no means do we think, you know, we're not incredibly opinionated here. I think there's a lot of framings and frameworks that are being developed and they all have their merits. I think we've sort of come to our own internal viewpoint on this. And even that continues to evolve because it does matter when you talk about, okay, if we have a reasoning agent and it has access to tools, right? What are those tools themselves capable of? And so one framing is, okay, a reasoning agent is something that can, given a set of tools, formulate a plan to satisfy an input, and then go and execute those tools, right?

7:06But then there starts to become many different questions, extensions, right? Can it use these tools in an iterative fashion? What is the granularity of these tools? Are the tools themselves other agents in the sense that they also have the ability to call out further into other systems? Or are they sort of more static? And so I know this is kind of a cop-out answer, but we're trying to not draw a hard line around this while still figuring out how can we keep our framework flexible enough to adapt to how the industry is thinking about agents and thinking about agents they might build in the open source world, they might build in other parts, and how can we make sure they can at least integrate with Glean as the dust sort of continues to settle on this.

7:49So when customers come to you and they're asking for an explanation between like, how are agents different than RAG, how are agents different than some sort of like AI application to follow the workflow? Like, what is sort of the explanation there? Yeah, I think for the former, in terms of how it's different from RAG, I think the main component here is that we would see agents as an extension of RAG in the sense that the only tool that a RAG agent, quote unquote, has access to, or the only flavor of tool is some sort of read or retrieve type tool, right? It can issue a search, whether it's a search engine like Lean or a federated search engine.

8:27And then it sort of generates, right? Retrieve augmented generation and it generates based off of that, right? And so agents are simply an extension of that where the content that's being generated may not be the response to the user. It might be the next step in a plan, right? And being able to sort of sequence this out so that it's not just a retrieve and then a generate step, but rather a more extensible. Perhaps it's multiple retrieve steps. Perhaps it's a generation that goes into the next step that is then another retrieval. It's providing access to more actions that are not just retrieve and read actions, but actually executing.

9:02It could be executing code. It could be interfacing. We call them write tools, but sort of writing out into the world. So those are some ways that we sort of distinguish agents from core RAG. And the second one you mentioned, what was the second distinction you were looking for? Essentially like an AI application that's following some sort of workflow. Yeah. Yeah. So I think in terms of the word workflow, I think the distinction between what people have been calling agents, and this is where terminology does get a little bit blurry, but we do like to think about things in terms of a sort of static and dynamic, right?

9:35So a workflow might represent something that's more of a fixed execution. It might be multiple steps. There might still be LLM calls that are allowing for some variability, but the actual execution flow of what steps will be executed is fixed, right? And the system itself, quote unquote, can't modify that graph, right? But once you introduce some level of dynamic where you say, okay, for a given query, we're actually constructing a graph or perhaps iteratively constructing it, that becomes the distinction between a workflow or what people are calling a workflow and something. And of course, you can take, you know, graphs that are constructed for a given query and freeze them into workflows that are repeatable, but that's another distinction between these sort of workflows and more dynamic agents.

10:21Right. So it really boils down to like, what is the control logic? Is it some sort of predetermined, pre-programmed set of steps, or are you essentially allowing sort of the brain of the agent to determine what that sequence of steps is? That's right. And they definitely both have their place. It's sort of a high risk, high reward, right? The more levers you give the system to create something flexible, the more powerful it can be. you could hope that it generalizes to new use cases, new queries, but at the same time, it can be more unpredictable, right? And if you want something more predictable, you want something frozen, you certainly can buy sort of the size of freezing that control logic, as you said.

11:00And of course, you can use a dynamic system to help you build the initial sort of graph that you want to freeze, iterate on it, and then freeze it and use it indefinitely, right? That's obviously another path you could take. Do you see most people using some sort of hybrid approach where some part of the sort of workflow might be agentic where it's a more dynamic set of reflection steps or something like that, whereas other parts of it is a more predetermined set of orchestration steps? Yeah, I think we do see both. And I think everyone wants a fully looping dynamic system, but they often find once they deploy it, it's a lot harder to sort of get a handle on.

11:41And so people end up building more constraints back around their system and sort of freezing different parts of it. But it really depends on the use case and the stakes. If you have something that are high stakes, you can't afford that execution graph to change. And for us, I think what's interesting, sort of tying this back to the enterprise case is when we talk about something like reflection, right? A concept like reflection, which is, hey, given what I've executed so far, you ask this central brain, this LLM decision-making logic, what should I do next, right? And the really tricky thing about many of these enterprise, not all, but many of these enterprise use cases is the same dynamic between world and sort of company knowledge, right?

12:23It doesn't know what it doesn't know, right? Even in a simple, I mean, this problem is present even in RAG, right? In a simple retrieve and then reflect before generate step. You know, if I'm asking some question, it could be as simple as about like my holiday calendar that my company has for this year. Depending on it, what the retrieval engine does, if it retrieves the right things or if it doesn't, how can you ask that reflection component to do the right thing afterwards, right? If it's sort of beholden to the performance of that previous upstream system, if you present it, here's the query that was planned, here's some results, you know, what should you do next, right?

13:00And you could imagine a case where the search engine didn't return the right results and it decides to respond. So how can you really, reflection, I think, is a very hard task to do in the enterprise context because these agents generally don't know what they don't know, right? And so that's a very careful context injection sort of problem to think about and work on. How do you deal with sort of the like unbounded execution, even outside of reflection, like, unless you're putting like a hard limit on how many times we can kind of loop over this, like, how do you essentially manage the fact that the execution cycle might be unbounded?

13:37Yeah, I think as simple as it sounds, the first thing you mentioned is kind of like the easiest way to do it is you might allow for a fixed number of executions at various stages, right? It could be overall the number of steps, you know, you can only create an execution graph with this number of steps, or within a given a number of steps, you can only have it iterate this many times. Those are some good guardrails to put in. I think it also sort of depends on the complexity here. There's probably some neat analog to, there was a paper last week or two weeks ago that people were benchmarking a lot of these thinking models like the LMs themselves and sort of measuring their performance as the number of thinking tokens increased.

14:15And they found that, you know, there's a sharp decrease in performance once the thinking tokens became too long. And the sort of, I don't know, intuitive analog is that, well, it's rabbit holing, it's spinning, right? And you could probably extend that same thing to agentic systems where, you know, if your number of executions, if you're looping too much, it's probably unlikely you're going to reach a good outcome. And I think there's a careful balance there, right? I think there's a lot of value that people can have with simpler agents that do execute a much smaller, you know, we're talking order of single digit number of executions rather than dozens or hundreds, right?

14:47And so I think playing in that smaller space still provides a lot of value and you can add some simple upper bounds depending on the use case. Does it help to think about essentially breaking up these problems where you want an agent to operate and solve some sort of tasks instead of using sort of one monolithic agent to perform that to split it up essentially into a multi-agent system? Totally, totally. And this goes back to I'm trying not to be too opinionated here, but personally, I do have some opinion in terms of, for us, we're also thinking about, okay, how do you scale, right? How do you both build agents internally and help others build agents in a way that isn't bottlenecked on a monolithic system?

15:27Again, drawing from ML systems and sort of first principles here, a lot of times, ML systems in large products become too monolithic and there's a downside to them because then, okay, you have your team of 15 people. Now they can only all work on this one model. And everyone's just trying to work on this one model. So your actual rate of improvement is lower than if you had left that factored into multiple systems, you could have multiple people working in parallel and sort of you're giving up that short term quote unquote gain for a more medium and long term gain, but you'll reach a better spot.

16:02And I think the same thing applies here where our internal approach right now is a little bit more, okay, yes, you do have a central agent, but the sort of tools, and I use that term again, a little bit loosely that it's given access to maybe other agents. And so if you can delegate more to those other agents, and it's not just about in the short term, what you can do, but someone full time focused on making that agent successful is always going to be more, you know, going to do have a better time doing that than you trying to solve all these things at the central level, right? So I do think there's a huge role for delegation here.

16:34And it's about figuring out that right interface between that central agent and these delegated agents. Yeah. I mean, I think one of the things I see people sort of missing as they sort of dive into the space and are excited about it is that as exciting as this stuff is, it really carries all the same challenges that you have with running any like large distributed system. And the scale problems aren't simply just about infrastructure scale. They're also about like, how do you scale the teams? And essentially, how do I design this in such a way that I can loosely couple these things, treat them essentially like a microservice that can kind of operate independently, even leverage different models and stuff like that, independent of some of these other systems.

17:12And the teams don't have to necessarily know exactly what's happening within each particular team and have these hard, fast dependencies between them. Totally. I mean, I know this podcast is software engineering daily. And so, you know, experienced software engineers everywhere, I'm sure have been punching the air, seeing, you know, LLM agent systems being designed without thinking about core engineering principles that just like all the things you said that are still incredibly relevant. And I think, you know, it's the ability for these systems to show you something really awesome in the short term and give a good proof of concept has made it easier to sort of forget good engineering principles when designing them for the medium and long term.

17:52And obviously the rate of change and the pace has made that hard too. Yeah, absolutely. And then in terms of like an agent, going back to like a singular agent, can you break down what the components or the anatomy of an agent is and how each of those are used in order to essentially come up with a plan, perform these reasoning steps, potentially execute tools and sort of to solve a specific problem? Yeah, sure. The way we're thinking about it is, you know, we have a central system that has access to a set of tools and, And, you know, its first step is to develop that first pass at a strategy or a plan using those tools, right?

18:29And how it does so is important. You can obviously give descriptions of the tools or if you're using function calling, whatever that interface may be. But as with all LLMs, you know, having good in-context examples is really important, right? And so this kind of goes back to the team scaling component of like, how do you influence this central system? Well, you can have teams that are building these sort of golden in-context examples that say, hey, I want to make sure that when this central agent sees a query like the one I care about or sees an input, that they can effectively sort of build the graph that represents what I want it to look like, right?

19:07And so I think that the first part is assembling this input to this main, what we call strategize call, that is composed of available tools, but also curated important examples that demonstrate how to use those tools, how to synthesize them in this multi-step way. And then it becomes the output of this system is a sort of graph that can be partially executed or fully executed. But again, that graph, it has some level of delegation. Each of these tools, the way we're thinking about it, you can defer to them more and more. I can say, hey, for this tool, I have an objective. I'm not telling you exactly how to accomplish the objective because that is the tool or the sub-agent's goal or not a goal, but it's their sort of domain is to figure out how to do it.

19:50And so you can sort of distribute the cognitive load, if you will, over the sub-agent as well. And then the sub, you know how you have different teams working on sub-agents, different folks can work on these sub-agents and make them work well. And then, yeah, so then you can basically execute your graph and sort of come back to the central system as needed. But that's kind of the rough flow that we're thinking about right now. Is there a limit to the number of tools that any one agent can handle? Definitely. I think there fundamentally is. And even if we're not even talking about hundreds of tools, even if we're only talking about a dozen tools, the permutations of chaining them together to accomplish some set of things is also obviously exponential, right?

20:31And so you do need, this is our kind of drum that we beat, a lot of it can come back to search. And for us, it's thinking about, okay, how can we make sense of all these permutations, especially the ones that are these sort of in-context examples that are examples of how to use these tools in sequence or in parallel. and take that eventual set of tens of thousands, hundreds of thousands, millions and search over them down to something that's much smaller and guide the LM to that, right? So you almost have like a graph search problem or just some sort of item search problem that you can then say, okay, now it's a tractable set of things that we want.

21:08We've given an assist to the central agent. It doesn't have to fully reason over all the possibilities. You can, again, factor part of that system out itself to a search problem, do that search separately, and then say, hey, here's five, 10, 20 different tools and or combinations of tools that are probably relevant for this, rather than, you know, the entirety of all the combinations. So the idea there is that, you know, I have some sort of context about what it is I need to, you know, maybe data I need to gather, then I can potentially, you know, perform the search. And then essentially, that's sort of my first line of defense as a tool at sort of the main agent that's operating here.

21:44And then from there, I know, okay, well, you know, Slack has some of this information, you know, Google Docs has some of this information, you know, Confluence page has some of this information, and then I can essentially limit the set of tools to those three tools to then go and execute against. Yeah, that's a good way to think about it. And another thing, you know, from our side, the way we think about it is the other dimension on this is the sort of company specific dimension, right? There are, you know, mostly companies kind of do work or store information in roughly the same way, but that's very quickly starts to break down companies develop their own ways of storing information.

22:17That's what we've been building with search, right? So even the sort of algorithms that you would use or the nuances of like, okay, what tools or workflows are relevant for company X for this query might be different for company Y, right? And so the way that you build that search algorithm can start to be, you know, it's not just about, you know, you need to do query understanding in the same way over, okay, when Confluent users are asking about this kind of query, what kind of workflows should be surfaced in this search setting versus if a Glean employee is asking that, it might be different, right?

22:48And that kind of goes back to, you know, a lot of what we've been doing in Glean around, not just around language adaptation, but also around these other signals that are important to understand, right? Like is, you know, Sean is working in these different places. So when he asks this query, again, that search algorithm should be actually personalized to him and it may return a different set of things, a different sort of set of sub-agents to reason over than if someone else at Confluent does. Right. How do you persist, you know, the identity information across all these particular endpoints? I mean, in the Glean context, a given request is going to come in and it's obviously, it has identity information associated with it, right?

23:26So, we can make permission to calls wherever we need it. At the agent level, I guess your question is sort of, okay so i guess if we draw the analog back to documents it's obvious in that you know documents have authors and people interacting with it but now if you're the items that you're sort of searching over are other agents or workflows maybe your question is how do we know like who is associated with them and how the identity gets associated there right like if i'm the user that's interacting with the agent and let's say there's some sort of like ui to this agent the presumably agent needs to know like who i am in that organization so that when it makes a tool call, essentially, my identity information can be factored into that tool call.

24:06So it knows that, okay, well, Sean only has access to this subset of documents within the organization. Yeah. I mean, in that sense, it's no different than how Glean manages identity throughout the whole, you know, we can re-leverage our entire like identity infrastructure and platform. But I think the interesting question is sort of on the modeling front of, you know, if Sean's colleague has created this agent, should that agent be more likely to be relevant to Sean, depending on how closely they work together, where they're working in, these same kind of signals, because we can have that identity metadata and that sort of implicit.

24:37The explicit stuff is a given, right? You only can have access to things you have access to. Certain tools can only execute if you have access to them. It's not just documents, right? So we're able to build on all the same clean infrastructure we have to make that work. Given that you have essentially any agent, multi-agent system, you have a lot of like these internal external dependencies, presumably it's going to be probably not running all on one server and stuff like that. And on top of that, you have sort of these unbounded execution plans that might cycle to happen. In a stochastic model, the heart of this is acting as the brain.

Read the full transcript

25:09How do you manage the debug process? How do you figure out when errors happen with some of these dynamically generated execution workflows? It's a really, really good question. and it's another thing that as the use cases and the tooling like sort of evolve in parallel, we're all trying to build the right tools to give ourselves this ability, right? And for us, it's sort of similar to reasoning about the life of any query, if you will, like even in the search context, right? Most of the things we've been building are compound AI systems. They're composed together. So you need to be able to say, okay, at the high level, where can I track this down to?

25:46Where in the flow input and output of each system do I think the breakdown is and sort of do that trace, right? And this, you know, people talk about reasoning traces, this is similar. And so for us, when we talk about the graph, it is a lot, okay, how can we figure out where in this graph, you know, the output was not desired from the input. And you can always start from the back, you could start from the beginning either way. But I'm curious to dig into a bit, you said sort of internal and external dependencies. I'm not sure I fully understood what you meant there. Well, from the agent's sort of perspective itself.

26:14So I could, this may not be relevant in the context of Glean, but just thinking about agents in general, like I could have sort of internal knowledge systems I need to tap into, which is, you know, my Google Docs or something like that. But it could also have fact, I need to factor in essentially external knowledge systems like DIN or, you know, some sort of website or something like that, where I'm actually searching beyond the bounds of my companies. That's definitely relevant to us, by the way. You know, it's clear that there's a one way street of like, you know, internal stuff's not going out, but definitely external stuff is coming in, right?

26:46Like I mentioned, people are coming to it. So many queries that come into agents, you need that blend, like you're saying. Yeah. And then also you have short-term memory, long-term memory, which could be, you know, different systems as well. I guess like, how are you managing that? Like, is your sort of long-term memory using a vector store representation of that? Yeah, I think long-term memory, the way to think about it is, again, you can model that as a reliance on your context injection, right? How do I know what is the relevant plan for Eddie for this query? There's short-term information I can make use of, like what was his last query?

27:22What work was he doing before this? But then that extends further into like these signals that we use for search are in many ways closer to long-term memory, right? You know, how, what was Eddie doing like one month ago or what team was he working with? These things, again, can be injected into different pieces, different prompts at different stages in this graph via any methods, right? They could be retrieved with means. They could be vector retrieved. They could be lexically retrieved. I think the more important thing is that they do, they are retrieved in some fashion and sort of injected at the right time.

27:57In terms of the outputs that any of these agents are generating, how do you essentially control for incorrect information, hallucinations, like put guardrails around it? What sort of post-processing steps exist to essentially evaluate the response to make sure that it's actually a valuable response? Yeah, very good question and very hard question to answer. You know, I think for us, our best bet is, look, these systems are unbounded, right? And I think the biggest sort of delusion that some folks have is like, I can instruct things not to happen and they won't happen, right? But instruction following, it's well-defined.

28:32You could measure and rate how well is this instruction followed. But once instruction starts to bleed into knowledge, again, going back to this, you don't know what you don't know. You tell the LLM never to lie. It's not lying with the context that it's given, right? And so this does relate a lot to RAG concepts around, okay, is something correct conditional on the context that it's given? Or is it correct, sort of independent? As an end-to-end system, the user doesn't care. The user needs to make sure they're not getting false information. But from an ML engineer's perspective of diagnosing, it does matter what part of the system is breaking down, right?

29:06In terms of the guardrails, I think doing stuff on the fly, there's some low-hanging fruit that can be done. But ultimately, on the fly is a hard problem, right? You're asking a system to reason itself, hey, is what I just admitted correct or incorrect? I think going back to this knowledge problem, that's a very hard thing to do. You can obviously build in online judges to say, you know, is tasks that are a bit more narrow, right? Like, you know, was the output that was just created ungrounded on the context that it was given? That's more tractable. But even if it isn't ungrounded, that doesn't mean that it's correct, right?

29:40Again, given that context problem. So a lot of what we try to do is measure more things offline in batch, right? You can run all kinds of processes to generate things offline, run them through your system, generate things you know to be correct, and make sure that your system can achieve them, or make sure that you're, you know, create adversarial sets where you say, hey, I'm going to make it look like this is the case, how can I measure my system's performance to back off correctly, or whatever it might be. And so you kind of come at it from that side, and you get a measure of, okay, how good are we at this?

30:08And how can we continue improving that? And you pair that with what's happening at request time online. But it's really hard, it's sort of an unsolved problem to say for every input request coming in, do I know if it was exactly correct or not? I can put some guardrails around that. But the sort of strategy we've been coming at is like larger scale measurement from the other side. In terms of all the pieces that make this system possible from tracing that you're doing, some of this offline batch processing to evaluate responses, actually building and deploying the agents in the way that they communicate, how much of that is like built from scratch versus relying on existing tools?

30:48I would say it's a blend. I think we are constantly evaluating and looking at parts of our system that even were built earlier that now there's a great open source alternative for and revisiting whether we can rebuild on top of that. I think it's a blend. It's sort of a trope that engineers always want to reinvent the wheel, But a great engineer will never do that because they know they can create more impact sort of building on top of what others have built. And for us, I think it's so it is a blend. Our principle is to try to reuse where possible. We don't always do that perfectly. And I think especially in an enterprise environment, you know, there's also components like how do we if we care deeply about efficiency, for example, right, and performance, right?

31:30Are we sure that the frameworks that we're using are pushing the boundary there, right? Or do we need to go in and roll something ourselves? Can we optimize within that framework or do we need to roll something ourselves, right? Are there fundamental design decisions in these frameworks that sort of go against our security constraints or our sort of deployment setup? And, you know, that doesn't come up a lot, but I think there's these checklists of things we run through to understand, can we sub out, you know, a new framework for what we have? But at the end of the day, it's, you know, sometimes we're rolling our own and sometimes we're relying on what's out there.

32:03do you have some sort of eval framework put in place to make sure that when you are making changes to perhaps like you know the system prompts of some of these things that you're actually generating like a better result than you were previously oh definitely definitely that would be crazy if we were just pushing out changes without without evaluation i see some crazy stuff out there so totally i should say that'd be crazy i know probably most people out there are doing that there's a lot of putting your finger in the wind and seeing which way is Totally, totally. And I sort of have mentioned this before to other folks internally, because it's interesting.

32:34The team has been building an ML or AI product for a while, right? And so they have the muscle built of what evaluation means, right? And it's interesting coming from the search side, because you have sort of the search side, the traditional ML side, and now this sort of Gen AI product side, right? Where on the traditional ML side is, you know, you have some large scale ML system, you monitor some metric, you try to make, you know, your experiment is, hey, I changed the way this model trains, I changed this model architecture, numbers go up, great. The search world is sometimes that, but also a lot more qualitative.

33:06Hey, I'm looking at individual queries, I'm trying to understand which parts of the system are breaking down, what can I change, but I'm always going to run an evaluation, right? And when you run an evaluation, you have some parts that are automated that give you a high level metric, but you're also going to get a qualitative sense. You're going to go look at some queries and understand more vibes based evals, if you will say. And that was a thing that people started with a lot in the generative world, but it's still really relevant. So I think it's a lot of it is about pairing something quantitative, large scale.

33:32You can say, hey, I ran my evaluation suite on my prompt change and it's clearly, you know, the metrics went down a lot. And so I know there's something to be concerned with. If you run them and they're all neutral, it might still be the right thing to do. You have to sort of rely on, hey, is there enough qualitative evidence here for me to believe that I'm making progress, that I know I'm improving some of these issues. And so I think all things in balance here. And then layer on top of that is automated. Once you have a strong enough evaluation signal with enough density, a lot of prompt engineering stuff can then be automated and you can use all kinds of frameworks out there to do that.

34:06In terms of the agent experiences that are available on Glean, I know that there's essentially like a no code experience where I can just fill out some forms, create an agent that way. There's also some existing sort of prebuilt agents. And I know that Glean has apps as well that you can build against the APIs or the APIs for building that new agent experience as well. I don't want to speak out of the product roadmap and make a bunch of PMs and or engineers frustrated that I said the wrong thing here. So I don't know what to commit to here, but certainly like we want to support a range of builders from low code all the way to people understanding how to programmatically do these things.

34:42I think API definitions are important and it can be tricky in the generative world to say like, hey, what exactly is this API? But I think in the agent building case, there's definitely talk of it. I don't know if it's committed to, but we want every engineer internally to be able to build powerful agents on the same set of tools that we're giving external users. So if we can't successfully, I guess that's our sort of forcing function to make sure whatever we're exposing and the platform we're building is effective. Because if engineers with sort of full access, quote unquote, internally can't do it effectively, then we certainly can't expect folks outside of Glean to do that.

35:21So how are you dogfooding some of this stuff internally? Are you using some of this technology to essentially make people more efficient within Glean? Yeah, I think folks are building internal agents, finding use cases where they're relevant and trying to build those using that same suite of tools from low code to otherwise. and they have different levels of traction and that's the neat thing about user-generated content, right? Like some of them take off, some of them don't. And so our product team is constantly trying to understand, hey, what use cases are really shining through? How much of things that people ask in chat or Assistant itself are really agents or workflows that should be abstracted out and sort of made more repeatable and how can we make that happen?

36:01So a lot of it is sort of bringing more structure to a lot of existing usage. How should people be thinking about measuring the success of any particular agent that they're using? Wow, what a loaded question. I wish I could speak for... There's so many different agent use cases, right? And I think usage is a decently good barometer, right? If people are coming back to it, that means they're probably finding value out of it. And the long term, it holds true. You could build an agent that's actually just wrong all the time and people use it at first, but then once they realize that it's wrong, they won't.

36:32So as long as you sort of measure on a long enough time horizon, I think that's an effective measure. Usage is always king for any product. I think when it comes more to success, it's about measuring outcomes that come from that. And that starts to get a little bit more specific. Are you talking about, hey, here's an agent that half of our salespeople use and the other half didn't? Are we running an internal A-B test to see how many exceeded their quota by a lot or not? You could start to start thinking about some of those outcomes, although that becomes, like I mentioned, really use case specific.

37:03How should companies be thinking about agents versus some sort of simpler process? Like what is the scenarios where it makes sense for them to be like, okay, well, we're going to go, you know, fall in on an agent versus some simpler, like, you know, prompt based approach or workflow? Ideally, they don't need to think about the level of abstraction. Ideally, a single product can sort of cleanly span the gamut of like, I'm putting in a natural language instruction on this use case and perhaps behind the scenes, like I don't care what happens. It's going to either do something simple or, you know, if it detects something complex, then I'll be prompted to say, okay, we think this is probably like merits something more complex.

37:45Do you want to help like refine or iterate on this agent, right? But requiring people to do the pre-work of understanding how complex their task is, is a hard thing to do. It's a big ask to make, right? And so at least from our perspective, we'd like to sort of lift that away from folks and get them to try the simpler thing and push them as up the complexity curve as needed. What would you say is one of the biggest, hardest technical challenges with actually building agents today? What is the gap that's there that some R &D efforts need to be put into in order to solve? I actually still think tooling and the evaluation suite of tooling, and it's just an engineering problem, is still sort of a little bit behind ML infra in the traditional ML world.

38:32And the faster you can give folks the ability to see how their agents are doing and help them evaluate it at scale and push them to create a lot more training or eval data, the faster these agents can actually work, right? Because a lot of it is getting that evaluation signal so you can tune on it. So I do think that's to me a bottleneck I see across the industry, not just because a lot of people see a small barrier and they just give up and they just ship whatever's out there because they're like, I can't measure this anyways, right? But imagine how much more reliable what they could ship is if they could have iterated on it.

39:05And so that's top of mind for us as we're thinking about, okay, how do we help people build not just any agent, but like effective agents, right? How do we give them the right toolkit to really measure? Because no one wants to put something out there and then it turns out none of their colleagues can use it because it's unusable. We want to help them sort of get a pulse on, okay, you know, I'm pretty confident because I ran hundreds of queries on this and that was really easy to do that this is going to work as I expect it to. In the companies I talk to, I think there's, of course, there's a ton of interest in leveraging AI, but there is a lot of fear around making any of this stuff customer facing.

39:39So a lot of it is looking at, I think internally to how do I augment my existing sort of knowledge workers and find efficiencies there before I ever put something sort of customer facing. Yeah. I agree. I think tooling maturity is a challenge. I think this is also why a lot of companies that are doing this sort of in production don't trust even some of the existing tools that are in frameworks that are available because they're just worried about the maturity of those tools. It's not like you're building, even on the cloud now, that's been around for 15 years or whatever. You're building on stuff that's maybe only been around for six months sometimes.

40:12Yeah, there's definitely that aspect. And a lot of it is the applications of ML before were people understood, hey, I have this classifier. It has precision recall. That's not 100%. But I know what the business outcome is with a false positive and with a false negative, right? For a lot of these applications, the business outcome of a false negative or I mean, it's not even defined a false negative, false positive. It's unbounded text generation. It's, you know, right action that does something that could be really devastating. Like it's hard to measure the business outcome of that, right? But a lot of people still need to just understand that it is still an ML system.

40:45There's going to be some stochastic nature to it. It's not going to behave exactly how you want it to all the time. It's the difference between an ML feature and a software feature in a way, right? It needs to behave like you intended to enough of the time. But I think that sort of uncertainty is fundamentally built into a lot of this. Awesome. Well, anything else you'd like to share? No, we covered so much here. Thanks for some great questions. And it was really awesome talking. Yeah. Well, thanks for being here. I really enjoyed it and cheers. Cool. Thanks, John.

From the publisher

Glean is a workplace search and knowledge discovery company that helps organizations find and access information across various internal tools and data sources. Their platform uses AI to provide personalized search results to assist members of an organization in retrieving relevant documents, emails, and conversations. The rise of LLM-based agentic reasoning systems now presents new

The post Agentic AI at Glean with Eddie Zhou appeared first on Software Engineering Daily.

More from Software Engineering Daily

All 195 episodes
Agentic AI at Glean with Eddie ZhouSoftware Engineering Daily · 43 min
Listen in VO