Latest / Agentic Conversations (formally mlops.community) / LLM Search, UI/UX challenges, Context Engineering and the 80/20 of Eval
Transcript
- 0:00People talk a lot about system prompt, tweaking the prompt or
- 0:05choosing different model. What's the best model out there?
- 0:07One of our hard earned lessons is I spent so much time on
- 0:09context engineering with the teams.
- 0:11Let me explain what context means, right?
- 0:18So in my role, I build AI agents in these different industries
- 0:21and these agents are kind of used by 2 billion customers
- 0:24around the world. Talk to me about what agents
- 0:27you've been building. So in general, there are two
- 0:29classes of agents that I've been working on.
- 0:30One is agents for productivity. So internally we built a tool
- 0:34called Tokan, you know about it. This tool is used by 15,000
- 0:38users internally at process. And these are people from
- 0:41finance and designers, product managers, engineers and people
- 0:45use it for different things. So we started building this tool
- 0:48three years back. The technology has evolved so
- 0:50much. Initially we did a lot of things
- 0:53to make the LLM work so that you know, there was an intent
- 0:56detection at the beginning and so on.
- 0:57It blows my mind that you know, now you don't need like the
- 1:00model itself is so better that you don't need these things.
- 1:03So sorry. SO11 category is tools for
- 1:07agents for productivity. So Tokan second is agents for
- 1:10e-commerce and there I have experience in building agents
- 1:14for online shopping assistant. So OLX is one of our portfolio
- 1:18companies. So with OLX we built a shopping
- 1:21assistant. The idea is that it helps
- 1:23understand the user intent. So you can say that you know, I
- 1:26want the latest headphone or you know, I, I'm going for a hiking
- 1:30trip and I don't know what to buy help me.
- 1:33So it can take very broad request from the user
- 1:35understand, connect to the OLX catalog.
- 1:38So that's an example. And currently I'm working on a
- 1:41project with in a food delivery business where we are kind of
- 1:45reimagining how people would order food in next year or two
- 1:50years where, you know, things like not so usually if you think
- 1:56about how people order food right now, they go on the search
- 1:59bar, you enter burger, right? But how about it also, You know,
- 2:03you can go and you can say that, you know, I want to have a
- 2:06romantic dinner with my wife. And then it understands you, it
- 2:09connects to the catalog and so on.
- 2:10OK, so we've got 4 themes that we want to touch on.
- 2:14Yeah. First one, which is on
- 2:17everyone's mind, is the context engineering piece.
- 2:19You've got some takes on that, yeah.
- 2:21Totally. So Andre Kapati recently
- 2:23published a tweet where he said that he likes the word context
- 2:26engineering more than prompt engineering.
- 2:28And you know, I was reading it and in my experience in building
- 2:30these agents, I spent so much time together with the
- 2:33engineering teams working on the context.
- 2:35So I was completely, as soon as the moment you published the
- 2:38post, I think the context engineering word got viral.
- 2:43And when I think about context engineering, it reminds me of
- 2:45the day with, you know, when you know, data engineering, data
- 2:48scientist, you know, I was a hands on data scientist at some
- 2:51point in my career. And you know, we always said
- 2:53that, you know, data science or AI is the shiny thing, but you
- 2:58know, if you're garbage in, garbage out, if you don't work
- 3:00on your data context engineering for me is like that.
- 3:03We are doing a podcast, I see people talking on Twitter on
- 3:05different podcasts and people talk a lot about system prompt,
- 3:10tweaking the prompt or choosing different model, what's the best
- 3:13model out there recently about MCP tools and so on.
- 3:17But for example, you know, if you think about the latest
- 3:19models, if you think about the latest models, for my use case,
- 3:22it's not, it's not really about that model.
- 3:24If I use model A versus model B, and if both of them are
- 3:26state-of-the-art, they already do a good job.
- 3:29What makes the difference between A&B is A is with
- 3:33context, B is without context, then A would be much better than
- 3:37B. And let me explain what context
- 3:39means, right? So a lot of times.
- 3:41So imagine a food delivery chat bot.
- 3:44Aside from people asking for food, when you put a chat bot in
- 3:48wild, people ask about many different things, right?
- 3:52Imagine you know you want to order food.
- 3:54Free food. That's what I would instantly
- 3:56do. Exactly.
- 3:56Exactly. So people care, different people
- 3:58care about different things. So there are people who care a
- 4:00lot about free food, cheap food, promotions.
- 4:03There are people who care about maybe you have a particular
- 4:05coupon or your payment card. So a lot of time people come to
- 4:09a chat bot, they say that, OK, do you accept this payment card?
- 4:12Show me, show me sushi on promotions right now.
- 4:16Or maybe it's lunchtime and or maybe it's breakfast time and I
- 4:22am asking for pizza and none of the pizza places are open.
- 4:25And you know, you don't know about my use case as a user.
- 4:27Maybe I'm someone I'm an executive assistant, I'm
- 4:30planning already for lunch or maybe I want to have pizza.
- 4:34So in this case, for example, the opening and closing hour of
- 4:36a restaurant becomes the context.
- 4:39So if your LLM or if your agent doesn't know about that, then
- 4:43you know, we have tried this before where if your LL, if your
- 4:46agent is just good at searching for for pizza and it doesn't
- 4:50know about the opening closing hour, it doesn't know about the
- 4:52promotion, it doesn't know about the payment information.
- 4:56If you put it in real world, it's not useful for people
- 4:59because you know, I care about a lot of these things.
- 5:01Users care about a lot of these things.
- 5:03So one of our hard earned lessons is I spent so much time
- 5:06on context engineering with the team.
- 5:08So you know, I cannot stop talking about.
- 5:10Yeah. And I don't want to brush over,
- 5:11there's a few different places where it's a very difficult
- 5:15problem that you were just saying when it comes to ordering
- 5:19the food and the promotions, for example.
- 5:23And you were saying that it's not like there's a database that
- 5:26you can query that has all the most up to date promotions.
- 5:31Yeah. So the data challenge in real
- 5:35time, knowing what promotions are live from what companies and
- 5:40then feeding that into the context window is where the real
- 5:43challenges. And it's almost, I look at it a
- 5:45little bit like when you're crafting that prompt you put in
- 5:50variables and getting the proper data into those variables is the
- 5:57unsexy job of the data engineer. Or it's, it's more data
- 6:00engineering like than anything. But now I guess we're calling it
- 6:04context engineering. I think we all agree that, you
- 6:07know, most of the enterprise data, you know, it might look
- 6:09good from outside, but it's messy.
- 6:11So unfortunately, you know, if you go in an enterprise, it's
- 6:15it's, it's not like there's a database where you can say just
- 6:17just give me all everything on promotion.
- 6:19So a lot of data is real time. Maybe a restaurant is running a
- 6:22real time promotion during lunch from 12:00 to 3:00 on sushi,
- 6:25right? It's very difficult for a
- 6:27database to have that. So a lot of that information is
- 6:29in real time databases. It's scattered over different
- 6:32databases. So the the unsexy work here is
- 6:36that, you know, I have data engineers in the team, engineers
- 6:38in the team who spend a lot of time kind of connecting all
- 6:40this. So imagine now a user request
- 6:43comes in and they say show me sushi on promotion.
- 6:47You kick in these data pipelines, you bring the right
- 6:50context, you make it a part of the prompt, and then the
- 6:53response that you get is what the response that the user wants
- 6:56to. And there's not a way to do this
- 6:59with search that is more simple. No.
- 7:03So search is the next topic I want to talk about, but search
- 7:05solves a different problem. Search is more about, for me,
- 7:09search is about when you're when you're searching for dishes or
- 7:12when you're searching for restaurants.
- 7:14That's what that's a burger, vegetarian burger, pizza or
- 7:17McDonald's. But when you're searching for
- 7:19does McDonald's have promotion? Does McDonald's accept payment
- 7:24card? Does McDonald?
- 7:25Is McDonald open right now? That is context.
- 7:28So that's the difference for me between search and context.
- 7:31Context is made-up of four things in my opinions.
- 7:34I spoke about one of them. There's another ones which I
- 7:37want to cover. One of them being The Dirty
- 7:39data. Getting it the right context
- 7:41when? Yeah.
- 7:42It's composed of four things. Two of them are simple.
- 7:44Everyone talks about IT system prompt user message and I think
- 7:48we have heard enough about, you know, you need to have the best
- 7:50system prompt user messages, the dynamic message the user sends.
- 7:54So you put that in the prompt as well.
- 7:57We spoke already spoke about, you know, bringing the
- 7:59enterprise context, The Dirty data pipeline.
- 8:02And the 4th context, which is very important is the user
- 8:04history. And this is where, for example,
- 8:07it's connected to memory. So, you know, there's been a lot
- 8:09of discussion on long term memory, short term memory.
- 8:13The way I think about is there are so many Jenny I agents
- 8:18products out there. Imagine you know, everyone is
- 8:20building a shopping assistant, everyone is building a food
- 8:22ordering assistant. If even I think about me as a
- 8:26user, I don't have an A loyalty for a particular product.
- 8:29I'm using ChatGPT today. I'm using another product next
- 8:32day. For me, something that creates
- 8:35stickiness to a product is if that product knows about me.
- 8:39So if I'm using ChatGPT as an example for last 15 days and now
- 8:44you give me a new tool, I would use it unless ChatGPT knows so
- 8:48much about me that OK, I the switching cost is high.
- 8:51Yeah, the switching cost is high.
- 8:53And that comes from memory. And that is also part of context
- 8:56where you put the user history as part of context.
- 9:00Yes, it's funny you mention that because somebody said when they
- 9:02were joining the community, they were very interested in the
- 9:05problem set of being able to port that memory and that
- 9:10context from one provider to the next.
- 9:12Yeah. That's amazing.
- 9:15If you do that, then then you could switch, right?
- 9:17Because if you do that but. It's not like you can just hit
- 9:20like download CSV and then upload it to the next.
- 9:23Provider, I think there's a lot of data privacy issue with comes
- 9:26with that because it contains a lot of information about you
- 9:29which you might want to share or not.
- 9:33And again, one last point there is, so I'm sure you've seen
- 9:38these diagrams that people share about memory, long term memory,
- 9:41short term memory, you know, episodic memory and so on.
- 9:44So memory can be handled in many different ways.
- 9:46It's almost like, you know, when you're having a conversation,
- 9:50maybe there's a model which is running behind the scene, it's
- 9:52noting facts and that's a part of memory.
- 9:55But to be honest, one of the things that we tried, which is
- 9:57much simpler than any of this and it works, is let's say
- 10:01you're building a shopping assistant or a food ordering
- 10:03board and you already have a product, right?
- 10:06So there's already OLX or ifood. So there's already users who are
- 10:13on OLX who did not have conversation yet who are on I
- 10:16Food. You've got that data.
- 10:18You got the data, you already know what food they ordered, you
- 10:22already know what items they browsed.
- 10:25You can easily use that as a simple cold start context.
- 10:31And I have seen that create wonders where you know when you
- 10:35launch your product. You don't need to be you know.
- 10:37My advice here would be when you launch your product, because
- 10:40there's already so many things to solve and you know, your
- 10:42obsession should be about product market fit and, you
- 10:44know, not having the best technical solution out there.
- 10:47You should just use the context that you have from your existing
- 10:50app and put that in the memory. Put that in, you know, the
- 10:53context of the system prompt. And that already does wonder
- 10:57that will give you a runtime of three months.
- 10:59And then you start, you know, when people start having
- 11:02conversation more, they start using your product more than you
- 11:06get some dynamic memory. But I think that's one of the
- 11:09lesson that I've learnt where I think the way people think about
- 11:12it already from day one, it's complicated.
- 11:15There's a simple solution for to cold start.
- 11:18OK, so that is context engineering.
- 11:20Yeah, that is context engineering.
- 11:22That's it. Search, search, search is such
- 11:27a, you know, so my experience has been building AI agents in
- 11:32e-commerce shopping, food and search is a fundamental tool
- 11:38when it comes to that. It doesn't apply for all the AI
- 11:41agents out there. Let's say if you're building an
- 11:43AI agent for supplier side, you know, for, for a car dealer or
- 11:48you know, for a restaurant, search is not that important.
- 11:51But when you're building an an e-commerce agent, search is the
- 11:54most fundamental thing. It's actually the start of the
- 11:56user journey. If you don't get the search
- 11:58right, Let's say if I search for burger and if I get the pizza,
- 12:03my eye drop at that point, you know, it breaks the trust.
- 12:06I will maybe you have other tools to manage my cart, you to
- 12:09do other things, but I will never go further in the journey.
- 12:11So search is very important and I spend a lot of time with the
- 12:15engineering team on, you know, fixing search.
- 12:20Let me talk about few things that you know, maybe we've
- 12:23learnt. So most of the enterprise search
- 12:25is still keyword based and you know not to put it down, it's
- 12:29for the right reason because keyword based works.
- 12:32If I say burger, there's a taxonomy defined for burger and
- 12:36you know, show me burger, you don't need fancy semantic search
- 12:40to do that. So keyword based works.
- 12:43But if you imagine people searching on a search bar versus
- 12:48people talking to an agent, the chat bot you put out there, the
- 12:51kind of conversation and especially when you have voice
- 12:53enabled, the way people express themselves to an agent, to a
- 12:57chat bot is so different. The kind of queries are so
- 12:59different. I would go and I would say that,
- 13:01you know, I already give these examples, right?
- 13:03You know, I want to have a romantic dinner with my wife,
- 13:05press enter, very, very broad. Or if I'm building a shopping
- 13:09assistant, we have seen people just go and say that I'm going
- 13:12for a hiking trip. I'm a beginner.
- 13:14I don't know what to buy, help me or help me furnish my house.
- 13:18These are the kind of queries that you get and you cannot
- 13:22deliver these queries with keyword search.
- 13:25So we spend a lot of time thinking about first semantic
- 13:28search. And semantic search is not new.
- 13:30It has been around. It's a search based on
- 13:32embeddings. So you, you know, you know for
- 13:35the search engineers out there. So you there are, there are
- 13:38already standard way of doing these things.
- 13:39Semantic search is hard. It's still hard to crack and
- 13:43keyword search is still important.
- 13:45So most of the time the solution is something hybrid where you
- 13:48know, you get a query, you look if a keyword search can answer,
- 13:51can answer it. If not, you go to semantic
- 13:53search. So it's not new, but it's
- 13:56difficult and we spend a lot of time talking about it.
- 13:59So let me explain that with an example.
- 14:02When I say so, I'm vegetarian. When I say vegetarian pizza, if
- 14:06I have keyword search, then I would get items that have
- 14:10vegetarian pizza mentioned either in their title or
- 14:12description. But pizza Margherita that's
- 14:15vegetarian. Maybe you know, it's not obvious
- 14:18to mention vegetarian in the title of pizza.
- 14:20Maybe the the restaurant person did not mention it.
- 14:22And then all of a sudden pizza Margarita will not.
- 14:25So this is keyword search. This is the limitation of
- 14:27keywords. Now let's say you move to
- 14:28semantic search. This can be solved with semantic
- 14:31search because then you have embeddings and then pizza
- 14:33Margarita embedding is very close to the embedding of
- 14:36vegetarian. It's solved.
- 14:38Now let's say, come to the example that I say romantic
- 14:41dinner, that itself, that cannot be solved.
- 14:44So romantic, you know, what is the embedding for romantic?
- 14:47Romantic is different for you, Romantic is different for me.
- 14:49That cannot be solved by semantic.
- 14:51And we see a lot of these queries which are broad, which
- 14:54are ambiguous, very fuzzy. So this is where again, you
- 14:59know, semantic search is the first layer.
- 15:01But we spend a lot of time building a pipeline of search
- 15:04where when these queries come in, you have a step before
- 15:09search and you have a step after search.
- 15:11The step before search, we call it query understanding, query
- 15:14personalisation, query expansion, call it whatever,
- 15:17where again, you use an LLM. So you already have an LLM for
- 15:20the agent. But let's say now you have
- 15:21search as one of the tools. Within that tool you have a
- 15:24pipeline where the first step of the pipeline is already using an
- 15:27LLM to understand the query. So Romantic dinner, it
- 15:30understands. And maybe if it has my user
- 15:32profile, it says that this is what romantic means for Nishi or
- 15:35Romantic in general. And LLM says that, OK, let's
- 15:37break it down into, I don't know, cupcake is romantic and so
- 15:42on. Candle it.
- 15:43Yeah. Come on, cupcake.
- 15:46What kind of romance are? You talking about we have
- 15:49different definitions of romance apparently.
- 15:54I mean. Out of all the ways that I would
- 15:58describe romantic dinner, Cupcake was not one of them.
- 16:02I hope my wife is not listening to this, but yeah, guilty as
- 16:05charged. So anyway, yeah, so there's a
- 16:09query, there's a query understanding step which breaks
- 16:12down your query, maybe into multiple queries.
- 16:15Then you run it through your search pipeline, keyword search,
- 16:17semantic search. Then there's a re ranking step
- 16:21where again you use an LLM where you know, initially you get a
- 16:25lot of candidates. Then this is, you know, re
- 16:28ranking is again re ranking is an old concept from the machine
- 16:31learning world where we had these algorithms, LTR learning
- 16:34to rank and so on. But in the new world of LLM.
- 16:38So those algorithms are still important, but they also in my
- 16:44experience, I've seen them fail when it comes to these new kind
- 16:46of queries where you have a lot of context from the user.
- 16:49And there you, you can have another re ranking layer where
- 16:52you again, you use an LLM. You say that, OK, this was the
- 16:54query from the user. These are the 1000 responses
- 16:57from the 1st 2 steps. This is the context about the
- 16:59user re rank. You know what is and then you
- 17:02get these three or these ten options that you present to the
- 17:05user. So that's what our typical
- 17:07pipeline looks like. And you know, again, I can can't
- 17:10stress it enough. It sounds simple, but search is
- 17:13something that has, you know, haunted me in each of my
- 17:15projects. It's difficult, it's difficult,
- 17:18it's messy. It feels like a new paradigm of
- 17:20search too, or just like a building on what was already
- 17:24there and trying to leverage the new technology of.
- 17:28LLMS yeah, totally, totally. Now with the all the
- 17:32advancements in LLM generative AI agents like agentic search
- 17:37and LLM helping in search and LLM augmenting search.
- 17:41So you're not not replacing, but semantic search is still
- 17:43important, but you know, doing some steps things before things
- 17:46after. So that's the new paradigm.
- 17:48And so you're right, like search is really being reinvented with
- 17:53LLMS. And I think, I think very few people talk about it.
- 17:57But if you're building an e-commerce agent, search is
- 17:59fundamental and it's very important to crack that.
- 18:02Yeah, let's talk to UI. Let's talk UI first.
- 18:07Let's talk UI. Let's talk UI.
- 18:08OK, so again, I have launched many agents, many Gen.
- 18:13EI experiences and typically the way we launch them is we AB test
- 18:19and I have burned my hands so many times.
- 18:23You know, it's again, it's it's there's a lot of pain there that
- 18:26I'll give you an example. You know, we want to build
- 18:28online shopping assistant. The first thing we do is, you
- 18:31know, let's build a ChatGPT for everything, right?
- 18:34So let's build a conversational experience.
- 18:36We build that. We test it internally.
- 18:40I tested it. I spent a lot of time, you know,
- 18:42long hours at night. It's super interesting.
- 18:44It knows you, it's connected to the catalog.
- 18:46You can you say that you know I want to furnish my house it
- 18:49shows you furniture it shows you you know the chair so far
- 18:52separate sections and so on it's beautiful it works you're so
- 18:55excited that you're. Also so benevolent when you're
- 18:57using it right, You, you aren't thinking like, how can I prompt
- 19:01this to give me free furniture? You're thinking, how can I
- 19:03prompt this to get the right furniture.
- 19:05You also know what prompting is, so you probably, yeah, explain
- 19:09it differently. Totally.
- 19:10So I'm. Already seeing how this is going
- 19:12to fail. Miserably.
- 19:13Yeah, totally. So we are so excited.
- 19:15I'm so excited we launch it. We think we we build the best
- 19:18product out there. We launch it, we AB test it.
- 19:21Our test like it really falls flat on our face.
- 19:24We are like really like I'm refreshing the results and it's
- 19:29it's it's terrible. It's not even you know, it's not
- 19:31even bad. It's terrible.
- 19:33Then you think you know what's? Terrible because of nobody's
- 19:36using it. Or no people are using it but
- 19:38they don't like it. And they're giving you that
- 19:40feedback right away or? You don't immediately get
- 19:44feedback, but you you can bounce off, you can measure the
- 19:46conversion numbers. So A&B itself does the magic of
- 19:49AB testing, right. So you have a conversion number
- 19:51on A, you have a conversion number of on B, and you can see
- 19:54the conversion numbers. Broken on this data.
- 19:57You look at the yeah, you look at the agent and everything is
- 20:00amazing. It's still amazing.
- 20:01So why does it not work so? And this has happened, you know,
- 20:06again, you know, I'm, you know, talking about failures.
- 20:08It's also important to, you know, embrace failures.
- 20:10And this has happened many times.
- 20:12And you know, my learning here and you know, again, I'm a
- 20:15technologist. You know, I'm not a designer,
- 20:17I'm not a user researcher. So I also learned it the hard
- 20:19way is the way I think about is it is so there are two
- 20:24dimensions. One is technology.
- 20:25Second is user adoption technology.
- 20:28Like I feel that technology today is more advanced than the
- 20:33use cases. It was not always like that.
- 20:35So four years, four years back, I tried to do a project where I
- 20:38felt that I'm so ambitious with my idea, but the technology is
- 20:41not ready. These days.
- 20:42Whenever I try to do a project, I feel our technology is, you
- 20:45know, few steps ahead, how can I use it?
- 20:47That's the problem. So that's technology, but user
- 20:50adoption is not going at the same pace as technology.
- 20:54Think about it. We all use ChatGPT.
- 20:56You know, ChatGPT, it's been three years now and I think it's
- 21:00been internalized. People are now understanding.
- 21:02We're learning new ways to use it every day.
- 21:04We're practicing. Oh, this.
- 21:05Actually, I should ask ChatGPT instead of just doing what I
- 21:09normally would do, like ask a friend or ask a doctor.
- 21:12Yeah. And you and me, we are probably
- 21:14maybe buy a sample that, you know, we are both in this field
- 21:17and you know, maybe we are in a bubble, but you know, even my
- 21:21daughter uses it. I see my my mom does something
- 21:23with it when we go in, you know, social circle, people who are
- 21:26not in technology, I see. So it has already kind of
- 21:29penetrated outside. So I won't say that, you know,
- 21:31it's a hype or it's in a Vienna bubble like it's going.
- 21:34So chat bots for productivity, chat bots for these kind of use
- 21:38cases, general use cases. It's it's a thing in the world
- 21:42where we live in today and people, more people know about
- 21:44it. But think about it.
- 21:46Do you use a chat bot to buy stuff?
- 21:49I don't. Do you use a chat board to order
- 21:52food? I don't.
- 21:53And imagine it's been three years.
- 21:56It's it's surprising. It's surprising, you know that
- 22:00and we all there's so many demos.
- 22:01People are talking about it. We are at Ray Summit, the
- 22:04hackathon. People build this stuff.
- 22:06booking.com. There are these assistants,
- 22:07travel planner, all these ideas in our our head.
- 22:11But as users, I eat food, I shop for things, I go for, I book
- 22:16flights, I book hotel. But I so far and I'm in this
- 22:20field, I'm obsessed with this technology, but I haven't made a
- 22:23single of this. You think that's AUI problem?
- 22:26I think it's a user adopt. It's AUI and user adoption
- 22:29problem. It feels like the UI
- 22:32inadvertently introduces so much friction, and it's not the way
- 22:36that we're used to doing things on the Internet for our shopping
- 22:41experience that we say, you know what, it's easier to do it the
- 22:46way that I know how to do it, Yeah.
- 22:48Exactly, exactly. So so after we failed, we did a
- 22:51bunch of user research. You know, I have a by the way, I
- 22:55have a new found respect for designers and user researchers,
- 22:58I think, and now I appreciate. So I work closely with
- 23:00designers, user researchers in last few years and I think I
- 23:04understand this feel much better now and a lot of respect.
- 23:08So in fact, these days, you know, when we put together a
- 23:11project, you need a designer and user researcher because
- 23:14technology is one side you need to understand.
- 23:16In the end, you want to solve user problem, right?
- 23:18So after the test failed, we did a user research, we spoke to, we
- 23:22did surveys, we, you know, we, we called in some users and some
- 23:26of our learnings. 1 So if you're the user and if I, if I give you
- 23:31OK, now I give you a new way of doing so.
- 23:34You're familiar with the UI. You, you go use, you use it
- 23:37every day. And now I give you a new UI.
- 23:40It's friction. You will not use it naturally.
- 23:45You will use it if it's really solving A fundamental problem
- 23:50for you. It's really, it's something
- 23:52fundamentally different. Maybe something you used to
- 23:55struggle a lot that I don't know.
- 23:58Maybe you're looking for house and you had a lot of constraints
- 24:01and a search bar was, you know, you were not able to define with
- 24:04the filters and search bar. And now if you go, I give you a
- 24:07voice experience and you just spoke to it and it just
- 24:09understands you, then you use it.
- 24:12But if it's just incremental, if it's a better way of doing
- 24:16search. Yeah, and it's a whole new
- 24:18interface. Yeah, that's a pain in the ass.
- 24:20Yes, I as a. You would not use it.
- 24:22Yeah, I would be pretty pissed too that you changed the
- 24:24interface on me. Yeah, exactly.
- 24:26So that's one of our first learning is that when you give
- 24:29people something new, when you change the UI, it has to be
- 24:34something you, the value for them has to be very and they
- 24:37should know it immediately in the 1st 30 seconds that OK, this
- 24:40is the value for me. Because if they feel that OK,
- 24:42why am I even doing this? Is it you know?
- 24:44Why don't I just go to search bar and use my?
- 24:47Especially when you're trying. To introduce AI into it, because
- 24:50it feels like, oh, these guys just want to be able to say to
- 24:54their stakeholders or their stock, yeah, what do they call
- 24:59it? The shareholders?
- 25:00These guys just want to be able to say to their share
- 25:03shareholders they're using AI so the stock price goes up.
- 25:06It's so important to hand hold the users.
- 25:09Often we build tool and we just say, you know, there's the same,
- 25:11right? So you build, they will come,
- 25:14doesn't happen. So you build then you need to
- 25:16hand hold. So on boarding, guiding the
- 25:18users. A great example that I always
- 25:20like is, you know, I have Alexa in my house.
- 25:25It's a black box that sits there.
- 25:27It's so inviting. It says talk to me about
- 25:29anything. Then you talk to Alexa and out
- 25:32of 10 things, I, I talked to Alexa about 88, it fails, 2
- 25:37works. But then that's a design
- 25:40problem. So if, and that's the case also
- 25:43with many conversational chat bots, we say it's a plain
- 25:45screen, right? And plain screen is nice, neat.
- 25:47I like it. But at the same time, if I'm the
- 25:49user and you now give me this thing and behind the scene
- 25:52there's an agent which can do a lot of things.
- 25:54Maybe there are 20 tools connected to that.
- 25:56I don't know. I didn't build it.
- 25:58So you need to onboard me, you need to guide me.
- 26:01And over the last few years I've been working with designers and
- 26:04there are some kind of excellent ways to, you know, some and
- 26:08these are not new in the world of design.
- 26:10There are you can you can, you know, maybe when I enter, you
- 26:13can already have some boxes that I can interact with.
- 26:16You can have tool tips as I go. So it can be a guided, it should
- 26:19be a guided journey for the user.
- 26:21So that's a second learning. So I've tried both a chat bot.
- 26:25So, you know, immediately go for chat bot, it fails.
- 26:28Then you try UI, you say that, OK, this is the UI.
- 26:32Then let me try a new UI powered by Gen.
- 26:34EI. Make it different.
- 26:36You know, there are a few things happening on the screen.
- 26:37It's much more dynamic. That has better results than
- 26:41chatbot. But you know, that's also that
- 26:43that is constrained, that's limiting.
- 26:45Chatbot has more flexibility, right?
- 26:47So OK, that also doesn't work. So I'm kind of coming to
- 26:51conclusion that the best interface is a mix of UI and
- 26:55chat. So these days, so there's this
- 26:58word that, you know, we discuss a lot in our, you know, in with
- 27:01my colleagues is the concept of generative UI.
- 27:04Even the UI is generative. You know, let me first tell you
- 27:07what this means. It's like I'm talking to an
- 27:10agent. I'm having a conversation.
- 27:13Instead of just replying to the conversation, you always present
- 27:16me some UI elements. Sometimes it might be, you know,
- 27:19show me some items, some Carusos, sometimes, you know,
- 27:23related item and so on. And these UI components can be
- 27:27dynamic. So the agent needs to decide
- 27:30based on my user, based on my previous message.
- 27:33Maybe, you know, with the design team, I built 10 UI components.
- 27:36And then based on the user request, sometimes you get
- 27:38similar dishes or you know, similar items or you know,
- 27:42sometimes item Caruso, sometime something else.
- 27:45And what we are seeing, we still need to trust it more.
- 27:48But what we are seeing is that this experience, because you
- 27:51know, we buying is a very visual experience.
- 27:54You know, conversation is very limiting.
- 27:56You know, I just want to sometimes, you know, even me as
- 27:58a user, I want to scroll, I want to click, I want to swipe left,
- 28:02right. I make decision about what I
- 28:05want to eat based on the image. You know, this image makes me
- 28:07feel hungry. So I wanted so.
- 28:11But you're dynamically creating these different widgets on the
- 28:17fly only depending on the input that I give you from chat or
- 28:23also if I click on something then you can show me more like
- 28:27that both both. That's a great point it.
- 28:29Feels like that is very mix of traditional machine learning and
- 28:34new agents in a way because if I'm clicking on something that's
- 28:38a recommender system problem. Yep, Yep, totally.
- 28:42If you're clicking on something that's a recommended system
- 28:45problem, you know, the traditional world is still
- 28:47applies. And I think that helps in the,
- 28:49you know, that's how TikTok, for example, you know, you Tik Toks
- 28:53you, you're looking at these feeds, you'll swipe left, right,
- 28:55and the recommendation algorithm gets better.
- 28:58But if you think about, you know, again, if you think about
- 29:00this movie Iron Man Jarvis, Jarvis is an assistant who's
- 29:04watching you. What you're doing in that
- 29:06environment, it feels so natural.
- 29:08So we have built, you know, it's still not live, but you know,
- 29:11it's the proof of concept where we build an agent who who's
- 29:16watching the screen. O it's not just answering you,
- 29:19but it's also watching your actions on the screen.
- 29:21And then it talks back to you depending on those actions.
- 29:24So it whenever you add an item to the cart, it says so a good
- 29:27choice or you know, I knew that you would like this item or
- 29:31something like that. And that interaction feels so
- 29:33much more natural than you saying everything based on, you
- 29:37know, typing chat where you know it's just watching you.
- 29:40So that's. It's almost like you having to
- 29:42suck that idea out of your mind and put it into the interface is
- 29:48a lot of friction. Yep and if the agent can just
- 29:51watch you scroll and click then it can be there with you and
- 29:55it's much more of a Co piloted experience.
- 29:57Yep, and I've seen that in action.
- 29:59We don't have a product live yet, but this is something, this
- 30:01is an idea we are playing with, right?
- 30:02Now, but also the user adoption problem there is, I imagine
- 30:05you're going to get a lot of folks that are like, I don't
- 30:08want you watching everything that I look at.
- 30:10Yep, Yep, Yep. So there's that trade.
- 30:13Off, yeah. So we have, we have, we have not
- 30:15cracked it yet totally. You're right.
- 30:17So this is something which we are exploring and every user is
- 30:19different. So you need to.
- 30:21I don't think there's a silver bullet that I can share.
- 30:23You need to. There are people that are fully
- 30:25OK with that. It's like.
- 30:26I'm fully OK with that. My, you know, the way I think
- 30:29about, you know, data privacy, of course it's important, but
- 30:33you know, my mentality is that take my data, if you can give me
- 30:37value. So if I see value in return, I'm
- 30:40happy to give my data. So and different people think
- 30:43differently. So last learning on UI before we
- 30:49move to next topic is contextual.
- 30:52So being contextual, so often we we try to build a chat board,
- 30:57which is like the solution for everything, right?
- 31:00So we give the data as an interface.
- 31:02But one thing that we have seen much more useful is, and this
- 31:06creates a lot of friction because it's a new interface,
- 31:08you don't know the capabilities and so on.
- 31:10You're used to regular interface.
- 31:12So one thing that we have worked better is that imagine your
- 31:15regular UI and imagine you know, there's a, maybe there's a
- 31:18floating button there. And depending on what you're
- 31:22doing, maybe you spend 5 minutes looking for things and you know,
- 31:25looking for items. It pops up at the right time,
- 31:28contextual, and it helps you with a very narrow task, very
- 31:32micro task. I'll give you an example.
- 31:34Maybe I want to buy a headphone and I'm looking at a headphone
- 31:38and it pops up, it says, do you want to compare this headphone
- 31:42with the latest headphone from Apple?
- 31:44It's amazing. That's an aha moment for me.
- 31:46If that happens, I would click on that and you you don't need
- 31:50an entire conversation. This opens and the comparison
- 31:53happens using an LLM. And by the way, that's a very
- 31:56simple it's you don't need agent for that.
- 31:57It's a simple LLM call connected with tool.
- 31:59Well, I guess the hard part is if you want to put it into a
- 32:02table, dynamically creating that table and what?
- 32:05This checks this box. This doesn't check this box.
- 32:08Especially on a mobile screen, that doesn't look good.
- 32:10But you know, you know, we have designers and, you know, there
- 32:13are different design ways to solve it.
- 32:15Yeah, there are different design ways to solve it.
- 32:17But the point is, instead of having you know just a chat bot
- 32:21that does everything and user has no idea what about its
- 32:24capability. If you define some micro job to
- 32:27be done and you help to the help the users at the right time, we
- 32:32in our experiment we find that much more effective.
- 32:35Maybe real fast we can detour into how you make sure it's
- 32:40coming up at the right time and giving you the right
- 32:42suggestions. This is where evals comes in.
- 32:46Perfect segue. Yeah, this is where evals come
- 32:48in. This, this is again, this you
- 32:51can compare it with the traditional world of push
- 32:53notification. So all of us get these
- 32:55notifications from different apps at different times, you
- 32:58know, You know, I use Domino's app, I like pizza and Domino
- 33:03sends me notification. And a lot of times the
- 33:05notifications are bad. So, and if the first few
- 33:08notifications are bad, then you stop either either you silence
- 33:11them or you know, even if you receive it, your brain doesn't
- 33:15process it because you know it's bad.
- 33:17If you get a good notification, if you start with on a good, if
- 33:22you have a good start where the notification actually, maybe
- 33:25it's 1:30 PM and I'm in a meeting and I'm really hungry.
- 33:28And, you know, the app knows that I'm vegetarian and it pops
- 33:33up that you know this. It knows that I like falafel.
- 33:35That's the context. So if it pops up at 1:30 PM that
- 33:39you know, Nishi, you, you haven't had your lunch.
- 33:40I noticed that you haven't had your lunch.
- 33:42I don't know how it will know it but.
- 33:43You haven't. You didn't order anything from
- 33:45our app, so we're assuming you haven't had your lunch.
- 33:47Yeah. So, but that's, that's the
- 33:49thing, that's the notification, which I would love.
- 33:52So again, I think this has been, this is an old problem.
- 33:55It applies to push notifications, it applies to
- 33:57other things. And now it's still true in the
- 34:00world of LLM where if we pop up contextually, and again, the
- 34:05idea here is to AB test and try. So the idea again, the idea is
- 34:09that don't do too much, don't overdo it, don't send 10
- 34:12messages, but you can. So if we take food as a context,
- 34:17so there's lunch, dinner. So breakfast, lunch and dinner,
- 34:21maybe you optimize, you say that you know at the right time when
- 34:25it's lunchtime, you pop up something and then you use the
- 34:29profile of the person to whatever information you have
- 34:32about the person to write something which the person can
- 34:35relate to. And again, this is where LLM,
- 34:38you know, we have done some experiments with the LLM and it
- 34:41does well. But again, you know, no silver
- 34:43bullet. These are few ideas which we are
- 34:45trying that don't be, don't overdo it.
- 34:48And whenever you do it, make it personal.
- 34:51You know, people say don't make it personal, I say make it
- 34:54personal. I could see how you get people
- 34:59that are in my case, for example, I'm checking out on one
- 35:04of the apps, looking at some food.
- 35:07And at this particular restaurant, I've already added a
- 35:10few things to my basket and it says, oh, hey, I know you like
- 35:13vanilla milkshakes. These guys make an incredible
- 35:17vanilla milkshake and that pops up at just the right time.
- 35:19And do you want to add that to your basket?
- 35:22So again, it just reminds me of like traditional recommender
- 35:25system in a new way. And so it's almost like both
- 35:29with search and with this totally you're doing these old
- 35:34tasks that we did in Predictive ML, you're just adding an extra
- 35:39layer on top of it to make it even more personalized and even
- 35:44better ideally. We talk a lot about this
- 35:46internally that the problems are still the same, right.
- 35:49So we are still recommend Netflix organize this
- 35:51recommendation system competition, I don't know 20
- 35:53years from now, 10 years from now.
- 35:55So we still talk about recommendation, we still talk
- 35:57about search, and recommendation is not completely solved.
- 36:00Search is not completely solved sending notification.
- 36:03So it's the same problems, but now the toys are different, the
- 36:06tools are different, and those tools are helping solve the same
- 36:10problem in a better way. OK.
- 36:12Going back to evals, what is your take on those?
- 36:16So when I think about evals, so we we talk, you know, the
- 36:21process is also an investment firm.
- 36:22So I speak to a lot of founders and we talk a lot about mode,
- 36:26you know, what is the mode of the product?
- 36:27How do you differentiate your product?
- 36:29And you know, a lot of time, you know, you see people say that,
- 36:32you know, people don't share their system prompt.
- 36:34You know, system prompt is mode. And you know, I understand that
- 36:36you spend a lot of time to engineer that, but I believe in
- 36:41eval so much that I think, you know, and I'm not a founder, but
- 36:45if I would be a founder and if my system prompt leaks, I would
- 36:48not be worried. But if my evals leak, I believe
- 36:51so much in evals, then I if I would be a founder someday, I
- 36:54would say that evals is the real mode of your product and not
- 36:58your system prompt. A lot of times when we launch
- 37:00these products before we launch them, how do you know if it's
- 37:04good enough, right. And again, this is the same
- 37:07problem that you can think of in a regular software engineering
- 37:10world where you build a software and software development life
- 37:15cycle is much mature. Now where you know, there are,
- 37:18there's quality assurance, there's a field, an entire field
- 37:21quality assurance testing, testing in production,
- 37:24regression test and so on. So there's this entire thing and
- 37:27now with AI applications and now when the entire product is about
- 37:31AI, we come to this new world where and especially now LLMS
- 37:35are non deterministic. So it's not your regular AI.
- 37:38So how do you, how do you know if something is good enough?
- 37:41And we spend a lot of time, we debate a lot.
- 37:43So there are, you know, people in the team who disagree and,
- 37:46you know, everyone is passionate and, you know, someone says
- 37:48that, OK, we did not think about this case.
- 37:51It doesn't work. Other people say that, OK, maybe
- 37:53you're being too particular. It works.
- 37:55It generally works 80% of the time.
- 37:57So the answer to that is eval. So you can do that in a
- 38:00systematic way through evals. Where the idea is that you build
- 38:05a system to check evals is nothing for me, but a system to
- 38:08check if what you build is good enough that the first case do
- 38:13you launch it and second once you launch it, once you start
- 38:17getting real user queries because it can also degrade.
- 38:21Users can also ask different things which you did.
- 38:24We are not prepared for evals. Is that the traffic light that
- 38:27keeps you informed so that you can?
- 38:30So there's a part of it which is pre development during
- 38:32development and there's a part of it which happens like in
- 38:35production. Yeah, I've heard it explained as
- 38:38again going back to like traditional predictive ML, you
- 38:41have offline, online, there's like the offline training batch
- 38:45jobs type thing and then there's the online like boom, real time
- 38:50type of predictions. So few mistakes which I have
- 38:54made myself and I see a lot of people make, so I'll talk about
- 38:56that in eval 1. I think it's a mistake to wait
- 39:02for your product to be launched to write your eval's because you
- 39:07know you want real user data, right?
- 39:08So eval's need data. So imagine you have a chat bot
- 39:11and you need to see what how people are using it in the wild.
- 39:15But it's too late already because you launch it maybe your
- 39:19chat bot sucks and you will know it much later.
- 39:22So, So this is where we do a lot of simulation synthetic data
- 39:27generation where before it goes live and it doesn't have to be
- 39:32again, it can be simple. It's like, you know, you get
- 39:34together in the team and everyone is playing with the
- 39:36chatbot and you create evals based on that.
- 39:39Or you use another LLM where you know, maybe you are this the
- 39:43lone engineer in the team. You give it 10 queries and then
- 39:46you use an LLM that you know, generate 100 more queries and
- 39:49that's your synthetic data. Or you give it different
- 39:50personas. So a lot of people, they wait
- 39:52for, they wait a lot before evals.
- 39:54But I think first step of evals is simple.
- 39:56It's even a person in the room. Just, you know, firing queries.
- 40:00You create a data set of 20-50 hundred and then that's a data
- 40:05set. And then you see how your agent
- 40:07responds and maybe you manually go through it.
- 40:10And if you go through it manually, you know, in half an
- 40:12hour you'll realise that OK, these are the scenarios where it
- 40:14does OK. These are the scenarios where it
- 40:15doesn't do good. That influences your thinking
- 40:18that you know, what metrics should I, what metrics are
- 40:22important for me? How should I use an LLM as a
- 40:25judge? LLM as a judge is a popular
- 40:27concept, right? For evals because human labels
- 40:30are expensive, I'll assume the audience knows about it.
- 40:33Another thing that you know, which I've noticed is that
- 40:37people immediately run to LLM as a judge.
- 40:39But again, there are a lot of low hanging fruits.
- 40:41I'll give you an example. It's so LLM.
- 40:45So these days, you know, we are a bit spoiled.
- 40:47So LLM as a judge, let's just, you know, users.
- 40:49And so you, you get the input for synthetic data, you get the
- 40:53output from the agent. Now you ask an LLM, you prompted
- 40:56a bit that OK, did this input satisfy the user intent?
- 40:59And it's easy, you can do that. And immediately people run to
- 41:02that because it's easy. But there's something which is
- 41:04even easier, which a lot of people miss is a lot of time you
- 41:08have more deterministic because you never know that maybe the
- 41:12LLM itself is making mistake, right?
- 41:14And then you have the final label, which is a mistake.
- 41:17But a lot of time there are more deterministic metrics.
- 41:20So I'll give you an example from food ordering.
- 41:22So imagine a food ordering experience, user comes in, you
- 41:25have the agent conversation. In the end, if the user
- 41:29generates a cart and usually we send a link to the cart, then
- 41:34that's that means that conversation was amazing, it was
- 41:37positive. Right, they bought something.
- 41:39They bought something. So the final metric that you're
- 41:42looking at is did they convert or not?
- 41:44Did they convert? But even, you know, it's getting
- 41:47a little bit into the details, but you know, sometimes people
- 41:49come to the cart stage but they still don't order.
- 41:51So there's a so so. Not.
- 41:53Always, yeah. But hey, but I'm saying that was
- 41:55there a car? If you link, if you think about
- 41:57a funnel that you know a user making search, a user going
- 42:00couple of steps and if you'll think about a later stage in the
- 42:03funnel, could be about making order, could be about adding to
- 42:06the cart, could be about something else depending on what
- 42:08the use case is. But those are positive signals
- 42:11that this conversation actually went through different stages of
- 42:14funnel. And it's a deterministic metric
- 42:16because I can see that, OK, I have these hundred
- 42:19conversations, which of these conversations went to through
- 42:21this stage of funnel and that's a positive conversation.
- 42:24So grab that for the evals. Grab that for the evals and that
- 42:28is so much better than using because LLM as a judge will make
- 42:31mistakes. Look for those metrics, whatever
- 42:34those metrics suffer and don't don't run immediately to LLM as
- 42:37a judge. There's a step before that.
- 42:39Another thing I want to talk about is so if you again, if you
- 42:42look on Internet and if you see advice from people out there on
- 42:45evals, lot of good advice, but it very soon it gets complex
- 42:49where people talk about, you know, conversation level
- 42:54analysis, single turn, multiple turn analysis.
- 42:59The silent failures on the. Silent failure.
- 43:01There are eval frameworks tool calling.
- 43:04You know, did we call the right tool?
- 43:07Did we call the? Did we call the tool with the
- 43:09right parameters? Did if you have multiple tools,
- 43:13did you go, if you can even do a state management?
- 43:16Because maybe a user query calls 5 tools so you can even map that
- 43:20OK from tool one to tool 2 did the maximum mistakes.
- 43:23So it can very easily blow up and you'll be kind of paralysis
- 43:28analysis. You'll be stretching your hair
- 43:30often. You know, we, we present these
- 43:32evals to business folks and imagine, you know, you have a
- 43:34meeting and you know, you have these 12 different people get
- 43:37lost and you know, you lose the audience, you lose everything.
- 43:40So for me, you know, you know, for us what we have seen when we
- 43:43build product set process, it's like the first level of eval is
- 43:46very simple. It's like this is the query from
- 43:49the user. This is the entire conversation.
- 43:52You know, multiple queries, maybe there are 10 messages
- 43:54exchanged. You use and maybe you tried the
- 43:57usual metrics. Now you come to LLM as a judge
- 44:00before you go to turn by turn analysis, before you even look
- 44:03at what tools are called, just give the entire conversation to
- 44:06an LLM and ask some basic questions.
- 44:09Ask it that did it satisfy the user intent?
- 44:13Did the conversation went in a direction where you were trying
- 44:17to the agent was trying to close the order because you can in the
- 44:20end, you care about making a sale.
- 44:23And these are so simple and this business people, they relate to
- 44:26it. And then an LLM will make a
- 44:28judgement, you know, true, not true, partially true and so on.
- 44:31And there's already so much information there.
- 44:34If you now see that, OK, these are the things that work.
- 44:36These are the things that don't work.
- 44:38To be honest, a lot of time our eval stop there.
- 44:41We don't because there's already so much information that there's
- 44:44already so many things for us to fix based on what doesn't work
- 44:47that we never go to level 2 because level 2 is, you know,
- 44:50tools. Did you call?
- 44:51It's? So there's, there's almost like
- 44:52a hierarchy. Yep.
- 44:54And in your eyes, the hierarchy is first and foremost there's
- 44:58like looking at the metrics of did they try and actually make
- 45:04the sale? Yeah.
- 45:05Because that's our top level metric that we're trying to
- 45:08affect the needle on. Yeah.
- 45:09That's really all that matters at the end of the day.
- 45:12So if the agent isn't closing, Yeah, then Yeah, totally.
- 45:16You got to be who was it in the color of money?
- 45:19What was that? Who's the actor that was in it?
- 45:22You got to always be closing and you got to teach.
- 45:25Yeah. Teach your agent.
- 45:26Put that in the prompt. Yeah.
- 45:27So. Yeah.
- 45:29That's one way to look at it, but of course you know on a
- 45:31lighter side. Does the agent follow answer
- 45:35you? So if you were the user on the
- 45:37other side, did the conversation went in a positive direction?
- 45:40Or you know the agent asked for burger and you give them pizza.
- 45:44So did it satisfy the user intent?
- 45:46Did it go in the right direction?
- 45:48So, so there's, those are like very strong evals that you need
- 45:52to be focusing on 1st and then if you need to, then you can
- 45:56start peeling back the layers like did it call the right
- 45:58tools? Did it use the right parameters
- 46:00when it called the right tools? Yep, Yep, I can see that.
- 46:04Yep. It's almost like there's an 8020
- 46:07here. Yep, that Breo's principle, Yep,
- 46:10on we've got these emails, they're going to give us 80% of
- 46:14the important stuff. Yep.
- 46:16And it's only these two evals that we got to look at.
- 46:19Yep. Totally.
- 46:20So that has been our experience. So we also made this mistake
- 46:23where we already got into complicated evals.
- 46:26It doesn't resonate with business.
- 46:28It leads to analysis paralysis. So these days, you know,
- 46:31whenever we do evals, we ask it practical business questions 1st
- 46:35and then there's already a lot of insights there to act on and
- 46:38only then there is value in going deeper.
- 46:41Yeah, but it's not as actionable, I imagine.
- 46:44Yeah. And like you say, analysis
- 46:46paralysis where you're like, there's so much that we need to
- 46:48do here. So coming back and saying, is it
- 46:52answering the user's question? Is the user experience nice?
- 46:55Yeah. Is the metric being moved like
- 46:59the metric we care about? Is it trying to move that?
- 47:02Yep, Yep, those are very, very basic and very useful.
- 47:08Yep, there are two more lessons when it comes to evals. 1 is
- 47:14about so at process something we do, this is a recipe that we
- 47:17have tried many times and it has been very successful is
- 47:20labelling party. So we call it labelling party
- 47:23where you know we invite, you invite your team, you invite
- 47:27some stakeholders, it's important to invite you know
- 47:29business folks as well. You get 15 people in the room,
- 47:33you order some pizza. That's why it's a party.
- 47:35It's important you book 1 1/2 hours, you spend time with these
- 47:39people to actually go through real conversation.
- 47:43And then this is what the agent responded.
- 47:45Now if I'm imagine and then the question you ask them is that
- 47:49imagine you are the user on the other side.
- 47:52And then you ask a couple of these questions that we did the
- 47:54conversation go in the right direction?
- 47:57Did it try to close the order and a couple of other things.
- 48:02Did it kind of break any guard rails or whatever?
- 48:05It depends on, you know, what the agent is trying to do.
- 48:07So you define a couple of questions, easy questions.
- 48:10So don't talk. Don't talk about technical stuff
- 48:12like tool calling and so on, business related questions.
- 48:16And what what would come from that is that you spend 1 1/2
- 48:20hours and at the end of 1 1/2 hour you'll have, I don't know,
- 48:23every person will label 10 data points.
- 48:26You'll have 150 data points, and when you look at that 150 data
- 48:29points and now run your LLM as a judge the prompt that you wrote
- 48:32and ask it to label these 150 data points, you'll see that
- 48:35there's a difference between what LLM says as human.
- 48:38Obviously there'll always be a. Difference human label data and
- 48:40the LLM is a judge. And then you will see that
- 48:44depending on your use case, sometimes the LLM will be more
- 48:46lenient. Maybe the LLM always said that
- 48:48your agent is perfect, or maybe the sometimes the LLM would be
- 48:52stricter. So depending on the use case,
- 48:54I've seen both. But now when you see the
- 48:58difference where the discrepancy is between human and LLM label,
- 49:01you look at it again manually. All this is manual.
- 49:04And then the way to use this data is you use this discrepancy
- 49:08to inform yourself that OK, this is where the LLM is making
- 49:11mistake. You know, human is right here.
- 49:13Now go back to your LLM as a judge prompt.
- 49:16Give it examples. So few short labeling, give it
- 49:18example that when this question comes in, this is what you do.
- 49:22So I think often we also use, we take think LLM as a judge very
- 49:27easy. We just write a prompt, we
- 49:29expect magic to happen and get something, but our experiences
- 49:32you need to iterate on that prompt.
- 49:34And we're going full circle. It's context engineering.
- 49:37Yeah, yeah, it's. Context, engineering, all these
- 49:39things are related, but you need to improve your LLM as a judge.
- 49:42So we spend a lot of, so we do these labeling parties, we
- 49:45improve the prompt, we give it few short examples based on
- 49:47whether this and now you're LLM as a judge, you run it again.
- 49:51We see that OK, now it's closer. Earlier it they mismatched, I
- 49:54don't know, 30% of times. Now the mismatch is 15%.
- 49:58And again you need to keep doing it every two weeks do a labeling
- 50:00party. So that is a recipe that we have
- 50:02tried and it's been very successful, so.
- 50:04Yeah, that's an actionable insight, Yeah.
- 50:06And it's a manual process and, but team building it's yeah,
- 50:10it's, it's rewarding. It's it's nice as as the
- 50:13builders of the system to, you know, sometimes times look into
- 50:15the data yourself and. And hear from the business side
- 50:18of the house, I imagine, Hey, this makes no sense.
- 50:22Yep. Why would we hear about this or
- 50:24why? Why would the LLM say this?
- 50:26Yeah, you discover a lot of other things which you know you
- 50:29were not even maybe hoping to hear, but that happens.
- 50:32Last point there, it's actually kind of it's related with
- 50:38labeling party. So when you do a labelling
- 50:42party, how do you offer? It's very important how you
- 50:45offer people, how they can look at the conversation.
- 50:48And this is where, for example, we use a lot of these external
- 50:51tools, Langsmith Lang Fuse. So there are these observability
- 50:54tools where it captures the interaction.
- 50:56But at the same time, if you're looking at Langsmith Trace, it's
- 51:00very user unfriendly. It's like, you know, bunch of
- 51:03Jason's. If you have multiple tool calls,
- 51:05it's like, you know, I love looking at it.
- 51:07You know, I'm a technical person, but the business person
- 51:09gets lost. So one thing again which we do
- 51:12which works very well is with now with very low effort by
- 51:15using V-0, Versal and so on, you create custom annotation tool.
- 51:20There are standard tools as well in market for labeling data like
- 51:23Label Studio. There are the tools out there,
- 51:25they're good. But you know, our learning is
- 51:27that every use case is different.
- 51:29You need to visualize different things for the user.
- 51:32I'll give you an example. If I'm looking at food
- 51:35conversation or shopping assistant conversation, if I'm
- 51:39the user who's evaluating it, aside from the conversation, I
- 51:41also need to see that, OK, these are the items which were shown
- 51:44to the user at that point, these items and I need to show it, see
- 51:48it visually. Otherwise, how will I judge
- 51:50these items are from these restaurants?
- 51:52Maybe these restaurants are open or closed at that time.
- 51:55Because if you don't give me that information.
- 51:57So annotation tool plays a big role.
- 52:00And what we find ourselves doing a lot is, you know, with a
- 52:03couple of it's like hacking. We just quickly put together a
- 52:06tool in half a day using V-0 Versal, and people love using
- 52:10it. And then you get the audience is
- 52:13much more involved than going through a trace in Langsmith.
- 52:15So again, it's a small point, but it makes a big difference.
- 52:18User experience. Yeah, user experience.
- 52:20And then you are circle.