Latest / Agentic Conversations (formally mlops.community) / Real World AI Agent Stories // Zach Wallace // #283
Transcript
- 0:00So hey everybody, my name is Zach Wallace.
- 0:03I am an engineering manager of at Nearpod.
- 0:06We are in the Ed tech space for K12 throughout the US, but also
- 0:10throughout the world. And how do I take my coffee?
- 0:14I take my coffee black every time.
- 0:17Yeah, I I learned that in college where I was desperate
- 0:20for money and and cream was expensive.
- 0:24All right, this guy feels like he is smack dab in the bullseye
- 0:28of the Venn diagram that I would paint my picture of for I I knew
- 0:33that Zach and I were going to be friends.
- 0:34To be honest, I knew it. I had him on here.
- 0:37It was excellent conversation. And why did I know that?
- 0:40Because he wrote a whole blog post on how they made their data
- 0:46platform more efficient at Nearpod.
- 0:48And right when he got on, he said, you know, what I've been
- 0:52doing though, which is pretty wild, is diving into the world
- 0:56of agents. And I have now done some crazy
- 1:03stuff when it comes to breaking down barriers between
- 1:08departments at the company. So we talked about all that.
- 1:13Welcome back to another ML OPS community podcast.
- 1:16I'm your host, Dimitrios. Let's get into it.
- 1:26We started with this, we were supposed to come on here and
- 1:30talk all about the data platform and the transformation that you
- 1:34did there. Maybe you can just give us the
- 1:36TLDRT, like super TLDR of that, because we're going to take a
- 1:44bit of a curveball here and go on a totally different path.
- 1:48But I feel like there's a lot of valuable information in what
- 1:52you've done with the data platform.
- 1:54So let's go over that real fast and then turn left.
- 1:57Yeah, for sure. So trying to summarise this as
- 2:00best I can and my, you know, 10 minute read on Medium felt like
- 2:05the summary, so I'm going to try to do a little better there.
- 2:08So essentially we had data in a bunch of disparate systems, a
- 2:12bunch of disparate data sources, and we have monoliths even on
- 2:17the data, the data architecture side and micro services on the
- 2:21data architecture side. And with that, we had data all
- 2:25over the place and we didn't really have a good way of
- 2:28condensing the data, transforming the data or
- 2:31processing for reports in any matter, right.
- 2:34And what we were able to do is utilise a combination of DBTDBT
- 2:39core is what we're using under the hood.
- 2:42It's been fantastic. Yeah, some from some of my
- 2:45engineers have just absolutely fallen in love with it because
- 2:49it is transformational for an engineer going into the data
- 2:54engineering world. The best way to describe it is
- 2:57it feels like you're engineering data, like your software
- 3:00engineering with data. And then we're using Redshift,
- 3:04which in the past has had a bunch of really large issues,
- 3:08but we're using it like in an Apache Spark.
- 3:11So it's just for transferring the data and, and bringing the
- 3:15data to where we need it. And then we're passing it to
- 3:18other areas like, you know, we're, we're a subsidiary of
- 3:21larger companies. So maybe we're sending it to
- 3:23Snowflake or maybe we're using S3 to process other, other areas
- 3:27of data. And we built ourselves a data
- 3:31product exchange, which is the underpinning of a data mesh.
- 3:35So you can identify where the interactions are across the data
- 3:38products, how you will be able to interact with data products
- 3:42throughout our system. And again, we have like 20
- 3:44disparate data sources all then they have anywhere from millions
- 3:48of rows to billions of rows. So we're talking large scale
- 3:52data to some degree, not not meta large, right, but but
- 3:56larger than A than Apoc, if you will.
- 3:59And so we're able to do this with consistency, with
- 4:03reliability and with confidence. Dude, so explain what does it
- 4:08look like with the disparate data sources and how did you
- 4:12pipe it in? Or did you just make each one of
- 4:15those its own API? Like I, I guess what I'm not
- 4:19super clear on is give me the breakdown.
- 4:23What You had this database over here and then you had another
- 4:26database over there and you had to connect those two with DBT
- 4:30and then you're joining them and then putting them in another
- 4:33database that then has this data contract around it or something,
- 4:38and it's a data product to. What does that look like in
- 4:40practise? Sure.
- 4:42Yeah. So we have data.
- 4:44So we have data stored in, you know, these disparate systems
- 4:47and most of them are Aurora DB, some are Dynamo.
- 4:51But one of the key pieces is with Redshift, they enable
- 4:54something called 0 ETL. And essentially this is in ELT.
- 4:59So it's not an ETL like you would typically see it, but it
- 5:03provides real time updates for any data within any of these
- 5:07disparate systems. And if you hook it up, you're
- 5:09able to get the data transferred over to Redshift and then you're
- 5:16able to process the data if you want in Redshift or we've set up
- 5:20exposures with DBT. So we're able to bring that data
- 5:24out of there into any other system like Snowflake, for
- 5:27instance, right? So bringing this in the
- 5:29Snowflake and enabling us to actually do transformations in
- 5:32Snowflake where it's very powerful.
- 5:35So again, we're using really Redshift like in a batchy Spark.
- 5:39And it's a wild mental shift because of how easy zero ETL is
- 5:44to set up. And so we set it up probably
- 5:47each database took like 5 minutes to set up with, you
- 5:50know, with the console, AWS console.
- 5:52And then we're able to, to send that and process that wherever
- 5:56and however we want. We use S3 as an intermediary
- 6:00between different data sources beyond Redshift, right?
- 6:05So the micro services go into Redshift, the DBS going to
- 6:08Redshift, and then from there they'll go into S3 or Snowflake
- 6:12or something like that. But where does DBT come in?
- 6:16I didn't catch that part. Yeah, totally fair.
- 6:19So DBT is how we process and transform all of our data in any
- 6:23of our areas. So we have multiple DBT repos
- 6:25based on the domain that it's living in.
- 6:28And so DBT will typically live. We have one inside of Redshift
- 6:32and one inside of Snowflake. So if we want to process the
- 6:36data for any of any of the domain relevant areas inside of
- 6:41Redshift, then we'll run that through through DBT.
- 6:45Then that gets passed on the Snowflake and we can do even
- 6:47more transformations in there. Nice.
- 6:50OK. And you did say that buzzword of
- 6:532022, I think the data mesh. Why do you feel like this is
- 6:57data meshy but it's not like the full on data mesh?
- 7:00Right, so the data mesh by itself provides the ability to
- 7:07send data and define data to anywhere it wants to go across
- 7:12your system. The the issue is that similarly
- 7:16to how you build micro surfaces, you have to build this with
- 7:19domains in mind, right? And so as we're building this,
- 7:24we're working towards a data mesh right now where we're
- 7:26defining the domains, but it takes a while to break down
- 7:29micro services and monolith data architectures and really define
- 7:33the right domains. So we have a team working on
- 7:37that now and they've been working on it for about 12
- 7:39months. We have some data products,
- 7:41probably, you know, 20 or so, 30 maybe that are able to transfer
- 7:46between different, different areas for architecture.
- 7:48But ultimately the goal would be to implement streaming data
- 7:53products where you can go through.
- 7:54Right now we're only batch processing, right?
- 7:57So at this point in time, 0 ETL works really well for batch
- 8:00processing, but not for streaming.
- 8:02And so we have to build the other side of that.
- 8:06And that's why why I would say we're sort of a data mesh
- 8:09because you can get data from a batch processing, but not from a
- 8:12streaming. And we need to really define how
- 8:15other teams can get in there because this is a, you know, an
- 8:18organisational shift when you talk about going from the
- 8:22traditional my sequel data, you know, maybe it's PHP, maybe
- 8:26it's, you know, some sort of TypeScript type ORM sort of
- 8:29ordeal, right? And you're defining these, these
- 8:33systems and how they work. But now we're bringing these out
- 8:36into a separate area and actually implementing them back
- 8:39from our transactional layer. We're able to send that to the
- 8:41analytics layer and then back into the transactional layer for
- 8:45further processing or real time updates or anything.
- 8:48And that's that's where we're still trying to learn, if you
- 8:52will. And what do you mean by data
- 8:56product? Yeah, that's a great question.
- 8:58So we define and data product is is a word you'll hear to find 18
- 9:03different ways. So it's important for you to
- 9:05define it yourself in. That was kind of why I was like
- 9:08OK for the listeners at home AK me.
- 9:11What data product in your mind? Yep.
- 9:14So a data product, as we've defined it, is the intersection
- 9:18of the data and the data definition.
- 9:21So it's going to be the transfer of, you know, a set of data that
- 9:27has a clear definition of what it is.
- 9:28So let's say a user, for instance, you send, you know,
- 9:32the times a user is logged in, you send the times that a user's
- 9:37done something in your application.
- 9:39And all of a sudden that is user usage, right?
- 9:42And that is a data product by itself because you're able to
- 9:45define exactly what that is. And you're sending the data,
- 9:49whether it's aggregated or, you know, just single rows, a bunch
- 9:53of rows. Nice.
- 9:55And so then theoretically you would have many different types
- 9:59of data products. Maybe there's user usage, but
- 10:02there's user profile and there's user.
- 10:05Whatever else you can think about.
- 10:09Exactly. OK, cool.
- 10:11So now let's take a hard left and talk about what you've been
- 10:17doing recently because that was almost like your past life.
- 10:21And she just told me, for the last three months I've been
- 10:24diving deep into agent architectures.
- 10:27And I thought, well, that's perfect because I'm all in on
- 10:31agents too. So I do love talking about data
- 10:36engineering for ML and AI and data platforms, but I also am
- 10:41fascinated by agents right now. And so what's your story there?
- 10:47So I would rephrase how we stated it's a hard left.
- 10:49I would actually say this is the next step.
- 10:52So in this architecture, the key that you need across your system
- 10:57is data, right? You need the data of your users,
- 11:01of your system, of the architecture to be able to
- 11:04facilitate quality in your system with LLMS. And that's key
- 11:08because you can, you can ask an LLM to do whatever you want and
- 11:12it's going to give you however it interprets it.
- 11:14But without data, it's not going to have the quality associated
- 11:17that you need to provide reliable and confident answers
- 11:22or, you know, suggestions to your users.
- 11:24However, you're going to use this.
- 11:26And so the data platform is really the first step.
- 11:29It's getting the data in places that now you can utilise that
- 11:32data for better quality responses or better quality LLM
- 11:37responses. And so we endeavour, we took an
- 11:41endeavour on the agents. We, we tried to see, OK, the
- 11:45market's demanding that we use LLMS in some capacity.
- 11:48I'm in the Ed tech world and and that's a dangerous world to get
- 11:51into LLMS, right? Because we have to consider the
- 11:54students, the parents, the state legislature, we have to the
- 11:58country legislature if we're, and we're a global company.
- 12:01So if we go globally, how does this affect different cultures
- 12:05across the world? And that's a tough problem to
- 12:08solve, as you've probably seen, whether it's language barriers,
- 12:12because LLMS are not great at trans adaptations.
- 12:17They are good at translations in some cases, but not trans
- 12:20adaptations. They're not great at identifying
- 12:24cultural significant events or cultural specific.
- 12:30Yeah, yeah, nuances is a good way of putting that.
- 12:34And so as we're getting into this, there's a lot to think
- 12:37about, right? And, and what we started with in
- 12:40mind was question generation. So.
- 12:42So we're in that tech. We're trying to provide value
- 12:44for the teachers. They work in almost every
- 12:47country that I've ever heard of. They work of intense hours.
- 12:51They don't have enough time in the day to do what they need to
- 12:53do and they're getting burnt out.
- 12:56The students are affected by that burnout, the parents are
- 12:59affected, Everyone's affected by this.
- 13:01And, and so we focused on the teachers and, and that's a
- 13:03powerful way of, of approaching this.
- 13:06So with questions generation, how can we reduce the time that
- 13:09teachers take generating questions?
- 13:12And we started building agents to do this.
- 13:15And, and that was, that was really powerful because we're
- 13:18able to define the, the way that I would define this are these
- 13:23agents are almost like 3 year old consultants, if you will.
- 13:29So you, when you start, right? So you're, you're going to bring
- 13:32these into production, but you're essentially asking a
- 13:35three-year old to generate school questions for school
- 13:37teachers. And we know that's not going to
- 13:40feel what they need right now, right?
- 13:41Like we know this, but what it does is it enables us to start
- 13:45building out these domains of specialists.
- 13:48And, and this is where the interesting part comes in
- 13:50because it, it took us 7 hours to build something like this,
- 13:54right? Which in the past is something
- 13:56that's just unimaginable. We would have had to take 60
- 14:02days at least, right? Two weeks.
- 14:04Maybe it's, maybe it's eight months to do something like this
- 14:07or even something remotely close.
- 14:09But the dev cycle that has been reduced so drastically to get a
- 14:13proof of concept out so that now we're actually building
- 14:17independent services that other teams across our company can
- 14:21access and provide insights on. So we need other people, other
- 14:25teams across the company to help us.
- 14:28In the past, we've been the bottleneck, but now we're
- 14:31providing this opportunity for other teams to collaborate so
- 14:34closely with engineers that have never been able to in the past.
- 14:39And when you say other teams, you mean other engineering teams
- 14:44or anybody in any department can help other departments?
- 14:49And that's the key, right? Because we have all this
- 14:51knowledge, we can build this super quickly.
- 14:54You've seen a bunch of different Ed tech companies come out with
- 14:57like question generation or slide generation.
- 14:59But if you bring those to a teacher, all, at least from what
- 15:02I've heard, they're all going to say that they're really subpar
- 15:05for quality. Yeah, they generate lessons, but
- 15:08they don't actually, they don't meet any standards.
- 15:11They don't, they don't help you design a real lesson that you
- 15:15could immediately using your classroom.
- 15:17Why is that? Because engineers are building
- 15:20these. We don't, We're three-year old
- 15:22consultants ourselves. So now we're the three-year old
- 15:24consultants telling other 3 year old consultants what to do,
- 15:28right? And so we need to get those
- 15:30subject matter experts closer to the code, closer to the
- 15:33development cycle. And why do you say that you're
- 15:38using agents? Or why is this an agent problem
- 15:41as opposed to just like? Yeah.
- 15:44So as you think about this from a consultant perspective, right,
- 15:48you're building a very domain specific agent to define and
- 15:53handle a problem. So as we're going through this
- 15:56to give you, we have input out validation agent.
- 15:59So what that does is it it validates our input.
- 16:02We, you know, we have a lot of legislature that we need to
- 16:05handle, a lot of sensitive topics across the nation, across
- 16:09the international culture that we need to think about.
- 16:12And, and we don't want, because this is coming from our company,
- 16:16we do not want to give the stance on these, regardless of
- 16:20how we feel about that. We need legal, we need
- 16:23curriculum development, we need these other teams to be closer
- 16:26to us, right? For the actual question
- 16:28generation, that's its own domain where it's just
- 16:31generating questions. The entire purpose of this
- 16:33consultant is to generate questions for all of our
- 16:36teachers, right? And, and as you're thinking
- 16:38about, you're actually building again, these mini consultants,
- 16:43but you start to understand that these tasks need to be broken
- 16:47out because you can be it, you know, it's one of those idioms
- 16:51of the past. Are you a Jack of all trades and
- 16:53a master of none or you a master of one and, and you don't know
- 16:56the rest? And I totally botched that, but
- 16:59you get the point, right? And, and we don't want to build
- 17:01a Jack of all trades in a lot of cases.
- 17:04And so you're going to start to see these agents going through
- 17:07our system and, and so much so that now we're building an agent
- 17:10registry that's able to be seen and utilised throughout our
- 17:14system. That other engineers or whoever
- 17:18wants to can come and grab them off the shelf and say I'm going
- 17:21to put these 3 or 4 agents together to create my product.
- 17:25Exactly. Wow.
- 17:27And that's why you can empower the other departments.
- 17:31Yep, exactly, exactly. So let's say, you know, we have
- 17:3412 to 13 different teams across our company.
- 17:37Let's say one of the product engineering team says, oh, I
- 17:40need to go and build product product feature XYZ, right?
- 17:45Well, I want to use an agent for that.
- 17:47So what agents are available to me?
- 17:50What agents do I need to create? What agents, how do these agents
- 17:54interact? So to try to give us a very
- 17:56specific example, let's say that you want to tackle and I need to
- 18:00take this out of Med tech because I don't want to cross
- 18:02the line of sharing too much. Theoretically, if you were in a
- 18:06different business like e-commerce.
- 18:08Right, like e-commerce, exactly. So let's say that when you go
- 18:11into e-commerce and your goal for a product feature is to
- 18:16identify or is to get the right user, the right product in front
- 18:20of them, right. So you're going to think about
- 18:22agents to understand, OK, but what are the individual
- 18:25functions that need to happen and and how would I associate
- 18:29them on a larger scale, right? Do I need to have non
- 18:31deterministic orchestration? Can I actually use deterministic
- 18:34orchestration to find which steps of these processes need to
- 18:37happen? And so for the e-commerce
- 18:40example, you know, you're going to need to understand, has this
- 18:43user ever bought anything on your side?
- 18:45What are the typical products that they enjoy?
- 18:47Maybe you throw in a curve balls to do, you know, to spark
- 18:50interest in other areas. So you would have an agent just
- 18:53go through and understand like what are the interests of this
- 18:56user? And you'd have an agent to go in
- 18:58and understand what are the typical things we're selling
- 19:00today. And then you'd have an agent to
- 19:02kind of, you know, merge those two together to have this user
- 19:06profile that you're trying to generate.
- 19:08And then there's a lot of other things, whether you know, you
- 19:10can make input validation, you can make sure that you're not
- 19:13doing errors. But then this is where the data
- 19:15platform comes in because you can, again, you're sending data
- 19:18on the, on the front end. Well, what if you're collecting
- 19:21data from these agents and you're thinking, OK, so these
- 19:24agents are throwing errors, you know, 30% of the time, hopefully
- 19:28it's not that bad, but you know, an, an example.
- 19:30And then, but the agents are letting you have this success
- 19:35value of someone purchase something with a, you know, on
- 19:38our platform, on this e-commerce platform, you can start to
- 19:41identify which are working well and which aren't.
- 19:44And so as you're taking this through, you can get into the
- 19:47data platform, start processing this data.
- 19:50We could build a feedback loop to understand what can we
- 19:54update, where can we do this autonomously, where the agent is
- 19:57actually learning right now, if you're using Chachi BT or Open
- 20:01AI or something like that, you know they don't have the ability
- 20:06to. I can't think of the word right
- 20:08now, but where you bring data back in and let it learn itself.
- 20:12Like the retraining or the fine tuning?
- 20:17And so you can, but you can, you can customise that a little bit
- 20:19by using a rag and updating the data that you're passing it and
- 20:22what not. So like there's ways you can
- 20:24implement a feedback loop tying this whole system together.
- 20:28Yeah, it makes me think of this guy Tom that I was interviewing
- 20:32a while back and he's doing mix panel for voice agents.
- 20:38And so with voice agents, you can see it a little more clearly
- 20:42because you're on the phone, it's real time, you're talking
- 20:46to them. And if something goes the wrong
- 20:48way, you want to know about that.
- 20:51Or if there's an expected call duration and all of a sudden all
- 20:55of your calls are just taking 3 seconds when you think that they
- 20:58should take or the averages before this would take a minute
- 21:02or a minute and a half. You want to see that type of
- 21:04stuff. I hadn't thought about it with
- 21:08agents for what you're talking about, where you want this mix
- 21:11panel type of view to be able to understand where the agents are
- 21:17successful, where they're not successful in doing, in moving
- 21:24the needle on one of these metrics that's important for
- 21:28you. Yep, Yep.
- 21:29So you and and that's a power of agents, to be completely honest,
- 21:33because you can now have the department of of your analytics
- 21:38working on one agent building out what does it mean for these
- 21:41to be successful? You can have your product
- 21:44engineering teams that are working on implementing this
- 21:46exact agenic flow, right? And and then you have this idea
- 21:52of, well, why are we going to recreate the same agent in four
- 21:55or five different places, right? It it's sort of like object
- 21:59oriented programming in some cases because you have to come
- 22:01back to the fundamentals and understand how can we repurpose
- 22:05this and reuse this in another area?
- 22:07How can we understand what the breakdown is of the problem to
- 22:10pick apart? You know, the standard problems
- 22:13or maybe some of the more intricate problems that are very
- 22:17domain specific? And I guess when, when I think
- 22:22about agents, one thing that I think about is how they're able
- 22:25to take some kind of a question or some kind of a request or an
- 22:31instruction and then figure out out of all their possible
- 22:35actions that they can take. OK, I'm going to use this tool
- 22:39and I'm going to first of all, they have to understand that.
- 22:42And so they have to know, should I ask for more context?
- 22:45Should I really clarify what is wanted here, what the outcome
- 22:48they're trying to do is? And then cool, I can go and I
- 22:52can grab this tool. And I've heard it viewed my
- 22:54buddy Sam talked about how in every case that you can, you
- 23:00want to try and a narrow the scope of what you're trying to
- 23:03get the agent to do, but B narrow the scope of what the
- 23:07tool is doing. And so when the agent interacts
- 23:12with the tool, you want to narrow that scope 100 times at
- 23:18when possible. You want to narrow it as as much
- 23:21as possible because, and he gave me the example of if you are
- 23:27trying to have an agent write a sequel statement or if the agent
- 23:32just has hundreds of sequel statements it can choose from
- 23:37and it chooses the correct sequel statement because it
- 23:39knows what you're trying to do. Yeah, yeah.
- 23:44And that's, that's a powerful concept.
- 23:47There's a lot of implications that that you're bringing up.
- 23:52Yeah, let's go through them. Yeah, let's.
- 23:55One of the things that we're learning a lot about right now
- 23:58is what, how do you define the number of tokens and relate that
- 24:04to the cost and the time required to process this.
- 24:09And so as you have specialised agents, you're typically going
- 24:13to have less tokens and so they can run and get whatever they
- 24:17need much quicker from the LLM versus having highly
- 24:21specialised, highly defined agents that are going to take
- 24:24longer to process the information, understand
- 24:27everything that you know, all of the context and all of that.
- 24:32OK, so so you're saying that when it is super narrow and you
- 24:39have this scope that is smaller, you can not only save money, but
- 24:46it is it's more reliable? Exactly.
- 24:49And and that's that's when you start considering multi agent
- 24:53agent approaches, right. So when you're using agents and
- 24:56and we're using multiple agents for everything we do because it
- 25:01makes our processes easier to understand from the engineering
- 25:05and easier to adjust. So let me give you a breakdown
- 25:10for our time requirements for this project.
- 25:13So we noticed that it takes about 10 to 20% to actually
- 25:17build Apoc and get something available for end users.
- 25:20But assessing the quality and understanding how this works
- 25:24with other departments or diving into what we call false
- 25:27positives, which is where the agent is reacting in a way that
- 25:33believes it, it's doing something correctly.
- 25:35But it's not sort of like hallucinations in, in some
- 25:37capacity when you're trying to fine tune those with your prompt
- 25:42or with the code and, and there's a blend there.
- 25:44It takes ninety, 8090% of your time to, to debug that.
- 25:48And so now, now again, it's sort of flipped, right.
- 25:52So you need to be able to communicate exactly what's
- 25:55happening in in each agent, understand exactly what the task
- 25:59is to reduce communication channels between engineers, on
- 26:03the team, between departments in the company and and other areas
- 26:06of communication channels. So you are probably coming to a
- 26:12place where you've got thousands of agents that you're dealing
- 26:16with, or is it not that sprawled out?
- 26:18It is not anywhere near that right now, but we will.
- 26:21We will. OK.
- 26:23So that's then that's kind of like if you extrapolate this
- 26:26forward a few months or years, you expect that to happen.
- 26:32Yeah, yeah. And I mean, you've seen everyone
- 26:35from HubSpot to Salesforce to to Zuckerberg talking like there's
- 26:40going to be more agents than there are people.
- 26:42I mean, these agents could be apps, like mobile apps on your
- 26:46phone that you're seeing. You could think about that as
- 26:48the size of agents that I'm I could see in the future.
- 26:52I so I really like the idea of going into it and, and looking
- 26:58at agents as part of a DAG. And it's just like one more step
- 27:04in the DAG. And it just so happens that in
- 27:07this step it's a little non deterministic and we're giving
- 27:11it information from the other steps in the DAG.
- 27:15But it can, it can be that type of like visual representation in
- 27:22my mind. Do you tend to build them like
- 27:26that or do you look at it differently?
- 27:30Yeah. So that's a great question.
- 27:33And it can be a little complex to identify that at times.
- 27:36So I'm going to go with the base case and end and move up from
- 27:40there. So let's say, you know, you're
- 27:42building just a standard agent. That's that's a single agent.
- 27:48The flow in which this would go is, you know, you, you're coding
- 27:52and then you have one node in, in this DAG that you're calling
- 27:55and it's going to give you some sort of response, right?
- 27:58However, you're intending, if we go to the e-commerce, it's going
- 28:00to say, oh, these are the user interests, right, if you will.
- 28:04And so it's going to be able to identify those.
- 28:08Then if you scale that up and you start to say, OK, we want to
- 28:10add more to this to understand well, what what is the business
- 28:14interested in selling today, right?
- 28:16Because there's going to be different valuations on all of
- 28:18your products, different margins, etcetera.
- 28:20So then it's going to the next step is saying, OK, instead of
- 28:24just calling this user interest agent, we're also going to call
- 28:29this next, this other step, this other tool, which is identifying
- 28:34business needs. And so you actually almost have
- 28:36to build a third node which is orchestrating this, right.
- 28:40And that's where this non deterministic orchestration
- 28:42comes into play. And it, and it becomes
- 28:44fascinating because you can now say, OK, I want you to bring
- 28:47both of these tools into the play based on what you, you were
- 28:52saying, right? You can either choose to bring
- 28:54one or none or two or whatever. And so it comes in, it causes
- 28:58those tools as it sees fit and condenses the information and
- 29:02that sort of, you know, your high level non deterministic
- 29:05orchestration. But let's say that it's not
- 29:08really producing quality results, right?
- 29:10So there's non deterministic orchestration is giving you some
- 29:14sort of summary, but it's not actionable.
- 29:16What are you going to do? Well, let's add another agent,
- 29:19right? And so you start to have this
- 29:21third node that is on the same tier in this DAC, right?
- 29:25Because really you're just calling and receiving responses.
- 29:28And so you're getting this processing this information from
- 29:31the 1st 2:00 and then you're gonna send it to so this next,
- 29:35this next node. So rather than saying same to
- 29:37your, let's say the, you know, the DAG is those first three are
- 29:41in one. And then you gather all this
- 29:42information, pass it to your analytics or, or whatever it is
- 29:46your summarizer, if you will. I don't know what to call here
- 29:48because I'm not familiar with e-commerce, but you get my gist.
- 29:51And so you pass it to this next node.
- 29:53And then that summarises and and coordinates a quality response.
- 29:57But then let's say that you actually want this to be
- 30:00flexible based on current events.
- 30:02So then you can make that a non deterministic agent.
- 30:04So now you're going to have this DAG that just has a bunch of non
- 30:08deterministic agents that are going and going and going.
- 30:11And they all have separate use cases or separate it's, it's
- 30:15almost like you're giving the agents more features and it
- 30:19you're enriching the agent with all of these different steps in
- 30:22the DAG. Exactly.
- 30:25Yeah, that's fascinating. How are you looking at costs?
- 30:29Because I know that you you kind of mentioned that before.
- 30:32Yeah, yeah. So the this is a fun way.
- 30:37So with our agents, we have, we have built a custom evals
- 30:41framework. So we based it off open AI, but
- 30:44we had to bring the evals to our engineers.
- 30:46We're a platform team. So our goal is to make the
- 30:48engineers more productive, right?
- 30:50So they're currently working in either Python or TypeScript.
- 30:54And Python for a feature engineers is pretty easy, right?
- 30:57You just have that basic open AI model.
- 31:00But for TypeScript, nothing existed out in the real world.
- 31:03And so we built our own custom evals framework that can dive in
- 31:07and handle this. And within that, we we've hooked
- 31:10this up to CICD for confidence and different levers and we're
- 31:14able to assess how much each of these agents are costing us
- 31:19based off our evals and create an approximation for how much
- 31:23it's going to cost us in production based on usage and
- 31:25other metrics we're looking at. Whoa.
- 31:28And how, how did you do that? Because that's fascinating.
- 31:33I don't even know where you would start with that, trying to
- 31:35think like, how did you even break that down?
- 31:37And Oh my God. Yeah, yeah.
- 31:39So we're able to utilise I'm I'm drawing a fine line between what
- 31:47I'm allowed to share and what I'm not, right?
- 31:49So. We, we have internal logistics
- 31:51that are able to define and, and, and measure cost usage with
- 31:56the LOM and identify what we're able to use, how we're able to
- 32:00use it within, you know, what our internal logic associate
- 32:05that with real monetary values that we've assessed that are
- 32:08like very, very close to the real world.
- 32:11And then we have all of our measuring and monitoring data
- 32:14within any, you know, any telemetry that you, that you're
- 32:18using to assess, OK, well, how many total users are we
- 32:21expecting to use this and associate those, those numbers
- 32:25with the actual calls that we're making?
- 32:28And what we found out is with agents not only and especially
- 32:33using non deterministic for any, you know, any reiteration or
- 32:37any, you know, look backs or reflection that you're using,
- 32:41we're able to identify that we're getting really accurate
- 32:44results to the tune of 98 to 100% accuracy in our evals for a
- 32:50lower cost because we're able to use better like cheaper models
- 32:54and whatnot. And why do you think that is?
- 32:59Because you're passing in more context, You're giving it better
- 33:03information. What is the?
- 33:07It's half, it's half prompt engineering and half software
- 33:10engineering at the end of the day.
- 33:12And so we need to identify how we can reduce our token size,
- 33:16how we can reduce the number of calls.
- 33:18And you're stuck in this optimization loop, you're never
- 33:22going to have it perfect, right. But we have a tonne of
- 33:25optimization nerds on our team that are really focused on, OK,
- 33:30what is the cost and and what is the quality and how do we
- 33:33optimise for those. And when they're looking at the
- 33:37cost, it's like, could we get rid of this sentence in the
- 33:42prompt because that means that less input tokens.
- 33:45And when you times the number of prompts that we're going to be
- 33:51using with this agent and all of the folks that are going to be
- 33:54using this agent out in the real world, that starts to add up.
- 33:58Exactly. And if you think about this from
- 34:00from bringing this full circle, if you think about this from the
- 34:04perspective of consultants, maybe you ask them to do less in
- 34:09some cases, right, which has less time and money associated
- 34:13with them. But then it on other times you
- 34:15say, OK, well, we've kind of completed this task and we don't
- 34:19really need that agent anymore. We don't need that consultant
- 34:21anymore because we're doing something different.
- 34:24And and with that, I think that's powerful because you can
- 34:27consider these because they're so easy to spin up the dev time
- 34:32associated with that enables us to remove things much quicker
- 34:35and say, OK, look, you spent two hours on this, I'm sorry, but
- 34:38like this is no longer going to be used.
- 34:40And and that's a much easier conversation with an engineer
- 34:44compared to spending six months 12.
- 34:46Months. Iterating over years to, you
- 34:49know, remove a project from from what they've been doing.
- 34:52Yeah, you're much less POC committed.
- 34:54It's been whatever a couple hours that you put it together.
- 34:59And when you talk about the marketplace too, I can envision
- 35:04that you have the price tags there also, like this one.
- 35:09If you use this agent, expect for it to cost X amount.
- 35:12And if you're using all of these agents together, maybe it does a
- 35:16little fancy math and it adds all of the price of all of the
- 35:20different agents that you plan to be using in production.
- 35:24And so you can get a estimate of all right, cool.
- 35:27Well, this agent's probably going to cost us X amount of
- 35:31money. Are we OK with that?
- 35:34Can we make that back? And, and does anyone have the
- 35:38ability to just launch something into production?
- 35:40How does it go from me in some random department?
- 35:46I now want to create my agent and I throw a few of these
- 35:51different small agents together and I say, cool, I think I've
- 35:54got it, let's launch it. And then what?
- 35:59How do I launch it? Like how do I go from that?
- 36:02I've got something to production.
- 36:05That's such a great, great question.
- 36:07So organisation dynamics are going to change.
- 36:11And this is one of the craziest realisations I've had over the
- 36:15past couple months. And coming back to, to something
- 36:19we talked about earlier it and I don't remember if we were
- 36:22recording or not. So, but but in essence, we have
- 36:27to bring the departments closer, right?
- 36:29So when you have this product feature, it's no longer people
- 36:34sitting in a closed room figuring out what the user
- 36:36needs. And you know, you have two, two
- 36:39people ID ideating on this and then they send it to the
- 36:43engineers and the engineers say what they can and cannot do and
- 36:46give you a time assessment. Yes, that's so going to be a
- 36:49factor. But the speed of determining
- 36:52that and enabling the actual like POC or MVP is so much
- 36:58shorter. And that is the wild part about
- 37:01this because you can now say, OK, you know, if it takes 7
- 37:05hours to build this, we can give you Apoc to see are we meeting
- 37:08the users demands based on your department's vision of this in
- 37:12the past? You know, even though we're
- 37:15iterating quickly, we're, you know, we're, we're using CICD,
- 37:19so we're updating production, but it's with very small pieces
- 37:23of the puzzle in this, you almost take a whole puzzle and
- 37:27give it back to, to the other department and say, hey, look
- 37:30over this. What are we missing here?
- 37:32I'm a three-year old, remember? So like what did I not
- 37:35understand from this language gap that we have at, at this
- 37:38point in time? And then they can give you
- 37:40actionable feedback on where you need to focus your time as an
- 37:43engineer. And, and but that's bringing for
- 37:45edtech, that's bringing the curriculum development in,
- 37:47that's bringing sales in, that's bringing marketing in.
- 37:50You're bringing in these other departments to such a closer
- 37:53collaboration that we've ever seen.
- 37:55But this is for net new products, right?
- 37:59Or do you still feel like there's going to be that
- 38:02capability with the gigantic code base and the monolith that
- 38:07you go back and you say, well, we want this feature, OK, if
- 38:11it's net new agent, I can create in a few hours.
- 38:15If it's I got to go dig through what Johnny did two years ago,
- 38:19it's going to take me a few months.
- 38:21Yeah. And it, and that's a great
- 38:23question. And as every software engineer
- 38:29will say, it depends, right, because there's a lot of, of
- 38:33contacts that engineers have and will need to continue have for
- 38:36the monolith and and for other areas of your application.
- 38:40But, but I think what we'll start to see is that there's
- 38:43going to be ways to deprecate old code bases or code bases
- 38:47that have been maybe some of the more technically challenging
- 38:54areas of your code base. And they can be updated with
- 38:56agents to to solve the same concerns that we've seen in the
- 39:00past. Wow, that's fascinating to think
- 39:04about. Because at the end of the day,
- 39:05you don't. The bottom line is the end user
- 39:08just wants the hole in the wall. They don't want the drill.
- 39:13They don't care if it's a hammer that's doing it.
- 39:15They want the hole in the wall. And so if you're giving it to
- 39:17them with agents and it's actually a much better
- 39:20experience and on your side of things, the back end is much
- 39:25less complicated and easier to spin up and get validation from
- 39:30quicker than it feels like a win win.
- 39:33It also feels just intuitively very scary because you're for
- 39:40you too, right? OK, it's not just me.
- 39:43Yeah. So coming back to how do we get
- 39:45this into production because I, I never really answered that.
- 39:47I just got excited by the first part of this organisational
- 39:50dynamics. So what we will start to see is
- 39:55that it is a very scary thing to release the first LLMAI non
- 40:02deterministic software development cycle.
- 40:06It's very, very tough to do that and.
- 40:10We took an approach where our evals were the single truth to
- 40:15our system. We have thousands of evals that
- 40:18are very similar in, you know, in TDD you think about those as
- 40:21tests, right? We're generating like user
- 40:25prompts, not from production, but we're generating user
- 40:28prompts that we would foresee to happen in production.
- 40:31And these prompts are being added to our evals to assess
- 40:35what are the boundaries in which we are seeing.
- 40:37How are these boundaries assessed by our LLM for US
- 40:41sensitive topics or something we have to be very careful about.
- 40:44Legislation differs across the world, so we have to consider
- 40:47very different legislative requirements across the world.
- 40:52And when we're doing that, we had to build our evals.
- 40:56So we have this product team coming with this product goal
- 40:59based on the users, we identify the product design sprints that
- 41:03you'll need with the relevant departments and the engineers.
- 41:06And now we're building out evals.
- 41:07Now the interesting part about this is the engineers in some
- 41:11companies are so far removed from what the end user does or
- 41:14actually inputs into the system. And so this collaboration loop
- 41:18is just tightening every step of the way.
- 41:22So you're building out these evals with our CICD pipelines,
- 41:25we're able to get thousands of evals for each agent to run with
- 41:30confidence levels of getting the right result 98 to 100% of the
- 41:34time. When you have that confidence
- 41:38with testing in the past, right, where you're testing
- 41:41deterministic functions, you feel that you're going to
- 41:45release reliable work, right? With this, there's always going
- 41:49to be a notion of, but what if, right?
- 41:52Because it's not deterministic. What if it goes Air Canada on
- 41:55us? What happened to this?
- 41:57Yeah, and. And that's always going to be
- 42:00there as non deterministic by nature.
- 42:02Like you have to accept that. And and so partly it's about
- 42:06accepting higher risks with with production deployments.
- 42:09But as we're going through this and deploying this, I mean,
- 42:13really all we're doing is setting different environment
- 42:15variables. You're releasing this non
- 42:16deterministic agent just as you would in every single other
- 42:20production deploy. Your risk just is increased.
- 42:25And where are some other areas? Because it feels like you could
- 42:29take what you are doing right now at your company and
- 42:35replicate that with different companies or use cases.
- 42:41What are some? I'm sure you've thought about it
- 42:43like I bet this would be a good remedy for these problems too.
- 42:49What are some other areas that you feel like that could be
- 42:52useful here? That's such a great question.
- 42:57A lot of it depends on the data available, right?
- 43:00So to and again, this comes down to quality and, and to assess
- 43:04quality, you have to have a notion of what is good versus
- 43:09what is bad. So I've worked in a few
- 43:13different areas, but I focused on Ed tech.
- 43:15So my my main understanding is Ed Tech, but I'm a massive fan
- 43:22of fantasy football and other areas like that.
- 43:24Right? So.
- 43:26So let's consider fantasy football as as.
- 43:28American football or you say football like.
- 43:32Yeah, so both. I grew up playing soccer in
- 43:35America, but football across the world.
- 43:37Massive Arsenal fan. So I have a huge love for
- 43:40football from the from outside of America, but also all of my
- 43:44friends really only know American football.
- 43:46So I have to stay true to what I know and what my friends know.
- 43:50So we're going to consider American football here.
- 43:53But you can consider, you know, injury analysis.
- 43:57That's something you could have an agent for, where you're
- 44:00thinking about, OK, is this player going to play?
- 44:02How long is this player out for? You can think about, you know,
- 44:06you can consider the team's strength of schedule for the
- 44:10rest of the season and identify who are the trade targets for
- 44:13your for your that you want to focus on, right?
- 44:16And I think that applies generally across many different
- 44:18sports. But there's a lot of ways you
- 44:21can implement agents to that degree.
- 44:23The only thing that matters is where's the data and who has the
- 44:26data. And that's really, really tough
- 44:28to find in in the fantasy football world because everyone
- 44:32is already price gouging it. Really as far as data goes, like
- 44:37to get data on all of that? Yeah, for back testing and other
- 44:41purposes, right? Like it's really hard to get
- 44:44data and quality data across many different systems to enable
- 44:49you to have back testing and future predictions of how it
- 44:52will perform. But let's say you go into the
- 44:55health, you know, the health space, you have a lot of HIPAA
- 44:58rules, so you have to be careful about that.
- 45:01But there's ways that ways that you can aggregate the data
- 45:04within there to identify. You don't have an agent that's
- 45:07able to identify something as simple as if we take the Silicon
- 45:12Valley hot dog, not hot dog. If you've ever seen that show,
- 45:15you could take this into like serious, not serious issue,
- 45:18right? And help them identify where
- 45:21they are in in various elements of the space.
- 45:25Yeah. I was thinking about for
- 45:27government contracts and agents that can help you identify what
- 45:32government contracts or or at least help you fill out the
- 45:37proposal as much as possible. Yeah.
- 45:42Now one thing that I was thinking about back to that
- 45:45football example, the fantasy football example is what in your
- 45:50mind makes this an agent need versus a traditional ML need?
- 45:59That's a great question. So I don't think those are
- 46:03mutually exclusive. I've been looking at a lot of,
- 46:08you know, easy to define agent videos across YouTube and other
- 46:14things because I've been I've been basically giving this spiel
- 46:17to other departments across my company.
- 46:19So I'm trying the best way to be less technical.
- 46:21So the way I would define this is that ML or LLMS, any models,
- 46:27right, whether it's LLM or traditional AIML models are the
- 46:31brain power. They, they can do very specific
- 46:34tasks. Agents are what are able to
- 46:37perform the job for you with that brain power.
- 46:40So it's about it. It's less about LLMS and the
- 46:44integration with agents and more about giving, enabling a model
- 46:49to perform a task. And that was a wild piece that I
- 46:53noticed.