{"id":192,"date":"2023-09-29T09:09:34","date_gmt":"2023-09-29T16:09:34","guid":{"rendered":"http:\/\/www.barrybriggs.com\/blog\/?p=192"},"modified":"2023-09-29T10:58:27","modified_gmt":"2023-09-29T17:58:27","slug":"ai-whats-wrong-and-how-to-fix-it","status":"publish","type":"post","link":"http:\/\/www.barrybriggs.com\/blog\/programming\/ai-whats-wrong-and-how-to-fix-it\/","title":{"rendered":"AI: What&#8217;s Wrong and How to Fix It"},"content":{"rendered":"\n<p>Want to know how generative AI works?<\/p>\n\n\n\n<p>Imagine a newborn child. Now, just for fun, imagine that this child \u2013 we\u2019ll call him Karl \u2013 is born with the ability to read. I know, no way, but suspend your disbelief for just a second.<\/p>\n\n\n\n<p>So Karl can read. And by the way, he can read really, really fast.<\/p>\n\n\n\n<p>Now, just for fun, let\u2019s give poor Karl the entire contents of the internet to read. All of it. <\/p>\n\n\n\n<p>Task done, everything Karl knows is from the internet.<\/p>\n\n\n\n<p>Most infants learn basic, foundational things as they grow up. <em>\u201cHey look, I\u2019ve got hands! Oh wow, feet too! The dog\u2019s got four legs&#8230; and a tail\u2026and it barks!\u201d<\/em><\/p>\n\n\n\n<p>But Karl never learned these things. Karl only knows what he read on the internet. So if we ask Karl to write an RFP (Request for Proposal, a common business document) that\u2019s like others our company has written, he\u2019ll probably do a fantastic job. Why? Because he&#8217;s read zillions of them, knows what they look like, and can replicate the pattern. <\/p>\n\n\n\n<p>However, Karl can\u2019t get common-sense relationships, as Gary Marcus elegantly pointed out in this <a href=\"https:\/\/garymarcus.substack.com\/p\/elegant-and-powerful-new-result-that\">blog post<\/a>. As he notes, Karl may know that Joe\u2019s mother is Mary, but is unable to deduce from that fact that (therefore) Mary\u2019s son is Joe.<\/p>\n\n\n\n<p>Nor can Karl do math: ask him to calculate 105 divided by 7 and unless he finds that exact example somewhere in the vast corpus of the internet, he\u2019ll get it wrong.<\/p>\n\n\n\n<p>Worse, he\u2019ll very authoritatively return that wrong answer to you.<\/p>\n\n\n\n<p>That\u2019s a loose analogy of how Large Language Models (LLMs) work. LLMs scrape huge quantities of data from the internet and apply statistics to analyze queries and return answers. It\u2019s a ton of math\u2026but it\u2019s just math.<\/p>\n\n\n\n<p>In generating an answer, LLMs like ChatGPT will typically create multiple possible responses and score them \u201cadversarially\u201d using mathematical and statistical algorithms. <em>Does this look right? How about that? Which one\u2019s better?\u201d <\/em>These answers, however, are tested against patterns it finds \u2013 where else? \u2013 &nbsp;in the internet.<\/p>\n\n\n\n<p>What\u2019s missing, in this writer\u2019s humble opinion, is an underlying, core set of common-sense relationships \u2013 ontologies to use the technical term. \u201cA mammal is a lifeform that gives live birth and has hair. A dog is a form of animal. A horse is a form of animal. Dogs and horses have four legs and tails.\u201d And so on.<\/p>\n\n\n\n<p>LLMs need what is called a \u201cground truth\u201d \u2013 a set of indisputable facts and relationships against which it can validate its responses, so that it can \u2013 the word \u201cinstinctively\u201d comes to mind \u2013 know that the mother of a son is also the son\u2019s mother.<\/p>\n\n\n\n<p>Microsoft claims that Bing Chat leverages Bing\u2019s internal \u201cknowledge graph,\u201d which is a set of facts \u2013 biographies of famous people, facts about cities and countries, and so on, and this is a start, for sure. More interestingly, <a href=\"https:\/\/cyc.com\/\">Cycorp<\/a>, which has been around for decades, has built enormous such knowledge bases. And there are undoubtedly others.<\/p>\n\n\n\n<p>What I\u2019m advocating is that such knowledge bases \u2013 facts, properties, relationships, maybe even other things (like Asimov\u2019s <a href=\"https:\/\/en.wikipedia.org\/wiki\/Three_Laws_of_Robotics\">Three Laws<\/a>) underly LLMs. In the adversarial process of generating answers, such knowledge bases could, in theory, not only make LLMs more accurate and reliable but also \u2013 dare I say it \u2013 ethical.<\/p>\n\n\n\n<p class=\"has-small-font-size\"><em>(This post was inspired, in part, by this marvelous <a href=\"https:\/\/arxiv.org\/ftp\/arxiv\/papers\/2308\/2308.04445.pdf\">paper<\/a> by the late Doug Lenat and Gary Marcus.)<\/em> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to know how generative AI works? Imagine a newborn child. Now, just for fun, imagine that this child \u2013 we\u2019ll call him Karl \u2013 is born with the ability to read. I know, no way, but suspend your disbelief for just a second. So Karl can read. And by the way, he can read &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.barrybriggs.com\/blog\/programming\/ai-whats-wrong-and-how-to-fix-it\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;AI: What&#8217;s Wrong and How to Fix It&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"episode_type":"","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","date_recorded":"","explicit":"","block":"","filesize_raw":"","footnotes":""},"categories":[12,9],"tags":[10],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-ai","category-programming","tag-technical-computer-programming"],"_links":{"self":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":4,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":197,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions\/197"}],"wp:attachment":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}