Latest / Agentic Conversations (formally mlops.community) / Managing Small Knowledge Graphs for Multi-agent Systems // Tom Smoker // #236
Transcript
- 0:00There's a name Tom Smoker. I was on a call yesterday where
- 0:04someone said is that a fake Zoom name?
- 0:06I was like, no, this is real. This is my genuine, genuine
- 0:09family name. Companies White House dot AI
- 0:13title. Yeah.
- 0:14Technical founder, CTO, how to make coffee is coffee flavoured
- 0:18water. It's just boring and black.
- 0:20It's yeah, about as basic as it gets.
- 0:22But I am from Australia so I actually do love like really
- 0:26good. Kind of like single origin
- 0:29stuff. I'm very very into puppy butt.
- 0:31Always black. Welcome back to the MLS
- 0:35Community Podcast. I am your host Dimitrios and
- 0:39today talking with Tom Smoker. I had a blast just thinking
- 0:45about knowledge graphs, learning how he is using them to make his
- 0:49rag systems more reliable, and really what he said that stuck
- 0:54with me and will stick with me. I'll probably end U quoting this
- 0:58every two out of three episodes. So you heard it here first.
- 1:04Be exactly wrong and that's what he's going for when he's
- 1:08creating his systems. He's trying to make sure that he
- 1:11can be exactly wrong instead of exactly right, which he breaks
- 1:15down into more detail. He talks about how he wants to
- 1:19be exactly wrong because there for the types of systems that he
- 1:24is breaking down, it is the start of creating a
- 1:30deterministic system with AI and with ALMS. And one way that he's
- 1:36found to do that is by using knowledge graphs.
- 1:40And of course, knowledge graphs. 1 piece of wisdom that he
- 1:45dropped on me with the knowledge graphs are that rice to a farmer
- 1:50is not the same thing as rice to a chef.
- 1:53And so you want to have a knowledge graph that can
- 1:55understand the differences and how these two things are linked
- 2:00but different. For those of you that have been
- 2:04wondering how to bring your rags up a notch, this is the
- 2:09conversation for you. However, he did warn at the end
- 2:13of the conversation that he's seen people dive into trying to
- 2:18optimise their RAG systems a little bit blindly.
- 2:22So he breaks down how you can make your RAG system 100%
- 2:28accurate and perfect flawless. But what kind of business value
- 2:33does that actually bring? What kind of like like, So what
- 2:36is basically the end statement there?
- 2:39Yeah, you created this chat bot that can tell you how many days
- 2:43of holiday you have left. But So what?
- 2:47And how much engineering time or resources went into having to
- 2:53really optimise it. So you have this chat bot that
- 2:57can tell you the hour policies when maybe just a search bar is
- 3:02sufficient. Let's get into it with Tom.
- 3:04If you liked it, as always, share with one friend or give us
- 3:10a star. Give us some feedback on
- 3:11Spotify. I'm reading all of.
- 3:13Them. We'll see you on the other side.
- 3:23When I read a paper on how to mitigate resignations and it was
- 3:27basically like 33 different techniques on mitigating
- 3:31hallucinations with different strategies and one of the
- 3:34strategies was using knowledge graphs.
- 3:37So it's probably good for us just to start with like what got
- 3:43you down the rabbit hole of knowledge graphs?
- 3:45And I think it was academia. And I know that we we also were
- 3:49talking about your shirt for anybody that's just listening,
- 3:51you've got on the archive shirt, you know, showing it proud.
- 3:55So give us a quick rundown on how you got deep down that
- 3:58rabbit hole. Yeah, yeah, yeah.
- 4:00So, yeah, Academia, absolutely. The Academy, I did a masters in
- 4:05electrical engineering and I got exposed to a specific thesis
- 4:09with a company that was a large mining company public called BHP
- 4:14when I was working in Australia. And my supervisors, Tim French,
- 4:17Way Lou, Melinda Horwitz were amazing.
- 4:19And they really started to suggest.
- 4:21And so Tim specifically was my primary supervisor and he's a
- 4:24logician. So he works in computer science,
- 4:26works in math, but he's a logician.
- 4:28So this was 2016, 2017 and he was like this representation,
- 4:33there's ontology, there's these things called knowledge graphs.
- 4:35Neophyte Jay was starting to pop off and it was like, let's
- 4:38understand and see what representation looks like as
- 4:41like this is when computer vision was really starting.
- 4:43So from there, and I won't bore you too much with the details,
- 4:45but from there really enjoyed it.
- 4:47Did a masters in comparing expert systems and ontologies
- 4:50and knowledge graphs. Enjoyed it, published my
- 4:53research, got myself into a PhD programme.
- 4:55Same supervisors now are doing a PhD in CS which did the same.
- 4:59Did knowledge graphs knowledge graph embeddings when embeddings
- 5:01were really starting? So I've been doing this for a
- 5:02minute. Yeah.
- 5:03So that was PhD started in 2018. Can I just point out that
- 5:09logician may be my new favourite word because it's basically like
- 5:13a magician but for logic. Is that how you rationalise it?
- 5:16It's how I think about it. He he's got some great quotes,
- 5:19too many to fit into this podcast.
- 5:21I got a lot of respect for him, but one of his best is that he
- 5:24doesn't code, doesn't code in language codes and pen and
- 5:26paper. And I always think about that a
- 5:28lot. So the purest form.
- 5:30But yeah, absolutely. It's like really, I think logic
- 5:33is a constantly relevant, you know, art and science, but very
- 5:38much like how do we think about what happens?
- 5:41And so I was actually, I did a undergraduate masters in
- 5:43electrical engineering, but actually minded in philosophy.
- 5:46And so the combination there was was really common in philosophy
- 5:49of logic, philosophy of science and representation.
- 5:53So tell me about knowledge graphs and how they are
- 5:56incorporated into rags because it feels like everybody's
- 5:59talking about them, feels like something that is coming U
- 6:03because of this mitigation of hallucinations.
- 6:06Or you can get better results in some cases.
- 6:08And I want to go down which cases those are, but just give
- 6:11us like the breakdown of what you've been seeing lately.
- 6:14Yeah, So the context for for White House is my cofounders and
- 6:18I were working in this space early last year building legal
- 6:23rack, right, which was information retrieval.
- 6:26But really like, hey, you can type a question in natural
- 6:28language that you can get an answer back.
- 6:30And we started to get these hallucinations.
- 6:31And I want to say off the top that, and I, I said this in my
- 6:34talk at, at KGC recently, LLM's only hallucinate or models only
- 6:38hallucinate. Like the amazing thing about
- 6:40generative AI is that they're creative.
- 6:42And I think Audrey Tabatha says it really well.
- 6:44It's a much broader quote and there's a tweet about it.
- 6:46You can find it. But L don't have a hallucination
- 6:49problem. LM assistants have a
- 6:51hallucination problem. And I think at the time he said
- 6:53that was really right, that they were happy with the
- 6:56hallucination until we're not. And so we would get people
- 6:59saying it's hallucinating all these edge cases.
- 7:01And I think at the time, like misattribution was a really high
- 7:04hallucination. So someone quoting someone else.
- 7:07But when you look at the models, like we had to rethink what we
- 7:10were doing because we were working in very specific, very
- 7:12high value legal cases, which was like, if, you know, if
- 7:16ioffer this person, this amount of money or this preset in this
- 7:18fund, you know, does this trigger any clauses?
- 7:21And so these questions can't be wrong.
- 7:24So we would like look the the risk of hallucination or the
- 7:26risk of error if everything's a hallucination is a problem.
- 7:29O we had to think about, well, how do we represent?
- 7:31More specifically, how do we create determinism for
- 7:34ourselves, even if that's scoped in?
- 7:36And again, because of my background, we came to knowledge
- 7:39graphs, we came to representation and and some
- 7:41level of like visibility and explain ability in the answer.
- 7:46So then you can adjust, constrain, and then repeatedly
- 7:49produce the results that you want.
- 7:53So this is the fascinating thing, the repeatability I think
- 7:56everyone is going to be on board with.
- 7:58Now when you talk about knowledge graphs, I had been
- 8:01vaguely familiar with things like Neo Fuji or I think there's
- 8:05other ones like Arango DB, and you get these basically
- 8:11knowledge graph database type things, tools that are out
- 8:16there. Is it just replacing a vector
- 8:20database with a knowledge graph database?
- 8:23Is that kind of how you see it or do you add both?
- 8:26What do you look at when you're designing the system?
- 8:29Yes, so we are at why our workflow tooling on top of
- 8:33infrastructure and and we work with a bunch of different
- 8:35infrastructure people. So there are graph databases
- 8:38near for Jay we work with we like I, I'd like to give a shout
- 8:41out to Kuzu DB out of Waterloo as well.
- 8:43A friend Prasad for they've got an amazing.
- 8:45They're like the doctor B for graphs and I think what they're
- 8:47doing is really cool. Use them, but we use vector as
- 8:50well. I, I think there's, there's
- 8:52semantic similarity in vectorization, especially
- 8:54embeddings and different type of embeddings, I think are really
- 8:56underexplored. And so for us, like information
- 8:58retrieval is a process. It's not a one off like it's a
- 9:03system. In our case, it's a multi agent
- 9:05system. And some of that agency is going
- 9:07to use vectors and semantic similarity and representation.
- 9:11Some of it's going to use graphs and knowledge graphs.
- 9:13So at its simplest form, you can you can replace a vector
- 9:17database with a graph database with a relational database.
- 9:21They're all similar in that place that you need to get
- 9:23information and you want to augment the the cause that you
- 9:26have. But I think if you look at it as
- 9:28a pipeline, as a system, I think different databases apply in
- 9:31different ways and at why how we use all of them.
- 9:34And I personally use all of them in terms of where they're most
- 9:37applicable. So how is this working?
- 9:39Do you have like a proxy that decides which database to go to?
- 9:44Right, Yeah. So I mean there are ways to do
- 9:46that. I mean you Langen has awesome
- 9:48stuff around around function calling and and and and tools
- 9:50and and, and how best to call from each one.
- 9:52And I think conditionally doing things like, you know,
- 9:56conditional logic in agents is is starting to be really
- 9:58promising. But for us it's actually like a
- 10:00sequential pipeline. So we embed, you know, chunk
- 10:03embed and then store things in vector databases and then we use
- 10:06that vector database to retrieve and then build a graph.
- 10:09So it's actually like it's in sequence in the way that we like
- 10:12as kind of an opinionated workflow.
- 10:14And so it's it's all part of a larger system and it's taking
- 10:19advantage of each of the benefits.
- 10:20Ultimately, what I want to be querying is something that gives
- 10:25me the same answer every time. We, we spent a lot of time
- 10:28trying to be exactly wrong, which I think is a cool term in
- 10:32this because I, I think you can be almost or probably right
- 10:34really quickly, but being exactly wrong is the first step
- 10:37to being exactly right. And so putting it in a graph for
- 10:40us was a good way to store and then see also like it's, you can
- 10:45kind of see the schema and then change the schema.
- 10:47And I think that's really powerful.
- 10:49What do you mean by exactly wrong?
- 10:51That is a funny phrase. I instinctively laugh, but yeah,
- 10:55not sure we understand it. I don't know if it's a broader
- 10:57term. It's it's what we talk about
- 10:59internally, which is like when people talk about determinism in
- 11:04anything in LMS. Again, they're generative, right?
- 11:06I don't think you can get determinism out of an L And I
- 11:08also don't necessarily think you'd want to.
- 11:10I think they're just amazing. I went to a talk the other night
- 11:12at free pick around creativity and, and, and the, you know,
- 11:17creator economy in when you're supported by, you know, these
- 11:21generative models. And I think it's amazing what
- 11:22can be done. But I think getting things
- 11:25exactly right is a really high, really, really hard ask.
- 11:28And I think it's difficult to guarantee, but I think it's much
- 11:30easier to get it exactly wrong. I think you can prove that
- 11:33really quickly. So for us, we can make a graph
- 11:35and look at it and be like, this does not represent what I want
- 11:37it to represent, right? And that's a step towards
- 11:39progress. Because even if I get it exactly
- 11:42wrong, that means my answer is going to be wrong every time.
- 11:45And that's for us, like at least like if you walk back, that's
- 11:48the step you need to be at because if you can, you can make
- 11:51it probably right. But then what does that mean for
- 11:53a customer? What does that mean for a
- 11:54product? What does that mean for
- 11:55reliability and consistently consistency?
- 11:57So exactly right is obviously the goal.
- 11:59I think it's a lofty and I think it's harder to prove exactly
- 12:02wrong. It's like, OK, now we have a
- 12:04framework for determinism and now we can iteratively improve
- 12:07it to get it where we want to. Ohh OK I see where you go with
- 12:12that now. This is fascinating stuff to
- 12:17think about, but how does the data and what you are doing in
- 12:24the system change? Because I'm very used to this
- 12:29idea of all right, we've got the embeddings or we've chunked it,
- 12:32we've got the embeddings, we've throw it in the vector store and
- 12:35all of that. Do you need to now be collecting
- 12:38new data? Do you need to have different
- 12:40sources? Like?
- 12:41How can you make sure that the knowledge graph is as robust as
- 12:45it can be? Yeah, we just put out an article
- 12:49about this, which is like this rudely.
- 12:51There's like a four square matrix about this, which is
- 12:55like, does the underlying data change or not?
- 12:57Like is the underlying data static or dynamic?
- 13:00And then does the schema static or dynamic, Right.
- 13:02And so knowledge graph scheme is really interesting.
- 13:05You can call them ontologies if you want.
- 13:07I think that the lines blur with knowledge graphs.
- 13:10I think the term has been taken, but there isn't a standard
- 13:13definition. There's a pretty good one from
- 13:15onto text that I like, but I think people use it in such a
- 13:17broad way because it's so accessible.
- 13:19People gonna see a graph and be like, oh, I get it.
- 13:21And better then it's very difficult to do in practise.
- 13:24So it's very accessible at a high level, very difficult and
- 13:27low level. So what, what changes there is
- 13:29like all the, all the specifics around it, but the way we think
- 13:32about it is create the schema, which is kind of like the types
- 13:36of your, what we call nodes and edges that can change.
- 13:40For example, that's like people place price like those, those
- 13:44broad categories. And then the underlying data, as
- 13:47you can imagine, like there's different people in your
- 13:49database, right? There's different prices in your
- 13:51database. So that's an example of changing
- 13:53and underlying data almost always changes.
- 13:56To give an example, it's like we work with like a veterinary
- 14:00radiology clinic, right? The, the diseases that can
- 14:04happen to an animal don't change that often.
- 14:07That's in the literature, right? The the patient specific data
- 14:11that can change a lot O those two are in combination.
- 14:14And so the, the scheme if a new disease is discovered, sure, if
- 14:18a new type of disease is discovered and that's different.
- 14:21And so it's constantly moving and shifting.
- 14:24All of this is to say that why we like using graphs for this
- 14:28particular problem is that the schemas are extensible.
- 14:31The data is extensible. It loads in query it back pretty
- 14:34easily. You have some level of structure
- 14:37that you don't necessarily get if you embed in light in space
- 14:40and then you get some level of flexibility and and change that
- 14:44you can't necessarily create easily in a relational database.
- 14:47And so that's where it's kind of the middle ground, which is
- 14:49useful. I hope that answered it.
- 14:51I'm not sure if that answers. If I'm understanding what you're
- 14:55saying correctly, it's basically that when you are able to use
- 15:00the knowledge graph over performs or it performs best
- 15:05when you have almost like this structured data and things that
- 15:12they're going to be changing, but also things that aren't
- 15:15changing. O That's where if you talk about
- 15:17this veterinarian and you have the diseases, but the patients
- 15:21can get new dogs or new cats, they can change their house,
- 15:25whatever it may be, their dogs get older.
- 15:28And so all of those things are changing.
- 15:30But then there's certain things, like the way that this disease
- 15:34manifests itself, that's not really changing.
- 15:37Yes. And so This is why we like the
- 15:40idea, we're promoting this idea, but it's also just makes our
- 15:43life a lot easier, which is like it's easy to make a smaller
- 15:46graph than it is to make a big one.
- 15:47And I spent a lot of time in academia and in in industry
- 15:51working on enormous large scale graphs in in conferences and
- 15:54then in practise. And the two situations I just
- 15:57described to you, if our goal is to create some structure that we
- 16:00can change when we're doing our retrieval, right, that's
- 16:03difficult in just pure, uh, just pure and beddings.
- 16:08And that's difficult in relational databases, right?
- 16:13Not, not, not doable. It's just difficult.
- 16:16What we like is being like, well, I'd rather just make 2
- 16:18graphs. I'd rather make one graph that
- 16:20has the diseases that I can iteratively bring in over time
- 16:24because I don't bring in all of them just to bring in the ones
- 16:26that matter to me. And then I'd also rather have a
- 16:28separate graph that is the patient information, two
- 16:31different schemes, two different graphs and then use them for to
- 16:34kind of logically compare because again, they have
- 16:38different dynamics. One is changing.
- 16:41The age is changing much more frequently than like the
- 16:44diseases that can happen change. So are you using knowledge
- 16:50graphs mainly to sanity check what's retrieved from the vector
- 16:54database? In a lot of ways and and and so
- 16:57that's one of the ways we can also go straight from CSV to to
- 17:00to graph, right. That's a level of structured
- 17:02data. We can go straight from.
- 17:03I I think LinkedIn recently put out a, a paper around the the
- 17:07GRABI like that semi structured data.
- 17:09You can go straight. We can go straight to graph from
- 17:11that. But when it comes to Saturday
- 17:13checking, yes, I really like that as a term, because if
- 17:16you're looking at unstructured data, if you're looking at APDF,
- 17:19it's not templated, right? It's just raw text.
- 17:21You're also looking at combining that PDF with the output of the
- 17:23LM, which is really useful. Yes, it's very useful to look at
- 17:27what it made and be like, hey, that's almost right, but here's
- 17:31where it's wrong. And then, you know, most, like
- 17:35most graphs, full acid or full crud, right?
- 17:38So it's like, whatever I want to do that.
- 17:39I can just delete this one if I want to.
- 17:41And now I have the repeatability, but I got rid of
- 17:44the thing that was off. Yeah, because I think if I
- 17:48remember correctly, the way that I saw knowledge graphs being
- 17:51used were to check for facts in the output.
- 17:56And so there was, it was, I think it was a smaller model
- 17:59that would just, it was trained to check for facts and then
- 18:03query and knowledge graph to see if those facts were true.
- 18:07It was clear knowledge graph or search the Internet.
- 18:09I think we're we're both of those.
- 18:11But basically, like if you said you know this person was alive
- 18:15in 1920 in your output, the smaller model plus the knowledge
- 18:20graph is going to be able to Fact Check that really easily.
- 18:24Yes, absolutely. I think, I think it's just, it's
- 18:27a broader term, awkward structured grounding, which I've
- 18:29seen recently, which I really like and was like, hey, we have
- 18:32this like external fact set like basically like make it like
- 18:37structure Wikipedia. So when I asked this question,
- 18:39it's like I'm getting the exact answer back that I want, right?
- 18:42Like we're working with, we're working with the customer at the
- 18:44moment who has like a like a HR customer care chat bot, right?
- 18:50And it's like when someone asks, I want to call someone about
- 18:53this problem, like which phone number do you bring in?
- 18:56And that could be a very difficult thing to find from raw
- 18:59text, right? And I think an interesting
- 19:02hallucination. And again, I use that word.
- 19:05I think it's difficult to use that word, as I've said, but an
- 19:07interesting hallucination that I've noticed is mean reversion
- 19:10that I see a lot. Like I think a lot of people
- 19:12think about hallucination as the edge, right?
- 19:14You lead and you know, you lead an LLM into a dark room and then
- 19:18say figure your way out. And then it's like it comes to
- 19:21this, like it just creates this whatever this magical, this new
- 19:24thing, whatever it may be. But if you look at something
- 19:27like code generation and you look at the language Solidity,
- 19:30which is heavily based on JavaScript, a lot of the
- 19:32hallucinations in generating Solidity that I've noticed, I
- 19:35haven't seen research on this is JavaScript syntax because it's
- 19:39reverting to the mean of what's most likely.
- 19:41And that seems really common with these models.
- 19:44Ohh fascinating to think about that.
- 19:47Like it's just going back to what it knows and.
- 19:49Yeah, or what countries knows it's likelihood, right.
- 19:52And so it's like, let's just find the most likely thing.
- 19:54And so in the in the the veterinary example, instead of
- 19:58instead of finding the rare disease that could be the value
- 20:02of the diagnosis, it finds a disease that is common to a
- 20:06similar animal. Naively, like and, and again, I
- 20:10want to be specific about the vectorization.
- 20:12I mean, longer index has some amazing stuff around this.
- 20:14Like you said, it's probably an infographic of theirs or or
- 20:17posted there that you're referring to.
- 20:18Well, the types of hallucination.
- 20:20There is many ways that you can improve this process and
- 20:22referring to knowledge graphs as one of them and one that we
- 20:24like. But this is not the don't want
- 20:26to suggest that it's the only way like what I describe as
- 20:29quite naive retrieval there. There's a lot of different ways
- 20:31to do it. But for us, yes, the control and
- 20:34the specifics and the scope is is really important.
- 20:37So then the LM is only hallucinating within the bounds
- 20:41of what we told it. One of the best hallucinations
- 20:45I've seen. I don't know if you've seen this
- 20:46but it was a tensorflow hallucination and there is a
- 20:51there if if you've used the Adam or Adam before intensive flu
- 20:55right? I saw a post on LinkedIn.
- 20:58It got a bit of attention, I think, but I, I don't know which
- 21:01model it is, and I don't want to say which model just in case,
- 21:04but it hallucinated Adam as John and then it got the error.
- 21:08There was like it, it got a compiler that was like, ohh,
- 21:10hey, there's no John, you know, method or property.
- 21:14And I thought that was really funny, but it was funny on the
- 21:16surface. But then like quite worrying in
- 21:20the absolute because then like an entirely unbounded lightened
- 21:24space with mean reversion is what we're dealing with.
- 21:26And so for us, we're like, look, let's just keep the scope really
- 21:29specific in terms of these things are going to hallucinate.
- 21:33That's their job. Let's make them kind of like
- 21:37still be the bumper car that they are, but put the put the
- 21:39guardrails in really specifically and that that, you
- 21:41know, graphs for us with those guardrails.
- 21:43I really like. This idea of basically
- 21:46tightening U this scope as much as possible so that you don't.
- 21:52Allow. The knowledge graph or the LLM
- 21:55or the embeddings to play in this infinite space, You're
- 21:59really trying to say, here's where it is, Just go look over
- 22:03here, it's going to be there, I promise, type thing.
- 22:07What are? Other ways that you can do that,
- 22:10not necessarily or what are other examples of you doing that
- 22:14I guess is a better way of putting that question.
- 22:16Yeah, no. I mean, I can talk to a bunch of
- 22:18ways outside of outside of graphs.
- 22:19I'm not sure if it's in the context of this, but like, I
- 22:21just want to make sure, like, you know, re ranking from cohere
- 22:24is is is great. There's the agentic workflows,
- 22:26which I'm happy to talk about. We do a lot of multi agent stuff
- 22:28internally, but like, you know, having checker agents, having
- 22:31conditional agents, I think works really well.
- 22:33Again, to basically anything. I, I said this in my job.
- 22:35Anything advanced drag from from Lamar index that I think is a
- 22:38really good way to start with this because they structured out
- 22:41really well. What does preprocessing look
- 22:42like? What's optimal chunking line?
- 22:44Chad has similar stuff like both of those groups have really
- 22:47explored this and seen this really well.
- 22:49So there's again, it's a process, not a system.
- 22:52And so there's a lot of incremental ways you can prove.
- 22:53But yeah, for us with the scope to give further examples of
- 22:58scope. Why we think?
- 23:00About smaller graphs rather than one big one, is that like a
- 23:04motivating question for us is like rice to a farmer is
- 23:07different to rise to a chef. So how do you put rice in a
- 23:10database if you want to create some level of consumer
- 23:14interaction? Because there's a buyer and a
- 23:16seller there, right? And so it's like, well, I can't
- 23:18just have a rice node or a rice cell.
- 23:21I have to have some other context.
- 23:23How do I represent it? And so for us it's like, well,
- 23:26scoping in this is the farmer and this is the chef schema than
- 23:32rice within that is in context I think is really good.
- 23:35So scoping in contextually, it is something that we work on a
- 23:39lot for this stuff. Give me more.
- 23:42Examples I love that the rice yeah farmer and right the chef
- 23:45and and of course when you think about it in the knowledge graph
- 23:49way it makes complete sense because you understand the
- 23:54relation between those two and. It.
- 23:57Also makes sense on why it would breakdown in a traditional
- 24:01relational database. Yeah, I'd.
- 24:03Probably should have said this at the top, but I mean, I've
- 24:05been a part of the graph and representation community for a
- 24:08long time, both in practise and, and and in and in pure and
- 24:12research. And they're a great use cases
- 24:14for large like ontologically aligned, well described
- 24:17knowledge graphs. And I use them a lot in my PhD
- 24:20around like free bases, your nails.
- 24:22I think they're great. I'm specifically talking about
- 24:25I'm trying to solve RAG problems and I'm trying to use this
- 24:27architecture so frag problems. So I want that to be clear that
- 24:31I think it's difficult to maintain those worldviews in
- 24:33this context. But another example would be I
- 24:36worked with a legal document and they had a definitions.
- 24:39A lot of legal documents had definitions page and they would
- 24:42say vehicular capacity, right? And my leg was just reading
- 24:46that, like what do you think the vehicular capacity is going to
- 24:49be? How many people?
- 24:50Fit in the vehicle. Cool, it's how many?
- 24:53Cars fit on a road. Ohh.
- 24:55Yeah. So it's and that's and so it has
- 24:57to be in in context. You can figure this out, but how
- 25:00do you, how do you put that context in?
- 25:03So it's like you need to tie that definition to that context
- 25:05every single time. And then you, as you start to
- 25:08try and represent the whole world, it is logical
- 25:11inconsistencies that happen really quickly.
- 25:13Plus like if you want to update over time, how does that work?
- 25:16So yeah, it's those sort of problems that we are like scope
- 25:20it, right, Scope in and then now you can talk about it as if
- 25:25you're in this context. Have you seen?
- 25:28Ways like when is the knowledge graph too small?
- 25:31Or is it ever too small? Yeah, I, I.
- 25:34Think that's a great point. So when I talk about small
- 25:36versus big, it's really like a very accessible way for people
- 25:38to think like, because I've done this before, I know all the pain
- 25:41points. Making a big knowledge graph is
- 25:43great in theory and so difficult in practise.
- 25:45The ROI, like there are some great use cases for it, but I
- 25:48think that some people stop before they build it properly.
- 25:51And so for me, when I see a small graph, it isn't a small
- 25:53domain. It's really like start with a
- 25:55well connected subgraph first, like almost like a just in time
- 25:59graph and then build that out as you go.
- 26:03So when is a graph too small is an interesting question because
- 26:05it's like the answer is when there isn't enough context to
- 26:09answer your problem, I would say.
- 26:11But I think that's often the point of the graph is, you know,
- 26:14efficient navigation and traversal.
- 26:15But really you only need a couple of notes to answer your
- 26:18question. Like we we think a lot about
- 26:21completeness and why graphs are useful for completeness.
- 26:24Like if you look at diagnosis, this would be an example where
- 26:27vector databases may struggle because it's not necessarily
- 26:31like a quantitative use, right? It will give you the best
- 26:34diagnosis back. But if your job as a, you know,
- 26:38as a medical professional is to look at all the available
- 26:41diagnosis and then make a decision based on patient
- 26:44history, then you actually want all of them back, not just the
- 26:46most likely the best ones. And so something like a graph
- 26:49like you can represent the entire thing and and so then you
- 26:53can get back the the full scope of information.
- 26:56So that's like a how small the graph this is.
- 26:58Like as long as it has all the diagnosis in it, then that's
- 27:01really as big as it needs to be at that.
- 27:03Again, just in time. It's just whatever answers your
- 27:06question. And are you creating?
- 27:09New knowledge. Graphs for each use case.
- 27:13Yeah, so a lot of times, yes, but we like what we've.
- 27:17And again, I don't want to be more willing for people to check
- 27:19us out, but very quickly, like our job is just to make this,
- 27:22how quickly can you make a graph and how quickly can you change
- 27:24it? But that's the whole process,
- 27:26which is like, don't sit off and wait.
- 27:28Like we can get it down to like a minute.
- 27:30Just toss a PDF into schema like however many pages you need.
- 27:32Just immediately see it be like, this sucks, change it, fix it
- 27:36and then iterate. And so yes, like growth
- 27:38management is something that we do, but when you look at trying
- 27:41to solve the, the edge cases shouldn't do that.
- 27:44But like the, the, the difficult problems in RAG, the ones that
- 27:46aren't immediately solvable, they are point solutions, right?
- 27:50It's not a one-size-fits-all. It's usually the bounds of what
- 27:52is represented a granularity or or a condition or its
- 27:55specificity. So yes, making a graph per
- 27:58thing. So our job is to make that as
- 28:00quick as possible. All right, real quick, let's
- 28:02talk for a minute about our sponsors of this episode making
- 28:05it all happen. Lattice flow AI.
- 28:08Are you grappling with stagnant model performance?
- 28:10Gartner reveals a staggering statistic that 85% of models
- 28:14never make it into production. Why?
- 28:16Well, reasons can include poor data quality, labelling issues,
- 28:20overfitting, underfitting, and more.
- 28:23But the real challenge lies in uncovering blind spots that lurk
- 28:27around until models hit production.
- 28:29Even with an impressive aggregate performance of 90%,
- 28:33models can plateau. Sadly, many companies optimise
- 28:37for prioritising model performance for perfect
- 28:41scenarios while leaving safety as an afterthought.
- 28:45Introducing Lattice Flow AI, the pioneer in delivering robust and
- 28:50reliable AI models at scale. They are here to help you
- 28:54mitigate these risks head on during the AI development stage,
- 28:57preventing any unwanted surprises in the real world.
- 29:01Their platform empowers your data scientists and ML engineers
- 29:04to systematically pinpoint and rectify data and model errors,
- 29:09enhancing predictive performance at scale.
- 29:12With Lattice Flow AI, you can accelerate time to production
- 29:15with a reliable and trustworthy models at scale.
- 29:18Don't let your model stall. Visit Lattice Flow Dot AI and
- 29:23book a call with the folks over there right now.
- 29:27Let them know you heard about it from the MO OPS Community
- 29:29podcast. Let's get back into the show.
- 29:33Yeah, so. Now let's go into the points
- 29:36that you mentioned on. When knowledge.
- 29:39Graphs aren't the most useful in the rag situations.
- 29:42Yeah, yeah. So, I mean, I, I use vector
- 29:45database rat like the vector database and semantic similarity
- 29:48works really well, right? And I'd also say that graphs the
- 29:51moment are, are really textual representations.
- 29:53And I think there's some amazing work, good friends with the team
- 29:56at Marco. They're doing some awesome,
- 29:58awesome work around custom embeddings and and
- 29:59multimodality, especially images.
- 30:01So I, I think that stuff is really useful for those, for
- 30:05those sort of embeddings. I would also say, yeah, I would,
- 30:09it depends on how specific you want to be.
- 30:11Because there's also a situation in which like you can change a
- 30:15graph schema, right? But if you already have a
- 30:17relational database with this information and you've already
- 30:20spent time describing that schema perfectly and you're
- 30:22problem is refer to this database really specifically, I
- 30:25think it is worth just using a relational database for that
- 30:28case. But a lot of pretty much all of
- 30:30the problems we work with graphs can be used for and I think
- 30:36vector databases can be used for just can't guarantee the
- 30:38reliability of it. And I think relational database
- 30:41can be used for a lot of that. It's just sometimes difficult
- 30:44and there's there's issues around natural language into
- 30:48query language, whether graph or or relational or otherwise.
- 30:51So I'd say that the, the problems that you need to be
- 30:55specific, reliable and change the schemer of an update that
- 30:58graphs work really well for. And then problems that you need
- 31:01to be just like high level, like customer responses or like help
- 31:06me book a trip somewhere or, or, or, you know, give me a recipe
- 31:09like it's great use cases for for vectorization.
- 31:12So I'd say that if if you're OK with the average being really
- 31:15good, I think that you're OK with affected databases in a lot
- 31:18of ways and. If I'm understanding this
- 31:22correctly, I if I've got my PDF documents, I'm throwing them
- 31:27into an embedding model and then putting them in my vector
- 31:31database. But I'm also throwing them into
- 31:34a knowledge graph. Yes, so.
- 31:36That's a great question. So what we actually do with the
- 31:39knowledge graphs is there are layer on top to every node that
- 31:42we have in our graph, whether that's like, you know, type
- 31:45person named Tom has a has a connection back to the chunk,
- 31:51the embedded chunk text where it came from.
- 31:54So this provenance from the embedding back to the
- 31:58representation. So they're not necessarily
- 32:00distinct. They're connected.
- 32:01And so you can think of the graph as like an indexing layer
- 32:04on top of the stored data. And the value of that is that
- 32:08again, with that scope, if you interact with the graph first in
- 32:11a deterministic way, then you just get back just the chunks
- 32:14that you want. I can't remember who it was at a
- 32:17I was at a is either a land chain posed or a land chain
- 32:19talk. Think it might have been Will
- 32:21from from land chain or it could have been Harrison talking about
- 32:25context poisoning and how if you set like a top K of 10, so you
- 32:31return back 10 chunks and three of those chunks have the answer
- 32:35in it and seven don't, you're at high risk of making it worse.
- 32:40Because if we believed it few shooting a model works, which I
- 32:43absolutely do, then you can fuse shot it wrong as easy as you can
- 32:47fuse shot right. And so for us, like indexing on
- 32:51top of the information that we actually care about means that
- 32:54the graph can direct it down to just those 3 chunks, or at
- 32:58least, you know, much more like concentrated retrieval process.
- 33:02So again, in a process like you can get back the graph, you can
- 33:05get back a summary of each node, you can get back the properties,
- 33:07but also we just have optional flags.
- 33:09So if you want the chunks as well, if you're the provenance,
- 33:11you are the full document, you want the document name, that's
- 33:14also like a, a process. So they're not necessarily
- 33:16distinct. I think you can think in a lot
- 33:18of times and we make different types of different people
- 33:20depending on the use case, but help them do the same.
- 33:22But I think if you think about it as an indexing layer on top,
- 33:24I think that's a useful way to think of and.
- 33:27So because of the. Order of.
- 33:30Operations that you were talking about, you're able to catch
- 33:34that. If we take that K10 example and
- 33:37you get the seven back that are kind of shit, you're able to
- 33:41catch that with the knowledge graph and be like, all right,
- 33:43well, let's philtre out these seven because it's already come
- 33:46out and we already know what the knowledge graph layer it is like
- 33:50a philtre in a way, yes. Yeah, that that's a, that's a
- 33:53use case that we use a lot and I think it's really useful.
- 33:56I I just, I think LM's are the coolest, coolest thing and I've
- 34:00been using LM for I, I like to say since before they were cool.
- 34:03I don't necessarily think they're cool now.
- 34:05I think Chad should be is probably cool now.
- 34:06I don't think L's necessarily. I've been using them since they
- 34:09were since they were models, since the terms came out, but I
- 34:12do not trust them to. There's a whole conversation
- 34:15whether they reason or not. But like when I build these
- 34:18systems and while them to be reliable, like I don't want to
- 34:21just like give an LLM a bunch of information and be like figure
- 34:25it out. It's like there's, there's
- 34:26mitigating strategies, but I just don't really trust it like
- 34:29that. So it's like, I just want to
- 34:30give the LM only the information it needs, no more at that point.
- 34:36And I'm pretty confident that it's going to fill in a really
- 34:39necessary part of a retrievable pipeline.
- 34:41Yeah. It's so funny that you mentioned
- 34:43that because how many times do we get the wrong answer because
- 34:48you've given it too much random context that has nothing to do
- 34:54with the actual output that we're looking for.
- 34:57And then like, of course it's going to hallucinate, right?
- 35:01Of course it's going to go off on something because especially
- 35:03if you're giving it in this case like 7 times or 7 / 10.
- 35:10Yep. Like 70.
- 35:12Percent is actual crap that you don't need.
- 35:15That is where that context poisoning comes in.
- 35:17That's. Me obviously like using for the
- 35:19sake of demonstration. I think if you, if you use
- 35:22ranking, if you, if you chunk really well, if you do it, I
- 35:25think you can mitigate that to that point.
- 35:27It's just that I know that even in theory and definitely in
- 35:29practise, in my experience like it, it, I can't trust it.
- 35:33Like I'm trying to give people reliable systems, right?
- 35:36So when I say, you know, 3 out of 10, the reality is it's
- 35:38probably, if you spend time really improving your, your rag
- 35:41process, I think it's much more likely than that.
- 35:43But I, it's not 100, right? And so the graph being exactly
- 35:47wrong, bringing it back to that, it's like, cool, if it's exactly
- 35:51wrong, then I know that I'm getting back the same 4 wrong
- 35:55ones every time, right? How do I improve that process?
- 35:58Instead of being like I have these mitigating strategies,
- 36:00it's like I have some level of determinism to fix it.
- 36:04O let's talk. About agents for a minute, What
- 36:06have you been seeing on that level and those use cases?
- 36:09Yeah. So we've been doing multi agents
- 36:12for for a while. And so we've actually been
- 36:14working on on a few of them. But I, I think that like there's
- 36:17a really interesting question that we talked about internally,
- 36:19like what is an agent? Because is it a Python wrapper
- 36:22around an open API, open AI API call?
- 36:25It's like probably, yeah. But also if you run a script, is
- 36:28that an agent like not an LA? And so it's like, what does it
- 36:31mean to be this? And I think the popularity is
- 36:33interesting. We work a lot on like structured
- 36:35grounding per agent. And this is how we solve a lot
- 36:37of our problems. Because I, I'm not of the
- 36:40opinion that you just give a natural language instruction to,
- 36:43to a system and then it just goes away and does that and
- 36:45nails it every time. It's like you want to break it
- 36:48down into its steps that you understand, you want to like
- 36:51decompose it down into steps and then and then orchestrate those
- 36:53steps. And there's some cool frameworks
- 36:55that help you do this. But a lot of the time, like we
- 36:58build what are effectively like functional programmes because
- 37:01like we want IO test, right? And I think programmes like,
- 37:05sorry, frameworks like we use Foster I Pidato instructor, like
- 37:08they're really useful to to build these systems out.
- 37:11But ultimately, like every time I make a call, I want to know or
- 37:17at least want to point test. And so breaking it down into
- 37:20agentic systems is actually a really good way to test and
- 37:24produce like, you know, well structured software, which we
- 37:28think about a lot like. So breaking it down into its
- 37:32components, making LLM's do as little as possible and then
- 37:35having many LLM calls is how we like to structure it.
- 37:38And I think that at its core is like a multi agent system.
- 37:41I was in this awesome framework. Said crew obviously are doing
- 37:43really cool work around like how do you do natural language
- 37:46instruction? But we use we definitely use
- 37:48line chain in some in some pieces.
- 37:50We don't use line chain for everything.
- 37:52And before I like love to use it for prototyping.
- 37:54There's some great parts of language that we use in
- 37:56production around Lang Smith, around their bedrock
- 37:59implementation is like a great way to test the different LMS.
- 38:02But when it comes to wrappers, I think they're really great for
- 38:05testing. When I put stuff out in
- 38:06production, I'm not yet ready to use the wrappers that are
- 38:09available. So I think that we have multi
- 38:11agent systems, but a lot of that is just well typed, well IO
- 38:16tested and well integration tested like different Python
- 38:19modules that wrap calls to specific LMS. And when you say?
- 38:23It's well tested. Is that basically, again going
- 38:26back to the reliability of it, that every time I ask this one
- 38:31question I'm going to get the same output means a few?
- 38:35Things so shout out to Lang Smith and how well they do
- 38:37provenance and that as a programme, I, I think he's
- 38:39underrated in terms of how well you can see the different LM
- 38:42calls and, and how that works. But I also mean literally to as
- 38:45in like it's π tested. So it's like, that is a process
- 38:49of like, I need certain coverage over my system.
- 38:52I don't like that have tested all of this, you know, well
- 38:55structured server and like so it's testing the IO based on
- 39:00questions and then breaking those down into modules.
- 39:03So then, for example, GBT 4 Omni comes out right and it's like,
- 39:08hey, forced to expensive 3.5 isn't consistent enough.
- 39:12This is like it's right in the middle.
- 39:14How do we know if it works? And then I can just change the
- 39:16pedantic model name and now I can just go into a dashboard and
- 39:20see every single step of my pipeline, conditional or
- 39:23otherwise, is this thing as performance is this thing.
- 39:26What's the latency like? So, so that's like a, an
- 39:29important start process that we do, but we're like in
- 39:31production, right? So that that requires like a
- 39:33level of tested software. So when I say tested, it's like
- 39:36this. I test to it, but there's also
- 39:38literal, you know, full test States and coverage around it.
- 39:42Yeah. Yeah, I like it.
- 39:44And when it comes to the agents you mentioned how each one you
- 39:50want to have this structured grounding, Yeah, per agent or
- 39:55per agentic workflow I think is what you mentioned.
- 39:57Yeah, breaks down exactly what that is.
- 40:00This is This is. I think this is really cool and
- 40:02I think about this a lot, but if I have a rag system, right, like
- 40:07if I need to, if I need to give every agent a little bit of
- 40:09information that doesn't already have and I can get each of those
- 40:12agents 95% accurate and I have a sequential workflow of five
- 40:16agents, that's 77% performance right on expectation.
- 40:20And I know that's not linearly distributed on in some cases
- 40:23fail every time, etcetera, etcetera.
- 40:24But like if you look at that 77 percent is awful, right?
- 40:27And if you think about it like, I don't know if I think people
- 40:30use the example, like what if my Slack message like didn't show
- 40:33up every now and then all like, what if I didn't trust like the
- 40:35e-mail protocols and hike did that?
- 40:37That's it's it. The, the level of reliability is
- 40:39really low. And 95 is a big ask even per
- 40:42agent, right? So what I think about a lot is
- 40:45like that rise to a farmer, rise to a chef, like, well, if I can
- 40:49get both of those exactly wrong and I can spend enough time kind
- 40:51of like fiddling with the inputs, outputs and the crud of
- 40:54each structured grounded agent with a schemer and a graph, then
- 40:57I can iteratively improve both of those to, you know, I, I
- 41:00guess maybe 100 it's impossible, but asymptotically like 99.
- 41:04And then now the propagated uncertainty is significantly
- 41:06less. And so when I think about multi
- 41:08agent systems, I think they are the future in a lot of ways
- 41:11because I work with workflows and agentic systems a lot, which
- 41:15is like, hey, I have a task that I need to do, break it down.
- 41:18And once you've broken it down, you have a multi agent system,
- 41:21right? So yes, I think the difficulty
- 41:24is we're about to see an explosion of, we just saw a year
- 41:29of Medium posts into no enterprises using this stuff,
- 41:33right. And it's like, and I think it's
- 41:35awesome and I love the exploratory nature of it, but I
- 41:38think we might see the same with agents, which is like, it's
- 41:41already not reliable enough per call to a model propagating that
- 41:47uncertainty or, and, and in my PhD decision making under
- 41:50uncertainty through Joseph Halpin.
- 41:51And, and I think it's like phenomenal thing that I care
- 41:53about a lot, but I feel like it's a massive risk, right?
- 41:57The turning point for me is going to be do I give my credit
- 41:59card to a booking agent and am I willing to just show up at the
- 42:05airport right once that happened or?
- 42:07Zeros in my bank account if I'm going to be doing that kind of
- 42:10shit. Yeah.
- 42:11So that's. It or am I gonna show up there
- 42:13like you booked the flight for tomorrow?
- 42:14Like, because what I want to say is like, hey, I'm not doing red
- 42:17eyes anymore, but I will get up early.
- 42:18I have this alliance membership, right?
- 42:21And and I'd prefer one stop over here.
- 42:23If I can't like how how do I like I should be able to write
- 42:25that as an instruction. The reason I don't is that I I
- 42:28don't trust the systems yet because I don't think each
- 42:30system, each agent is accurate enough.
- 42:33So what we work on is grounding each agent and then iteratively
- 42:37improving each agent, because then you can break down like a
- 42:41really good example. That's we're a long way away
- 42:43from ever getting this in, in, in through demo, let alone in
- 42:46practise. But like a global supply chain
- 42:49of like any sort of so it's like you have a shipping age and you
- 42:52have a procurement agent, you have a Providence agent, you
- 42:54have a you know, an employee agent, then you have those.
- 42:56Those are also different depending on which you know,
- 42:58nationally, where abouts you are in the world and how do you
- 43:01produce and how do you supply? That should be many different
- 43:04agents doing many different things, right.
- 43:05That is a completely automatable workflow in theory.
- 43:08Just the difficulty of that is so much in in practise.
- 43:11So that I look at is like the ultimate multi agent system,
- 43:15like international physical goods moving around as part of a
- 43:19supply chain. But each of those agents will
- 43:22have to be so specific and so accurate for you to be able to
- 43:26trust that at all. And yeah.
- 43:28Exactly. Like there's some talk about
- 43:31high risk. If shit doesn't work out, all of
- 43:35a sudden you've got a bunch of ships and shipping containers
- 43:39going to the wrong port or going to like, that's not good.
- 43:44Hey, we're about. To see I think I mean, yeah,
- 43:47Canada thing was already really interesting, but I, I think that
- 43:51if, if 2024 is the year of agents, which I've seen a few
- 43:54people say, I think we're going to see some mistakes before we
- 43:59see some really good systems. It's not physical systems,
- 44:02right? Because physical systems are
- 44:05easy to prove. But why I like agentic systems
- 44:09and it aligns with like the, the small graphs that we have is
- 44:12that then these specific person or specific domain expert who
- 44:17matters like who's in charge of procurement, It's like then they
- 44:20just deal with the procurement agent or agents and just the
- 44:23procurement graph or schema or grounding or, or knowledge and
- 44:27they don't have to deal with the rest of it.
- 44:29I think modularizing those systems is like a really good
- 44:31way to, to build these, these, these processes and automate
- 44:35these processes. But we're about to see people be
- 44:37like, again, I'll book this holiday for you.
- 44:39And it's like, you show up and there isn't a booking, right?
- 44:41That already happens. But these systems are so like,
- 44:45if you talk to an old head about this, like multi age, the the
- 44:48the multi agent system textbook that I started using three years
- 44:51ago to build these systems is from 2000.
- 44:54Like this is not a new thing, right?
- 44:56Like this has been around for a long time and I think the
- 45:00history doesn't repeat itself, but it rhymes keeps coming U or
- 45:03what's old is new again keeps coming up in this.
- 45:05And I think when you speak to like when I speak to like my
- 45:08supervisors about this, they're like, yeah, this is going to get
- 45:11it's already not good enough, but the the financial
- 45:15opportunity of automating larger workflows is such that people
- 45:19will do it. And it's easy to build more
- 45:22agents than it is to build a better agent right now.
- 45:25It's gonna get messy. Yeah, real quick.
- 45:27Sorry, I could talk. This for too long.
- 45:29We move on. Yeah, I.
- 45:30Well, I love this because I've had that feeling too.
- 45:33I made the joke like. When auto.
- 45:36GPT came out, it was like, yeah, everybody was talking about it.
- 45:39It was this huge thing. And I think people are easy to
- 45:42project themselves into the future and what life is going to
- 45:46be like when all of this works flawlessly.
- 45:49But to get there, that last 10% that we need to get there could
- 45:54take us longer than it took us to get here.
- 45:57And so I was making the joke of like, I've been playing with
- 46:00auto GPT and all that happened was I got like a $300.00 open AI
- 46:05bill, you know, like. Yeah, yeah, yeah, yeah.
- 46:08You, you made it good. You had a good post about this,
- 46:10right, Which is like more use actually equals more cost in a
- 46:14way that I, that I think people aren't talking about.
- 46:17And, and like I test a lot of different models locally.
- 46:19We, we use, I use open AI a lot through their API just because
- 46:23it's very easy to use. I think the models are great,
- 46:25but like there are so many different models, so many
- 46:26different settings, so many opportunities to fine tune.
- 46:28I think there's different levels of models right now for sure.
- 46:32But yes, a thought experiment for you because I've, I've asked
- 46:36a few people about this multi agent systems, I think in theory
- 46:41and currently in prototype, they don't break down in different
- 46:44places. They often break down in the
- 46:46same place, right, or the same place as the most uncertain with
- 46:50the booking example, right, there would be an agent that
- 46:53goes and gets the latest flights.
- 46:55There'd be an agent that goes and gets the latest hotels.
- 46:56There'd be an agent that goes and gets the latest goes and
- 46:59gets the latest, like, you know, car booking or whatever.
- 47:01There's an agent that you know, maybe take your nationality and
- 47:04make sure you can go there without a visa, whatever it may
- 47:05be, like automates this whole process.
- 47:09I wouldn't trust it because I don't think it's going to make
- 47:11the best decision with all that information.
- 47:13But if I could write my own agent and bring it to that
- 47:15system, maybe I would like would you, if you could control your
- 47:20right, you could see it, right. So we think a lot about this in
- 47:23a I like the master apprentice model.
- 47:25Jason left a really good post about this recently around here.
- 47:27And we do, we actually do this, which is like a lot of the, the
- 47:30people we work with, it's like it's report generation that they
- 47:32can review. So would you bring your own
- 47:34agent? Like if you could bring your own
- 47:36agent, would you? Do you think you would be more
- 47:39likely to use that system? And justice almost like train
- 47:43the other agents how to do it the other.
- 47:45Agents that they're all fully described as an API.
- 47:48Maybe like it's perfectly retrievable, it's small like.
- 47:52Is the problem that you don't get to control the middle of the
- 47:55workflow? Do you trust yourself more than
- 47:58you trust them? Yeah, no.
- 48:00I still am very much like you. Like I don't trust him at all.
- 48:06Yeah. And so.
- 48:08I would much rather, even if it's it's funny because it is
- 48:11very much like the time versus comfort or convenience tradeoff.
- 48:16And right now I am. I would rather spend the time
- 48:21and do it right than that tradeoff because it's the same
- 48:25with like. Self driving.
- 48:28Cars right? Yeah, I I feel like self driving
- 48:31cars. I am a little bit more apt to
- 48:34let the computer take over the wheel, but with the agents I I'm
- 48:38like I need more zeros in my bank account.
- 48:41Cool. Again, this is that's the answer
- 48:43I want. So a friend of mine called Linus
- 48:45Eckenstein, who's he been a friend of mine for a long time,
- 48:48but he's he's very popular on Twitter and this stuff was
- 48:51recently doing a talk here. I got to see him and not to tell
- 48:54too many tales out of school, but he has some.
- 48:56He's talking to his children and he was like, they went in a self
- 49:00driving car, right? And they were like, why are you
- 49:03driving? They're young, young children,
- 49:05right? So they were like and he's like,
- 49:08well, I need a steering wheel like I need the control.
- 49:11And they were like, you don't need the control.
- 49:13O what does the future look like with agents?
- 49:16If you and I are like, well, I'm not willing to give the Wheeler.
- 49:20But. If the new generation is willing
- 49:23to give the wheel up, then what are these systems look like?
- 49:25Because like, I don't trust that system, but does someone 10
- 49:28years younger than me trust that system?
- 49:29And are they a market? It's like, yeah.
- 49:31So I actually think expectation is really important with this
- 49:34stuff. And I think we may be at the
- 49:35stage where people are willing to do that as, as as a booking.
- 49:39I don't know. I, I think so Tim French, who
- 49:42was my main supervisor, who I talk about a lot.
- 49:44He, I don't know if this quotes his, but he was the first I
- 49:47first heard it from him. Which is like in, in academia,
- 49:52you write drunk and you edit sober.
- 49:54It's like the way to think about it, right?
- 49:55And then you go out for a beer and you're like, you write a
- 49:58bunch. So you remove inhibition, wake
- 50:00up the next morning, cold light of day.
- 50:01You look at it like this is the worst thing I've ever seen.
- 50:03And it's just much easier to edit than it is to, to write in
- 50:06a lot of ways, right. And, and I, I think of LM's as
- 50:09drunk riders a lot, right? They'll produce content no
- 50:12matter what through prompting. And then I'm happy to edit it.
- 50:14And so then if you, if you carry that through to a multi agent
- 50:18system to a booking, there's a level of drunk writing that I'm
- 50:23willing to edit, right? There is a level of information
- 50:26retrieval of cost of flights, cost of etcetera.
- 50:29So I I would be interested in a multi agent framework that is 2
- 50:34parts. One is my control and the 2nd is
- 50:37their control. And then personally I give and
- 50:40take because right now nothing's automatable because no one
- 50:43trusts it right as a broad point but some people trust it.
- 50:46There is a generation coming next who's going to trust it.
- 50:49There is a generation who has the most wealth who won't trust
- 50:52any of it, right? So, but what does it look like
- 50:55to personalise that? And I think that's a fascinating
- 50:56question of the sliding scale personally, of how much he
- 51:00trusts these systems. It's funny.
- 51:03That you mentioned that because I was literally today just
- 51:05listening to another podcast about how.
- 51:09Like sometimes. Removing yourself from your
- 51:12business can be the best thing to make the business grow.
- 51:16And it's almost like the the parallel here is like removing
- 51:20myself from this agent or all of these agents can be what
- 51:25actually makes it work and work better in that thought
- 51:29experiment. So I find that I find that
- 51:32fascinating. I do think that.
- 51:35You're always. Going to have to have the well,
- 51:39maybe not always You're going to want to see, you know, like
- 51:43you're going to want to see what's happening as it's
- 51:45happening just to kind of double check and know that it happened
- 51:52almost. And but I guess you could one
- 51:55part of seeing it could just be that you get the confirmation in
- 51:58your e-mail and you look at it and you go, alright, cool
- 52:02flights tomorrow then you show. Up to your first one and it
- 52:04works right. Again, I don't know how many of
- 52:07these going to work, but there there is a level, there's we all
- 52:09have a personal level of risk tolerance.
- 52:11And I think that there is interesting products that are
- 52:14going to be interesting systems in a friend of as a friend of
- 52:17mine who is post Series A I, I think I'm gonna leave them
- 52:22nameless just in case it's a problem.
- 52:23I don't think it would be, but they were like my job daily is
- 52:27I'm just a traffic controller, right?
- 52:29So like I don't do anything at anymore, right?
- 52:33And then deeply channel, but they've got to the point they're
- 52:35like, I'm really just a traffic controller, right?
- 52:37So I'm the most important person in the company because if I
- 52:39leave, everything crashes, but I don't do anything.
- 52:42And it's like I think about that with these systems.
- 52:44It's like, well, if you are just able, like what level of
- 52:47personal traffic control are you comfortable with?
- 52:49What level? Yeah.
- 52:50OK, so when you say removing yourself from your business,
- 52:52there's tears to it, right? So you remove yourself from the
- 52:54operations, but you're very necessary in terms of direction
- 52:57and control, whether that direction is immediate and in
- 53:01the moment or whether that direction those months ago
- 53:03through some level of SOP like I still think it's necessary to
- 53:06have that control and I think these systems are very similar.
- 53:10And where have you? Seen agents in your work
- 53:13actually working or have you found one?
- 53:17Best example. Was from GBT 3 and I think about
- 53:20this over and over and over and over and over again because it's
- 53:22like, how do you what we think a lot about like our North Star is
- 53:25getting people to production. And so we want to be the the
- 53:29factor for that. And I think the answer a lot of
- 53:30that time is some level of services and scoping in to get
- 53:33to the point. But like, what does it mean to
- 53:35put LM's in an existing revenue stream and speed it up?
- 53:39For example, when we talk about ideology, if if you produce a
- 53:42report faster and you get paid per report, then now it's like,
- 53:45well, if you have the master apprentice model, speed up the
- 53:48apprentices, right? Because there there was already
- 53:51some work being done in the legal example, speed up the
- 53:54speed up the apprentices. It was GPT three.
- 53:57It was a post and it was it was a user.
- 53:59I can't remember, but it was called writing GPT, right?
- 54:02This would have been early last year and it was an individual.
- 54:05I can't remember their name and it wasn't like a super popular
- 54:07post on medium, but it's going to be somewhere.
- 54:10I'm sure maybe, maybe it's gone really popular since I read it.
- 54:13But they were a photographer. They got early access to GPT 3.
- 54:16They were able to develop and they said I'm going to build
- 54:19several different. They didn't call them agents.
- 54:21They called it like almost like a board of directors.
- 54:23They were like, I'm going to prompt it and say, write me an
- 54:27article about this thing. Then I'm going to have a editor,
- 54:31an editor, right? And they're like, why can't I
- 54:32extend this? I'm going to have a grammar
- 54:34editor. I'm going to have a
- 54:36colloquialism editor. I'm going to have an EO editor.
- 54:38And then what I'm going to do is I'm going to say, I'm going to
- 54:41have another agent that is going to tell me where to put a photo,
- 54:45right? Where, where does the photo
- 54:46exist? So then they could be like, what
- 54:49are the top 10 washing machines of 2023, right.
- 54:52And three hours later, because at the end, it costs a bit of
- 54:55money, but three hours later, at the time, you'd have these like
- 54:57reinforced systems that would communicate with each other.
- 54:59And at the end they get a piece of writing that is colloquial,
- 55:04that is SEO optimised, that is well added and has good grammar.
- 55:07Then they would go out and take the photos.
- 55:09So it's an original piece of content now.
- 55:11Ohh, nice. And then they would get
- 55:12themselves to the top of like SEO blog stuff.
- 55:14And now they're making ad revenue.
- 55:16And so they can do this with anything they can do with
- 55:18washing machines, can do with tents.
- 55:20That was the coolest example I've I still haven't seen an
- 55:23example better than that because it was such a simple use and it
- 55:26was like, even if this doesn't work fully, like it doesn't need
- 55:29to be probabilistically, like it doesn't need to be perfect.
- 55:32They've created it. I think about this so much as
- 55:35like the board of directors, how do you do this?
- 55:38How do you reinforce? How often do you do it?
- 55:39But that to me was like a real trigger that I was, and this is
- 55:43before auto GT. So when that came out, I was
- 55:46like, this is going to explode. And then we never really saw it
- 55:47because of the probabilistic nature.
- 55:49But that was the coolest to me. That was like a real unlock.
- 55:54So talk to me. About why, how in these last
- 55:56couple of minutes and just. What it is?
- 55:59You're doing, because I from this conversation, I imagine a
- 56:02lot of people can gather that you know a bit about knowledge
- 56:06graphs. But it's I think the really
- 56:09interesting thing that you just said right there is you're
- 56:12highly focused on getting people to production.
- 56:15Yeah. Yes.
- 56:17So hot take. I don't know if people riding
- 56:22natural language and getting an answer back is the future of
- 56:25this stuff. I think a lot of people are
- 56:27like, I want to get my rag perfect.
- 56:28I don't think anyone really thought about what happens if
- 56:30they do. I think everyone stuck on that
- 56:31problem. And even if I think they get
- 56:33there, I'm not even sure what happened.
- 56:34But there are valuable business problems to solve, right?
- 56:38And as a business you want, I want to work on those problems.
- 56:42Like I, I've worked in, in tech for a long time, but I've worked
- 56:45in a lot of like heavy industry as a technical person, as a
- 56:49machine learning engineer and a large mining company.
- 56:51And so there are, they have a high reliability requirement.
- 56:55This valuable problem is interesting problems to solve
- 56:57there. So when we talk about getting
- 56:59people into production, we use knowledge graphs as a means to
- 57:01an end, as part of a broader workflow process to reliably get
- 57:07back the information that you asked for, right, consistently
- 57:10and reliably and overtime. And we do that through.
- 57:14Currently we have a closed beta, but it's going pretty well.
- 57:16We've had that out for a little while.
- 57:17We're releasing features like a couple of times a week.
- 57:20We're just listening to people talking to in our Discord.
- 57:23And so we're helping people and it's it's developer tooling for
- 57:26knowledge graphs. So it's helping people create
- 57:29these systems. It can give them more
- 57:30reliability. There's kind of broadly two
- 57:33types of production at the moment.
- 57:34One is like, I want you to improve my existing systems, but
- 57:38I don't know if there's that many people who actually have
- 57:40recused cases. Existing systems.
- 57:42I think a lot of people see us as a means to this is a
- 57:46difficult thing to say. It means to production, but not
- 57:49to, not to jump on the historical reference of that
- 57:51term, but there are way to get to a level of production because
- 57:54without a level of reliability, without a, without a low bar of
- 57:57reliability, we can't put this system in the wild.
- 57:59And so we work with graphs because we see them as the
- 58:04weakest part of the overall pipeline.
- 58:07And so we allow people to unlock that part, which then raises
- 58:11everything to the point that now we have a reliable system and,
- 58:15and so that's what we're working on.
- 58:18And that's how you. Can help people get into
- 58:20production. That makes a lot of sense, and I
- 58:22do. Man, it's.
- 58:24Like you're preaching to the choir here because I've felt so
- 58:27much of that Also where it's like alright cool the rag is
- 58:31fully optimised but turns out nobody actually uses the chat
- 58:35bot on our website so great job people haven't.
- 58:39Thought about that, like what does it mean to build the
- 58:42perfect chat bot? And it's like, do what really?
- 58:45What does it mean? And it's like, so for example, I
- 58:47worked with a large oil and gas company, but back when I was a
- 58:50consultant before I was doing this, this business and I was
- 58:53helping them build a leave policy like a leave, but someone
- 58:56could be like, how many weeks do I get off for paternity leave?
- 58:58It's give me the answer hallucinated like immediately,
- 59:00right? And they're like, and then
- 59:02everyone's like, Oh, this sucks. And so then it got scrapped as
- 59:04an internal project. They spent a bunch of money.
- 59:06We, we caught it early because I came in as a consultant when it
- 59:09was working. And I was like, this is never
- 59:10gonna work. By the way, if it did like, what
- 59:13did they solve? Yeah, it's like a.
- 59:15A little bit like not like it's not like a massive.
- 59:17So that I think that's an interesting way to think about
- 59:19this like if rag worked really well.
- 59:22So This is why we talk about multi agents because if they
- 59:27just ask you a question, get an answer and retrieval, I think
- 59:30he's like can be augmented really well.
- 59:32I love some of the search stuff coming out.
- 59:33I'm really looking forward to the the urban eye products that
- 59:36come out as a as a Mac user. But I do think that that's why
- 59:40agentic systems are the future, because if you can reliably
- 59:43create module after module after module after module, then you
- 59:46can just like Marcio Gillies to say this.
- 59:49It's like he was a lawyer for a while and he's like most white
- 59:53collar jobs are just like information retrieval and then
- 59:56reasoning and then information retrieval and then reasoning.
- 59:58And it's like that. You can kind of like you go
- 1:00:00away, you read some stuff, you make a thought, you give it a
- 1:00:02summary. And so like it's, it's workflow
- 1:00:05orchestration and it's these systems of creation that I think
- 1:00:08that if rag was 100% right, which means the agent is
- 1:00:12reliable. What does it look like to make
- 1:00:15a, you know, agent by agent composed workflow That I think
- 1:00:20is, is really interesting. And I and I think that part is
- 1:00:22why people are saying. Agents of the future.
- 1:00:25Those modular. Boxes.
- 1:00:26Yeah. And there's a lot that you said
- 1:00:30here I'm trying to take in. I think I'm gonna have to listen
- 1:00:32to this one a few times and just soak it up because it does feel
- 1:00:36like. There was some.
- 1:00:38Knowledge dropped on me here and I really appreciate all of the
- 1:00:43IT, the wisdom that you're bringing to this.
- 1:00:45It's super cool to see just that idea of OK, a chat bot can be
- 1:00:52useful, but how much business value is it actually bringing or
- 1:00:56what does it accomplish versus when you were talking about like
- 1:00:59the doctor getting? Their process.
- 1:01:02Speed up and I know there's a tonne of tools out there right
- 1:01:07now where they'll. Record.
- 1:01:10The conversation with the patient and the doctor and then
- 1:01:14like half or 90% of the doctor's time after they're with patients
- 1:01:19is just filling in all of the crap, all that paperwork that
- 1:01:23they have to do to get the insurance claims and whatnot.
- 1:01:26And so if you can speed that up, then they can see more patients,
- 1:01:30they can make more money. And that's actual, like there's
- 1:01:34very clear return on investment there.
- 1:01:37Not yeah. Like this idea of ohh, yeah, I
- 1:01:41now know that I have 11 holidays left.
- 1:01:44Yeah. It's like, I don't know, like I,
- 1:01:46I just, I think there are really valuable business.
- 1:01:48There's a lot of like win win automation opportunities in
- 1:01:53heavy industry. Definitely.
- 1:01:55I think Healthcare is a, a really, it seems to be an
- 1:01:57obvious one for it's well regulated industry.
- 1:01:59But you know, the people we speak to that we get purely
- 1:02:01inbound, like the variety of like, you know, earthquake
- 1:02:05preparation for hospitals in California and stuff.
- 1:02:08And like how valuable those problems aren't, how difficult
- 1:02:10they are to solve, but how, you know, in theory automatable they
- 1:02:12are and how modular they are is problems is like very
- 1:02:15interesting with this stuff. So yeah, I think those are the
- 1:02:19those are the interesting problems that that we really
- 1:02:21like to work on. I appreciate you saying wisdom
- 1:02:23as well. I'm not going to pretend that I
- 1:02:25I have a I've just, I work on this stuff a lot.
- 1:02:27So I have a bunch of comments. I want to thank Paco as well.
- 1:02:30He's the one who introduced us. And so that's genuine, genuine
- 1:02:33wisdom there. I, I think it is the type of
- 1:02:35person that I, I really enjoy speaking to, but yeah, that
- 1:02:38that's, that's how I see this shaking out.
- 1:02:40Maybe not loudly because I think it's difficult to write a post
- 1:02:44about it, but I think quietly and valuably is these processes.
- 1:02:48It's like, what was Linux gonna be when Linux released it?
- 1:02:52And it was like the new operating system.
- 1:02:54And what does it do now? Power every server that powers
- 1:02:57every GPU, the powers every, you know, like that.
- 1:02:59That's you think about these agent systems like those are the
- 1:03:02interesting problems I think. You said.
- 1:03:05Maybe quietly. I'm not going to write a post
- 1:03:07about it. And I just respond with hold my
- 1:03:09beer. Let's give back to you.
- 1:03:12Yeah, give back to you in a week.
- 1:03:14Let you know what I can do here. There's a lot of fodder for me
- 1:03:18to write some shit on LinkedIn about this.
- 1:03:21This is great, man. I really appreciate it.
- 1:03:23And I am going to take away this idea of be exactly wrong because
- 1:03:28if you can be exactly wrong, I really like that.
- 1:03:30That's where determinism starts and you get out of the weeds of
- 1:03:34this probabilistic. Well, it could be right, It
- 1:03:37might not be, but we'll see. That is huge.
- 1:03:41Some amazing. Use cases for probability.
- 1:03:43Some awesome stuff happening, but the problems I'm working on
- 1:03:46there, they can't be probabilistic problems.
- 1:03:48Excellent. Well, I appreciate this, Tom.
- 1:03:51Thanks so much for coming on here.
- 1:03:52If anybody wants to reach out to you, I know that you're on
- 1:03:54LinkedIn, so we'll leave your LinkedIn link in the description
- 1:03:59and or just go to why how dot AI and yeah find out discord server
- 1:04:06We got discord. We haven't newsletter, if you're
- 1:04:08not a Discord person, a newsletter is going well.
- 1:04:10CEO Cheers. Cranking out content.
- 1:04:12We're writing as much as we can about our learnings, doing our
- 1:04:15best to kind of build and show people what we're working on.
- 1:04:17So yeah, that is. Awesome, but I love it.
- 1:04:20Well, you've got yourself one new subscriber in me, so thank
- 1:04:24you very much. Thanks to Town for this.
- 1:04:26No. Worries man.