DappCon 2023: Trusted AI with OriginTrial Decentralized Knowledge Graph and Gnosis - Branimir Rakic

DappCon 2023 · September 2023 · 29:03

At DappCon 2023, Branimir Rakic presents a talk titled 'Trusted AI with OriginTrial Decentralized Knowledge Graph and Gnosis,' part of the event's AI track. Gnosis is an Ethereum-based ecosystem that includes the Gnosis Chain network and the Safe smart account infrastructure.

Speakers

Topics

From DappCon 2023, hosted by Dappcon Berlin.

Transcript

can anybody he oh okay there it is hello everybody thank you for staying for the last talk I'll try to make it interesting um and I'll try to give you a demo at a certain point of something that I suppose might you might find interesting and then we go all together for beers I suppose um all right so um I'm brir I'm one of the founders of origin Trail and the CTO of company called Trace slabs where core Developers of origin Trail today I'll explain something uh which is a decentralized Knowledge Graph how does that work with blockchains and nosis in particular and what do we uh mean by this term trusted AI it's popping up all over the place

just a quick kind of question um does anybody know anything about knowledge graphs have you ever heard of knowledge graphs before by a show of hands there's like two nice three oh awesome that's actually pretty pretty high you wouldn't expect um so okay I'll I'll try to give a little bit of an explanation on it but I'll kind of stay high level so that we don't dive too deep into the deck but I'm here and there's beers outside so if you want to go really deep we can go as deep as you want uh I suppose after the talk um okay so moving on um what do we mean by this trusted AI why why do we need it well you've surely seen this guy um Jeffrey Hinton The Godfather of AI leaves Google because once he invented

basically llms he got scared of his own mention very good reason um and the big reason is that it can very quickly start turning in a lot of uh very very um questionable information and can do questionable things and one example you might have seen on Twitter is this lawyer who used Chad GPT to sort of come up with his um you know case and turns out that Chad GPT threw a bunch of um non-existent things at him so he used a bunch of quotations of different um you know non-existing cases in court and now he's actually in sort of trouble because of that going to court to explain himself

um so this is one example of how AI can very easily generate misinformation probably that person didn't have bad intent like they wouldn't do this they just didn't catch it so they probably in the rush we're all in the rush with time right um but even without AI like the world has been full of fake news and misinformation all along for for you know who Longs how who knows how long so really the key problem here is that when you add AI into the mix the problem of misinformation becomes worse it goes even like basically exponential very soon AI is going to generate most of the content online there's going to be some Tipping Point where more content has been generated online by AI than by humans and then if we don't have some way to to tame this then we are

basically screwed so um essentially one one of the good um good things about us all here in web 3 is that we build on The Primitives of trust so we believe that an overflow of misinformation really trusted data is what we have to rely on and that becomes the Cornerstone of of everything so um I actually hear to make a case that we're part of a of another of the third knowledge Revolution the first one was there to solve scarcity so we had knowledge that was basically in a few places some libraries mostly churches and uh we didn't have an easy way to replicate it and then boom the printing press comes replication solves the problem scarcity

and essentially the humanity changes completely because we get the entire Renaissance and all of the the amazing movements that started from there and uh the world changed completely uh just because we could replicate knowledge easier then we got into the internet Revolution which solved the fragmentation problem through connectivity people uh who are building all of the networks the layers of the O OSI stack uh everybody from ethernet Bob medf to Tim bernes Lee or worldwide web or web one or whatever you want to call it up until to us now building web 3 basically we helping make things more connected right and then the final frontier right now in this new knowledge Revolution is obviously trust I'm surely preaching to the choir here um and the

way to solve it with with AI is to essentially Infuse AI with decentralization so I'm pretty sure that this is kind of um completely fitting to to this audience um however I want to mention that this is indeed going to be a true Revolution because we've never before had the opportunity to create large amounts of knowledge and content at scale that can be trusted so um I'm going to show how we at origin Trail have been building this for several years um but one of the the main pitch I want to make here is that knowledge is a new asset class and um the idea of being able to tokenize knowledge is going to bring an immense amount of value into the ecosystem the planet um and actually

for those of you who know about knowledge WS maybe you know about them because a lot most web to Giants use them uh Netflix Google Uber Amazon you name it they basically aggregate all of the data about whatever we do watch shows buy things on Amazon and whatnot they aggregate in these graphs and because this is actually pretty mature technology has been started by that guy Tim berners Lee uh over 20 years ago and has been developed through Academia for a very very long time um they actually managed to take their that data and create immense amounts of value uh and that's why U we believe they are one of the biggest companies in the world today because they they have just like a ton of not just data but very organized data and that is this this transition that

makes it go towards knowledge um so just a PR if you haven't heard about origin Trail before uh we've been U around since quite a while um back in the day almost 10 years ago the three of us Founders started a centralized proprietary business where we were helping U track knowledge actually connect knowledge about Supply chains so a lot of people still think about origin 12 we through that lenss uh 2018 we completely open sourced everything we decentralized we built a this decentralized knowledge graph uh technology which is a multi-chain uh technology I'll explain very soon and it's now free to use anybody can run so and um after that obviously the whole project grew so so it was a good choice

and today we have a few cases just I want to mention of different Enterprises that adopted the origin Trail for example the US retailers um Walmart Target Home Depot through this Association Scan they use origin Trail to exchange knowledge about Factory audits that actually cover 40% of imports in the US this other case is rail travel safety Swiss Railways has been our partner for several years now so they basically use origin Trail through interfaces um then we have a bunch of food and beverage companies and pharmaceutical companies also using essentially the decentralized knowledge we have to exchange and connect information uh and it's all happening on several blockchains so origin 12 started uh 2018 on ethereum expanded to nosis

and polygon uh recently also to poad do so um it's basically multi-chain decentralized Knowledge Graph and what are these knowledge assets these knowledge assets are basically if I were to explain it the simplest possible way they're knowledge nfts so you can create mint uh your knowledge nfts or knowledge assets and when you do that you obviously own the nft um and with this ownership of the nft you're able to manage that knowledge so that means I can update it let's say I create some sort of piece of knowledge that describes I don't know my shirt um and says like this shirt has been you know worn several times and it's all sweaty because it's super hot here in Berlin um anyhow I can put all of this knowledge inside and then I can maybe give it to

somebody and then I can also give the nft or or not then whoever has the nft has the ability to add additional knowledge inside so it's like your git repo or and and you're the admin right um and once you create and own your knowledge then you can put it in the decentralized knowledge graph and make it discoverable what does that mean well you can Discover it in different ways I'll show you this interface that you see on the on this animation basically this graph of knowledge behind the nft and uh and you can do all kinds of interesting queries on it because it's a fully fledged database basically Sparkle uh ready database arle is the standard which is like graph SQL sort of I don't like graphql but it's it's actually more descriptive and Powerful so you can ask

anything really um and finally you can verify all this information because when it was minted you got basically a transaction on chain you see who minted it and you see if it was transferred to anybody who updated the knowledge so there's what we like to call a verifiable origin and information Trail see the pun uh so anyway um this is basically kind kind of the the key three value propositions of knowledge assets and then once you have this you can build very interesting trusted AI systems on top and I'll show you one if I manage to connect the laptop in a bit um but essentially you can consider this as kind of a decentralized knowledge database uh that sits on multiple chains and whatever you want to publish your knowledge for example noses you can mint

this nft there and then use it um this is a standardized nft by the way so what does this look like from like a super high level architectural perspective we have three layers there's a consensus layer really blockchain layer where you have multiple blockchains and then then this decentralized knowledge graph is Layer Two think of it as kind of like an ipfs Network it's not a blockchain it's rather a bunch of nodes that are peer-to-peer connection and they are uh coordinated through this origin TR protocol that we've been building we're currently in version six so we iterated quite a lot we learned a lot on mistakes and and now it's it's actually pretty cool um and then uh on top top of that this sort of layer of knowledge asset applications so applications that you

can build that use this knowledge and um like I said the key primitive is knowledge assets we have this new type of um identifier called uniform asset locator which actually is um a combination of a w3c did if you ever heard of decentralized identifiers and this um identifier in the in the graph and what's cool is actually we're right now um essentially developing the idea on how to incentivize growing knowledge in the decentralized knowledge graph so we launched an actual blockchain for that uh on padot it's called origin 12 pair chain as pair chains on PKA do and the the kind of the qy utility of the token on it of it is to reward quality

knowledge introduction into the decentralized knowledge graph there's a lot of different technical use cases search for example Discovery question answering systems knowledge marketplaces U aggregation of knowledge and so on uh that you can use the tech so for so it's pretty pretty widely applicable um and this is how a knowledge asset actually looks like so on the blockchain we actually have this nft and knowledge State proofs a state proof is nothing but a Merkel Merkel hash basically of the knowledge and the knowledge here if you ever seen Json LD before or Json you've probably seen well Json LD is just like an extension of Json which the LD stands for link data and it provides some additional capabilities including

like adding schema and context to it so basically the knowledge is in some form it can be this but it boils down to this rdf and then this is the UL an example it's a did that has an address of the contract and the token that represents it um which basically then you can use to to fetch this from the network then we also have a knowledge proof which is basically a Merkel hash so you can you can basically say you can take an arbitrary size knowledge can be a megabyte which you wouldn't be able to fit on a chain of course but you can Pro provide proof to the chain that certain piece of knowledge or statement is included inside of this knowledge asset and of course all of that sits in the dkg index so basically you can spin up a node over the dkg and you can query all

kinds of things in this traditional LGE graph way so it's we haven't invented anything we just like basically took all of the the cool standards that w3c has been pushing through and what's cool about this is these knowledge graphs are actually this Old Branch of AI it's called symbolic Ai and this What's happen happening now is this new Branch the neural AI the the large language models and they fit really well together actually symbolic um has this as you can see on the the screen has this sort of graph representation thing um it's highly structured the neural side of it actually doesn't require structure data you can throw at it text um or images and then it kind of learns uh but when

you combine both you actually get some really really cool things that you can do with machine learning for example you can uh you can com add additional knowledge to the knowledge graph by predicting certain relations or completing the knowledge graph as they call them and that's why for example this graph machine learning is very useful for drug Discovery things like that where you have a very specific problem that has certain structure uh actually molecules are really good candidates to to model with a graph so soci social networks as well um and and so on many other different uh types you'll see graphs everywhere pretty much um so there's actually an ongoing integration of origin Trail decentralized M graph and noses chain

and that's that's actually happening through a set of rfc's um in the origin Trail ecosystem couple of use cases that are particularly interesting here are really because the guys from noses have been I don't know if you've seen it but they've been doing some very interesting things with with the AI agents um the idea there is that um AI agents vote actually help prediction markets of noses be more efficient ient so instead of like relying on people you can actually run AI to go and you know buy outcome tokens the idea here is that outside of them just searching things on the web and maybe running into some misinformation or getting tricks somehow they can use this trusted knowledge uh in the graph and verify use that

basically to verify the source of information and to have that as input for for the decision um but also they can go the other way around so we can essentially publish predictions about some event in the future uh from from the prediction Market into the knowledge graph so you can make sort of a a Knowledge Graph grow in Into the Future so you can query the future literally through through uh a graph querying language um M assets can also be observed as sort of a semantic Oracle so instead of having an oracle where uh something puts like a like a number into contract like kind of current price of a token you can actually have um let's say an oracle that says if three different issuers issued the same information like

I don't know that certain building has certain energy certificate or something of that sort there's been multiple attestations um then execute a transaction and you can literally just create these proofs the Merkle proofs of these attestations you can shoot them in um in a contract and they can come from an know asset and basically you can verify the source and the actual uh the actual content um an example architecture just so we kind of have a high level look and it starts from the wrong direction it start from the right so you have some knowledge source and then you essentially you can create your knowledge assets you can do it through a node you don't have to do it through An Origin Trail node you can basically you can consider it as an RPC some node somewhere needs to broadcast your

message to the network but let's say you do it through a node and you have this knowledge Bank application as we call it essentially what you can do is you can put a bunch of this knowledge inside your your knowledge Bank you can also create embeddings just as in this example I showed um and then you publish these knowledge assets On the Origin to lkg that meanss knowledge assets with stay hashes on for example on nosis and from that moment on you can go and discover basically it's like a big search index you can you can discover knowledge by doing queries by knowing U's by finding U's in different uh existing knowledge that you have and then for example some of the things you can do you can determine intent intent of a certain question I'll show you that in a second I'm super quick running out

of time so I'll show it in a bit you can determine intent of a vector similarity search like you ask a question uh I don't know is this building certified and then uh this intent you can use for example some Vector database uh but you can also figure it out from just the context and you can do Knowledge Graph queries you can do Vector similarity search in combination you can check the Integrity of this on chain and then you can execute some transaction whatever for example buying outcome tokens by by the the AI um agents in nooses and I'm going to try and show you one such an example of an application just so I can plug in this um this HDMI quick of a chatbot which we actually are working on

for it's not really a chatbot I I'm already saying it wrong um but um okay something's over there do you guys see that it's like a no internet nice yeah so sorry about that is it okay if we cross like a minute or two since I'm last sorry for this is it okay I just need like a maybe an extra minute over

time okay so I'm just going to connect to my phone uh um okay [Music] so or not yeah there it is okay so this is like a a simple application and I somehow triggered this question what farm does lot r152 come uh this meat come from imagine me picking up a piece of meat in the store we actually have this partner and we first app we built 10 years ago was centralized old school app you would scan this and it would take from a SQL database information about where does this come from because we were getting this in real time and we would show it to the people and people were like wow know 10 years ago scanning something with a qu code was unusual um

but the problem was ever since you know bigger supply chains and bigger problems were here was hard to get all of this information um and to quer it from a SQL database especially um that's kind of a technical thing I can explain why why graphs make a lot of sense today imagine if I took a phone and scan this product and I come up with this interface that allows me to to chat with a piece of meat and I asked it okay where does this particular lot come from and it actually went into inside of the graph and queried the graph so you can see these um graph statements here it says product ID is that and this is the farm owner and it's kind of like a key value but rather triple store it's like actually has subject predicate object instead of

key value and when you finds images it displays images and so on and this comes from these Source knowledge assets and I'm going to open one just so you can see them so this is a the dkg Explorer it's kind of like your blockchain Explorer but for for knowledge assets and essentially it um okay I didn't click on the right thing but I can open up any one for example this one uh it loads these these graphs basically this is a knowledge asset I I can zoom in and I opened something different I open I didn't open the exactly the same thing I opened the the last one that was published on the network but it's a as you can see it's a graph of information it has certain structure and it it has um a bunch of

knowledge assets that you can connect to each other has this nft that represents it I'm going to open up a this is basically a block Explorer on on Origin 12 par in testet which shows you basically that this was created 4 days ago um and you can get all of this uh like I said all of this verifiable uh information of the source on on the Chain uh however I wanted to pick it out here ah this one yes so for example you'll see here A bunch of connected knowledge assets these are this is one knowledge asset and if I open another one if I click here it fetches it from the network and the graph pretty quickly grows into this very complex structure of different information and this is by

the way information on traceability on the production on the certification but what you're seeing is really just where the data comes from in this application here so when I when I asked the question and I can ask it again for example I can ask is this meat organic if I click here it's like I typed it it actually goes inside of the graph he understands my intent it's looking for an organic certificate and it actually says okay I found this product with this certificate owner and this is the certification if I click on the link it shows me the link of the actual website um and basically has a bunch of information so essentially it helped me query the graph it wasn't AI generating anything was AI extracting maybe you heard of retrieval

augmented generation well this is not even generation this is just retrieval uh assisted by AI we can also do retrieval augmented Generation by basically just adding the llm in Loop so if I do the same question is this meat organic um and basically just use this mode here chat uh the same information is just going to be sent to in this case in this example application chat GPT so now it's not going to look like well let's say it's going to look nicer for humans it says yes the meat is organic but actually what what we sent to CH GPT was this wrapped in a prompt we said make this nicer for humans um and the whole point here being is that all of

this information doesn't just come from some llm you know thinking because it like you know it's a really good guessing machine and figuring out what's the next word it's actually looking into a set of knowledge that was created from a certain Source or potentially curated by Community let's say you are founder or somebody who's part of a blockchain community or a big very deeply invested person in it you could create knowledge assets about your community you can have uh such an interface where people can ask things but not get answers from some random people or random sources online rather get answers from exactly the source who actually the community um um which the community C curates and and creates um so this is a very simple example we have a bunch of examples on

how to build such things um through something and I'll finish with this if I can get back the presentation that would be amazing I have one more slide is it okay nice all right actually that's the last slide but uh I'll show you one before I hope which is there's there's a dark slide can you show my dark slide please I promise it's worth it uh okay I'm just going to skip to it super quick um yeah so we're building this of course together as a community so we're offering a grant uh program it's called chat dkg well uh if you scan this uh

this QR code you're going to get there basically what you're going to see is a GitHub repo with a bunch of examples how to build the what I just showed you uh with different Technologies we partnered with uh AI startups in the US such as Milos they're one of the best uh Vector databases around open source as well Google uh folks from from different um areas and we have several Builders already building uh their Solutions with origin 12 knowledge assets and AI basically the criteria is you have to build something useful has to be open source and uh the the grant is open so you can feel free to apply if this this seems interesting um and yeah help us fight misinformation um I'll end with this

quote thanks a lot and sorry for exceeding the time thanks it do we have thanks a lot for the talk I have bunch of questions so I start uh testing them just first of all you you mentioned knowledge Marketplace so what is your plan with pricing knowledge and what mechanism do you have for pricing second is how where do you store the data and also there is the all the links that you have also data on top of them which are not necessarily in the knowledge asset where do you store it and how the quy

works and third question uh can we build personal knowledge graphs for this and build privacy on top of it all great questions um I'll try to be quick but we can totally chat some more on the in depth if you want if we're staying later so first one was uh knowledge Marketplace um so we've done a lot of Pilots actually uh with prototyping knowledge marketplaces um we've done things which which are based on trusted knowledge exchange so meaning you can create knowledge assets which have private knowledge in them how can you do that well basically because knowledge is just a bunch of triples it's literally key value value or rather value value value

three values you can split it in in two two sections if you have a knowledge Bank let's say you as a person run this knowledge bank or something sometimes we call it knowledge wallet in the context of knowledge Marketplace you could put these private private triples inside however when this hash gets produced they get included in the in the hash so you can prove to me that at some point basically this was part of your knowledge asset even though some data was Private um what's interesting to put in the public domain is really for this discovery um line the first L line that starts from the agent um because that's something obviously if you want somebody to discover something like you search on Google some indexing material has to be

there so that it can be discovered but you can put a lot of stuff private stuff actually a lot of most of the Enterprises they use this feature of private knowledge in the knowledge assets all the time because they are not allowed to share a lot of the information publicly um so so for some of them the knowledge assets just contain a little bit of metadata in the public domain but there's a ton of it in in the private domain um and having that said this is obviously a prerequisite for knowledge Marketplace is you cannot sell something that's public right um what we've been building is basically smart contracts based on we found a protocol developed by um couple of universities it's called Fair swap we didn't invent it they the guys basically Pro that it works and it's a really cool

system which uh uses something called proof of misbehavior so let's say I have knowledge in my private knowledge I can you want to buy it uh you would lock some tokens in the solidity contract once my node knowledge Bank SE that you've did it um it sends you an encrypted version of this knowledge and then supposed to send you a key actually to to decrypted the keys is supposed to be sent through the contract so the contract can understand that I try to trick you or not basically and if by not being able to decrypt the the knowledge uh somehow I kind of sent you laurum um you would be able to send this proof of misbehavior to the contract that would understand aha this is actually not what was supposed to be

solved so so we have some of these Primitives pretty well tested they're already in solidity um and we uh we have it in in our road map to go into productive uh knowledge marketplaces within a relatively short timeline so likely happening uh already some some of it happening this year and and most of it next year so this is definitely something that that is a big uh big next step for for G um again a lot of code we have we have a bunch of info so I can share some more later um what other question did you have you have privacy you had knowledge Marketplace and I guess I will catch you afterward okay awesome thanks thanks a lot but happy to talk it's it's all all great questions

there's two three thank you I'm sorry but we I'm sure that you absolutely guys I'm here we just need to get something called because as you can see I'm like the sweatiest person in this room okay so thank you all for your time I hope you have enjoyed the talks and see you tomorrow