Wisdom-Driven Knowledge Augmented Generation at Scale - Chin Keong Lam, Patho AI
Channel: aiDotEngineer
Published at: 2025-08-22
YouTube video id: 9AQOvT8LnMI
Source: https://www.youtube.com/watch?v=9AQOvT8LnMI
[Music] So, hi. Hi everybody. Uh, my name is Ching Kyong Lamb. Um, I'm the founder and CEO of PO.AI. Uh, a bit background about my company. uh PTO AI started two years ago with a invitation from National Science Foundation from the SBIR grant funding investigating LLM. We did a LMB driven drug discovery application. Uh since then we branch out to leverage what we learned about building AI system for large corporation. We are currently building expert AI system for several clients. Currently the system we build goes beyond rack system. Um many of our client is asking for AI system that perform task like research and advisory role based on their area of interest. Uh today the talk is about sharing with our fellow AI engineer what we learned so far building this kind of system. Okay. Uh what is knowledge? Okay. Generally philosophically I say knowledge is the understanding and awareness gained through experience, education and the comprehension of facts and principle. And that lead to the next question is what is knowledge graph? Right? So knowledge graph is a systematic method of preserving wisdom by connecting them and creating a network or interconnect relationship. That's important. The graph represent the thought process and comprehensive tonomy of a specific domain of expertise. That's why this is is very important for people moving forward is about AI system then think a lot and return uh advice instead of just retrieve you know data from your database right so that comes to the development of this uh K a okay what is K a kag stand for knowledge augment generations and it's different from rack okay it is enhanced language model by integrating structure knowledge graph for more accurate and insightful respond making needs smarter more structural approach than a simple rack. K a doesn't just retrieve remember it understand this is different okay after in interviewing a lot of my client okay so or we also expert in a certain area of scale I found that there are common ways of their thinking decision making process the way that make them expert in their area knowledge graph seems to be a perfect fit so here is the graph or state diagram if you're a computer engineering grad like So um it shows a wisdom the the wisdom note as you can see is the is a core right it's wisdom it just isn't static it actively guide decision and fused by other element the output from the wisdom actually goes to decision making in the blue right wisdom isn't passive it guide decision helping us choose wisely Okay. And then the decision making analyze the situation given in the circle in the uh green and decision aren't make you know in a vacuum. Okay. They analyze real world situation. That's the difference. Okay. So look at the wisdom input. Okay. Look at the relationship feedback from the knowledge to wisdom in gold color. Example of that is knowledge to wisdom like all your books smart and encyclopedia Wikipedia whatever you store plus once that data get absorbed by whatever model you use up there it need to regurgitate that and understand that's why it's very important that wisdom is able to synthesize the data after you ingested knowledge okay that's a kind of abstract but I I'll come come to that later what I'm talking about okay from Insight example of that is wisdom derive pattern from chaos like some of my client has a lot of social media they their product how do they you know track their product sediment from from social media right so it's okay chaotic and from ax tweet right so so from that you can see some pattern of their competitor versus uh current what my product is that that's like an example of that and I will go to that later okay when all these connected notes matter together why do they matter matter all the notes relate to one another to ever inre um enriching wisdom storing system. Okay, this talk is about storing wisdom, right? So knowledge tells you what it is, right? And experience tell you what worked before. Insight invent what to try next, right? Like a pizza knowledge is recipe. Experience is knowing your oven burn crust inside is like hey it is adding you know honey to the crust you make caramelize perfectly. Right? So the most important part of the knowledge graph is feedback loop. Okay, feedback isn't oneway street. It learn from itself. Look at the feedback from the uh going back to all the note from insight to wisdom. Okay. Um situation inform future wisdom. Experience deepen it insight sharpen it. Like a tree growing roots, the more effect the stronger it get. Now I want to ask you a question in general. Where do you see this circle in your life? Maybe a tough decision that you know taught you something. So one practical application for leadership is wisdom. Avoid knee jack reaction by learning from feedback. As for personal growth, ever notice how past mistake make you wiser? That's the loop in the action. All this. So the take away from the slide in this is wisdom isn't a trophy you learn earn it is a muscle you exercise the more you feed knowledge experience inside the more that guide you now I will show you how it being mapped to my current client you know all this is like very abstract right so how I one of my clients actually doing a competitive analysis uh they used to have a marketing department doing that but they want AI to do Yeah, right. They they ask me to build the system. This is exactly what I did with the same taxonomy of storing all this. So this taxonomy will be later on I talk about how multi- aent is going to handle all that. Here is one of the chatbot that I build for my client to do you know not just some uh we not just some chatbot okay it's our wisdom graph power AI designed to turn data into strategy right dominant. So what kind of question I talk about talk about how do I win my competitor in this market space that's kind of very sophisticated question right so without uh if you do simply just right by first speaker talk about right right so it's not going to cut it they're not going to able to answer that kind of question okay what I did is this uh we retain the same tonomy and uh the wisdom is then mapped the same engine here the wisdom engine wisdom engine is like a orchestration agent that does a lot of decision making including advising what the ARM is able to see bas on the current situation what to do next right so um what I did is uh for the uh decision making I map it to a strategy generator so these customers are talking about a competitive analysis right so um I map the knowledge in term of knowledge what do they have they have market data right so I map this experience to HP is one of a kind past campaign so they have a lot of campaign doing a lot of marketing and then um the insight is actually mapped to uh in industrial insight they have a database doing storing that and then of course the most important is is the the situation the situation is how how am I doing how my product selling right so so that that is like a situation and then I map that to a competitor weakness that means they say if you make the aware of that you probably get a very good answer and then the chatbot will probably be doing the right thing advising so from here very high level you know state diagram or there how do I map it to a system that drive well here comes the trick so anybody here heard of n all right all right it's all good so so I I first encounter similar situation when my past IoT project which is not red developed by uh IBM right so it's the same kind of thing it's like no code but but underneath the hood there's a bunch of code okay it's all nodejs code okay so uh but but for the for for for proving your concept and all that it's very very very flexible and I I highly recommend that and and and here here you can take a look at the the workflow the work from I enable the implementation of this complicated state diagram with um what I say is there is a different community note one of the very powerful node is AI agent well previously N is just a workflow automation tool I'm not selling for N here I'm just telling you I'm using it uh for pro prototyping further down the road maybe the client say too like I I really need to you know go lightweight maybe we will switch over to some other lang chain or whatever but uh we actually uses like I mapped the previous uh state diagram from the wisdom engine I actually map that to our uh wisdom agent okay wisdom agent is now have the option to drive uh different model like openai model entropic model and even onrem model and then that the key in making the state m the state machine work is that my wisdom agent is now overseeing like a supervisory agent or all these other agent that do uh whatever I say on the state diagram like um for example the uh state of uh going into a note of insight inside agent will test to do go to the social media look for all the settlement of all your product and then collect that and then pump that you can see that at the dot bottom that we I connected to a a centralized uh graph left the central graph will be able to get updated by different agent uh inside agent will update the their perspective like part of that graph for the uh as I say for this particular uh inside note. So, so all the unified knowledge graph will contain the taxonomy that eventually just think like the marketing strategies the way that here they will probably if you are doing manually they probably would think in your shareepoint will all this you know folder will store the same kind of uh you know wisdom I call it to make decision based on that. So the the final decision is LM also depend on the model that you use. Uh but I I I I pretty much think that not really the way that I think the final decision come when you make a right decision from the advisor output is basically depend on all the tonomy the graph structure that's very important. So come to that I I want to go deep down how I implement one of the node uh just to go a bit technical on this competitive node. How do I implement that? Okay, before I do that, okay, competitive analysis, right? Why why you can actually just use rag? Why do you want to use a knowledge graph like new forj? Well, if you ever being asked that question, tell them these five uh five reason. Okay, first reason is knowledge graph you know u system excel at capturing and representing complex relationship between entities that is covered by the first speaker but I'll just reiterate that this lead to a deeper contextual understanding which is crucial for comparative analysis where this in this case the insight can be significant different okay you want to find the gap in your computer winners this is very important the second is improve accuracy by leveraging structured data and semantics relationship knowledge graph can provide more accurate and relevant information compared to traditional vector racks. Um this ensure generated content is not only relevant but also precise and reduce the noise and improve decision making making this in this case the board is supposed to help the guy that is marketing department make decisions. So, so you better make this work improve accuracy. Any inaccurate data, you will be out of the contract, out of the door, right? So, very important. Okay, you're talking about contract work like me, I have to make the rack as accurate as possible. So, the third is scalability and flexibility. There graphic you know graph are incredibly scalable and can integrate to new data source and relationship. The flexibility allow the continuous improvement. As I say, if your taxonomy is correct, you will continues to improve and and reach, right? So, so that is important and also rich query capability. Knowledge craft support complex query traverse to multiple relationship entity provide richer and more detailed insight. This is particularly advantage for competitive analysis when multifacet query like like what the first speaker say it is super a notoriously good in answering things that normal rack will fail. It's like multihop question. Okay, this is very important. And then the final one is the enhanced data integration. Uh knowledge graph can seamlessly integrate diverse data source pictures, graphics, videos. Uh however it is now that LM is so powerful we have OCR capability can do that as long as you have a right structure of the graph semistructure unstructured the holistic approach ensure compressive view of the competitive landscape enable more informed strategic decision making. Okay. So one of the this is I'm going to just very briefly go through this just a uh example of that some of the thing like um problem of a vectors rack you know vector rack is really really bad in answering limited numerical resing vector store excel you know at sematic sim similarity but struggle with complex numerical calculation this is why uh for marketing analysis uh that I'm building the chatbot for uh they actually rely on number instead of just you know returning example like this kind of if you ask like what is the Apple uh revenue uh between uh two uh you know what's the revenue in 2022 they probably will give you a bunch of this kind of a passage right retrieve a graph instead of uh this kind of a very very precise thing like uh the answer is uh you know uh got knowledge cross able because the the data is already there in structure form the data source assume a knowledge gra name this particular in this particular case Apple financial data the query will be able the query engine will be able to select the the revenue figure from 2021 to 2022 and and then do a function call the function call will eventually give come out with 15.23 23 which is exactly what the marketing guy was looking for a very quantitative stuff that most of the decision were based on that because you have the evidence not just some passage that you retrieve from the data it's basically evidence based decision making is very important for this kind of uh complicated rack system that you know so um there's a jungle out there right now you can use different kind of a uh uh uh thing to build your uh you know uh this is just a snapshot of that you know you can actually use lang chain plus chroma to to build your own rack and then you also can combine that with your knowledge graph depend on on on your user case. Okay, if if this this slide show that the rack and the k a can be bu with money. Okay, I adopt that wisdom graph in red color. Normally you will see if client is just asking for a simple rack that perform product information query, you can just use a simple chroma DB with LM agent. And if you start to ask so complicated questions like how can I beat my competition based on my current market share. Well, this will be able the the the the thing that I will probably be adopting is knowledge graph here with uh graph DB plus cipher query and then qua and also train my rack to perform several loop of uh we call multihop query and this probably will give you a very good answer. So uh and then it come to the another question when I was trying to extract my uh oh I think my time is uh is almost up. Okay. So anyway this is like to say uh the first speaker talk about the extraction right there's a very simple way to extract on the right side is like automated totally automated LM graph transformer on the left is like manual I would probably re recommend to send the hybrid model which is like after you use the LM to extract your graph you ask the interview the the expert that you're going to build uh to to build your taxonomy right to prone the graph we call it proning your graph remove a lot of relationship that then that that will be okay and um I will try to just highlight like this this is the result of benchmark that we did okay anybody ask you you know why you want to use graph right or k a okay first is accuracy I had achieved 91% because it's really good in extract structure second is flexibility 85% third is repubity reproducibility deterministic and then the fourth one traceability and finally uh most important is scalability so in conclusion by leveraging structure nature of western knowledge We can significantly enhance the quantitative capability of K a system and a more accurate and insightful respond to complex query by using wisdom-driven system as highlighted. Together we can build smarter AI system that can scale and store wisdom with the right framing potentially surpass the intelligent of the initial expert that we meant to serve. So uh talk to Jesus. You know what do they just do? Talk to Jesus. He's in our in in a not booth. this my good friend and uh anybody that want to build graph we have a good uh so-called LLM graph rack stack on GitHub that is sponsored by new forj and out of the box just spin up your docker the next thing you know your text is going to be converted to your graph and you can start happy pruning your graph thank you thank you so [Applause] [Music]