{"id":34041,"date":"2023-11-30T03:00:00","date_gmt":"2023-11-30T11:00:00","guid":{"rendered":"https:\/\/insidebigdata.com\/?p=34041"},"modified":"2023-11-28T14:04:20","modified_gmt":"2023-11-28T22:04:20","slug":"what-is-a-rag","status":"publish","type":"post","link":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/","title":{"rendered":"What is a RAG?\u00a0"},"content":{"rendered":"\n<p>In the Large Language Model space, one acronym is frequently put forward as the solution to all the weaknesses. Hallucinations? RAG. Privacy? RAG. Confidentiality? RAG. Unfortunately, when asked to define RAG, the definitions are all over the place.&nbsp;<\/p>\n\n\n\n<p>RAG stands for Retrieval Augmented Generation. At the core, RAG is a simple concept. However, it is a simple concept that can be implemented a hundred different ways. \u2026and that might be the problem. RAG is often defined as a specific solution &#8211; while in reality, RAG is an approach that has multiple implementations.<\/p>\n\n\n\n<p>At the core, RAG will take an open-ended question &#8211; that relies on the training data of the model to give you an answer &#8211; and turn that into an in-context question. An in-context question includes everything needed to answer the question &#8211; within the question itself.<\/p>\n\n\n\n<p>For example, an open-ended question can be: \u201cWhen was Obama the President of the USA?\u201d. To turn this into an in-context question, a list of the periods of all US Presidents might be supplied, together with the question: \u201cThis is a list of the presidents of the US and the periods they were in power, use this to answer when Obama was the President of the USA?\u201d<br><br>Another example is the open-ended question: \u201cDoes my travel insurance cover rock climbing in Chile?\u201d There is no way an LLM has any knowledge of what insurance company you have, what particular insurance that you have, and the specific policy of that insurance. However, if one retrieved the appropriate policy, and supplied the policy as context together with the question, \u201cDoes this specific insurance policy cover rock climbing in Chile?\u201d Then they will have turned the open-ended question that can\u2019t be answered by a large model, into a specific question that can be answered.<\/p>\n\n\n\n<p>In the process of turning these open-ended questions into in-context questions, there needs to be an orchestration. This orchestration includes a retrieval step, where content that might include the answer, is retrieved and added as a context to the question. Then it\u2019s sent to the LLM.<\/p>\n\n\n\n<p>The retrieval step can be implemented as a simple keyword search in a search engine, or a semantic search in a vector database &#8211; or even a series of steps where content is retrieved from a knowledge graph. RAG is just any solution adding the retrieval step. The important aspect here is that the data being retrieved does not need to be part of any training data for the large language model.&nbsp;<\/p>\n\n\n\n<p>A lot of business logic can be added to that retrieval step as well. Searches and queries can be constrained to a specific set of documents, or according to privacy and confidentiality rules. The retrieval step can be local and on-premise, while the answer portion can be using APIs or cloud-hosted models. Just keep in mind that the retrieved content must be sent together with the instruction to the large-language model.<\/p>\n\n\n\n<p>The hype around RAG as an eliminator of LLM weaknesses is partly warranted. One can greatly reduce hallucinations, one can use their own enterprise data and answers can be more grounded in factual data. However, different categories of questions are better solved by different implementations of RAG. Enterprises need to evaluate what kind of questions they expect, and what kind of source material contains the answers, and then they can build what can become complex orchestrations to implement the appropriate patterns for RAG. Suddenly, it\u2019s a project that needs domain experts, developers, data scientists, quality assurance, testing, and lifecycle management. It becomes an IT project.<\/p>\n\n\n\n<p>It\u2019s also not the end-all of useful LLMs. RAG can still hallucinate, it just hallucinates a lot less. RAG is also a question-and-answer technique &#8211; it can\u2019t magically call APIs, create plans, or reason. Outside of Q&amp;A, there are other techniques that might yield better results.\u00a0<\/p>\n\n\n\n<p><strong>About the Author<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"150\" height=\"150\" src=\"https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/11\/Magnus-black.png\" alt=\"\" class=\"wp-image-34042\" srcset=\"https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/11\/Magnus-black.png 150w, https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/11\/Magnus-black-300x300.png 300w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/figure><\/div>\n\n\n<p><em>Magnus Revang is Chief Product Officer of <a href=\"https:\/\/openstream.ai\/\">Openstream.ai<\/a>. With 25 years of rich experience in UX strategy, design, and groundbreaking market research in artificial intelligence, Magnus is an award-winning product leader. As a recognized thought leader in the fields of UX, AI, and Conversational Virtual Assistants. Magnus Revang leads Openstream\u2019s Eva\u2122(Enterprise Virtual Assistant) platform working with customers and driving the future of the platform.<\/em><\/p>\n\n\n\n<p><em>Sign up for the free insideBIGDATA&nbsp;<a href=\"http:\/\/inside-bigdata.com\/newsletter\/\" target=\"_blank\" rel=\"noreferrer noopener\">newsletter<\/a>.<\/em><\/p>\n\n\n\n<p><em>Join us on Twitter:&nbsp;<a href=\"https:\/\/twitter.com\/InsideBigData1\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/twitter.com\/InsideBigData1<\/a><\/em><\/p>\n\n\n\n<p><em>Join us on LinkedIn:&nbsp;<a href=\"https:\/\/www.linkedin.com\/company\/insidebigdata\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.linkedin.com\/company\/insidebigdata\/<\/a><\/em><\/p>\n\n\n\n<p><em>Join us on Facebook:&nbsp;<a href=\"https:\/\/www.facebook.com\/insideBIGDATANOW\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.facebook.com\/insideBIGDATANOW<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this contributed article, Magnus Revang, Chief Product Officer of Openstream.ai, points out that In the Large Language Model space, one acronym is frequently put forward as the solution to all the weaknesses. Hallucinations? RAG. Privacy? RAG. Confidentiality? RAG. Unfortunately, when asked to define RAG, the definitions are all over the place.\u00a0<\/p>\n","protected":false},"author":10531,"featured_media":33064,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[526,115,182,180,67,268,56,97,1],"tags":[437,1245,1248,1425,96],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is a RAG?\u00a0 - insideBIGDATA<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is a RAG?\u00a0 - insideBIGDATA\" \/>\n<meta property=\"og:description\" content=\"In this contributed article, Magnus Revang, Chief Product Officer of Openstream.ai, points out that In the Large Language Model space, one acronym is frequently put forward as the solution to all the weaknesses. Hallucinations? RAG. Privacy? RAG. Confidentiality? RAG. Unfortunately, when asked to define RAG, the definitions are all over the place.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/\" \/>\n<meta property=\"og:site_name\" content=\"insideBIGDATA\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/insidebigdata\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-30T11:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-28T22:04:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/08\/Neural_net_shutterstock_1615182352_special.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@insideBigData\" \/>\n<meta name=\"twitter:site\" content=\"@insideBigData\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/\",\"url\":\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/\",\"name\":\"What is a RAG?\u00a0 - insideBIGDATA\",\"isPartOf\":{\"@id\":\"https:\/\/insidebigdata.com\/#website\"},\"datePublished\":\"2023-11-30T11:00:00+00:00\",\"dateModified\":\"2023-11-28T22:04:20+00:00\",\"author\":{\"@id\":\"https:\/\/insidebigdata.com\/#\/schema\/person\/35a290930284d4cdbf002d457f3d5d87\"},\"breadcrumb\":{\"@id\":\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/insidebigdata.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is a RAG?\u00a0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/insidebigdata.com\/#website\",\"url\":\"https:\/\/insidebigdata.com\/\",\"name\":\"insideBIGDATA\",\"description\":\"Your Source for AI, Data Science, Deep Learning &amp; Machine Learning Strategies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/insidebigdata.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/insidebigdata.com\/#\/schema\/person\/35a290930284d4cdbf002d457f3d5d87\",\"name\":\"Contributor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/insidebigdata.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36bffd267e38ed3f525205f67270e91b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36bffd267e38ed3f525205f67270e91b?s=96&d=mm&r=g\",\"caption\":\"Contributor\"},\"url\":\"https:\/\/insidebigdata.com\/author\/contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is a RAG?\u00a0 - insideBIGDATA","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/","og_locale":"en_US","og_type":"article","og_title":"What is a RAG?\u00a0 - insideBIGDATA","og_description":"In this contributed article, Magnus Revang, Chief Product Officer of Openstream.ai, points out that In the Large Language Model space, one acronym is frequently put forward as the solution to all the weaknesses. Hallucinations? RAG. Privacy? RAG. Confidentiality? RAG. Unfortunately, when asked to define RAG, the definitions are all over the place.\u00a0","og_url":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/","og_site_name":"insideBIGDATA","article_publisher":"http:\/\/www.facebook.com\/insidebigdata","article_published_time":"2023-11-30T11:00:00+00:00","article_modified_time":"2023-11-28T22:04:20+00:00","og_image":[{"width":1100,"height":550,"url":"https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/08\/Neural_net_shutterstock_1615182352_special.jpg","type":"image\/jpeg"}],"author":"Contributor","twitter_card":"summary_large_image","twitter_creator":"@insideBigData","twitter_site":"@insideBigData","twitter_misc":{"Written by":"Contributor","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/","url":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/","name":"What is a RAG?\u00a0 - insideBIGDATA","isPartOf":{"@id":"https:\/\/insidebigdata.com\/#website"},"datePublished":"2023-11-30T11:00:00+00:00","dateModified":"2023-11-28T22:04:20+00:00","author":{"@id":"https:\/\/insidebigdata.com\/#\/schema\/person\/35a290930284d4cdbf002d457f3d5d87"},"breadcrumb":{"@id":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/insidebigdata.com\/2023\/11\/30\/what-is-a-rag\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/insidebigdata.com\/"},{"@type":"ListItem","position":2,"name":"What is a RAG?\u00a0"}]},{"@type":"WebSite","@id":"https:\/\/insidebigdata.com\/#website","url":"https:\/\/insidebigdata.com\/","name":"insideBIGDATA","description":"Your Source for AI, Data Science, Deep Learning &amp; Machine Learning Strategies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/insidebigdata.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/insidebigdata.com\/#\/schema\/person\/35a290930284d4cdbf002d457f3d5d87","name":"Contributor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/insidebigdata.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/36bffd267e38ed3f525205f67270e91b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36bffd267e38ed3f525205f67270e91b?s=96&d=mm&r=g","caption":"Contributor"},"url":"https:\/\/insidebigdata.com\/author\/contributor\/"}]}},"jetpack_featured_media_url":"https:\/\/insidebigdata.com\/wp-content\/uploads\/2023\/08\/Neural_net_shutterstock_1615182352_special.jpg","jetpack_shortlink":"https:\/\/wp.me\/p9eA3j-8R3","jetpack-related-posts":[{"id":34119,"url":"https:\/\/insidebigdata.com\/2023\/12\/08\/hallucination-index-identifies-best-llms-for-most-popular-ai-use-cases\/","url_meta":{"origin":34041,"position":0},"title":"Hallucination Index Identifies Best LLMs for Most Popular AI Use Cases","date":"December 8, 2023","format":false,"excerpt":"Galileo, a leading machine learning (ML) company for unstructured data, released a Hallucination Index developed by its research arm, Galileo Labs, to help users of today\u2019s leading LLMs determine which model is least likely to hallucinate for their intended application.","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/insidebigdata.com\/wp-content\/uploads\/2023\/06\/AI_shutterstock_2287025875_special-1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":34051,"url":"https:\/\/insidebigdata.com\/2023\/12\/04\/heard-on-the-street-12-4-2023\/","url_meta":{"origin":34041,"position":1},"title":"Heard on the Street \u2013 12\/4\/2023","date":"December 4, 2023","format":false,"excerpt":"Welcome to insideBIGDATA\u2019s \u201cHeard on the Street\u201d round-up column! In this regular feature, we highlight thought-leadership commentaries from members of the big data ecosystem. Each edition covers the trends of the day with compelling perspectives that can provide important insights to give you a competitive advantage in the marketplace.","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":33752,"url":"https:\/\/insidebigdata.com\/2023\/11\/01\/generative-ai-report-11-1-2023\/","url_meta":{"origin":34041,"position":2},"title":"Generative AI Report \u2013 11\/1\/2023","date":"November 1, 2023","format":false,"excerpt":"Welcome to the Generative AI Report round-up feature here on insideBIGDATA with a special focus on all the new applications and integrations tied to generative AI technologies. We\u2019ve been receiving so many cool news items relating to applications and deployments centered on large language models (LLMs), we thought it would\u2026","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/insidebigdata.com\/wp-content\/uploads\/2023\/06\/GenerativeAI_shutterstock_2313909647_special.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":33558,"url":"https:\/\/insidebigdata.com\/2023\/10\/03\/generative-ai-report-10-3-2023\/","url_meta":{"origin":34041,"position":3},"title":"Generative AI Report \u2013 10\/3\/2023","date":"October 3, 2023","format":false,"excerpt":"Welcome to the Generative AI Report round-up feature here on insideBIGDATA with a special focus on all the new applications and integrations tied to generative AI technologies. We\u2019ve been receiving so many cool news items relating to applications and deployments centered on large language models (LLMs), we thought it would\u2026","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/insidebigdata.com\/wp-content\/uploads\/2023\/06\/GenerativeAI_shutterstock_2313909647_special.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":33948,"url":"https:\/\/insidebigdata.com\/2023\/11\/21\/generative-ai-report-11-21-2023\/","url_meta":{"origin":34041,"position":4},"title":"Generative AI Report \u2013 11\/21\/2023","date":"November 21, 2023","format":false,"excerpt":"Welcome to the Generative AI Report round-up feature here on insideBIGDATA with a special focus on all the new applications and integrations tied to generative AI technologies. We\u2019ve been receiving so many cool news items relating to applications and deployments centered on large language models (LLMs), we thought it would\u2026","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/insidebigdata.com\/wp-content\/uploads\/2023\/06\/GenerativeAI_shutterstock_2313909647_special.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":34133,"url":"https:\/\/insidebigdata.com\/2023\/12\/19\/insidebigdata-ai-news-briefs-bulletin-board\/","url_meta":{"origin":34041,"position":5},"title":"insideBIGDATA AI News Briefs Bulletin Board","date":"December 19, 2023","format":false,"excerpt":"Welcome insideBIGDATA AI News Briefs Bulletin Board, our timely new feature bringing you the latest industry insights and perspectives surrounding the field of AI including deep learning, large language models, generative AI, and transformers. We\u2019re working tirelessly to dig up the most timely and curious tidbits underlying the day\u2019s most\u2026","rel":"","context":"In &quot;AI Deep Learning&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/insidebigdata.com\/wp-content\/uploads\/2023\/07\/AI-News-Briefs-column-banner.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/posts\/34041"}],"collection":[{"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/users\/10531"}],"replies":[{"embeddable":true,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/comments?post=34041"}],"version-history":[{"count":0,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/posts\/34041\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/media\/33064"}],"wp:attachment":[{"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/media?parent=34041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/categories?post=34041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/insidebigdata.com\/wp-json\/wp\/v2\/tags?post=34041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}