Software Release System
is similar to a customer service project, with explicit customer value. Internally, for the product department, it functions more like "plumbing," akin to a telecom service, where people only care if it works smoothly, lacking other values and limited in driving cul...
Software Release System
is similar to a customer service project, with explicit customer value. Internally, for the product department, it functions more like "plumbing," akin to a telecom service, where people only care if it works smoothly, lacking other values and limited in driving cultural change. Additionally, this system is entirely internally developed with custom data exchange formats, offering little reference value to other companies, and is unlikely to resonate strongly with digital transformation reviewers.
Size: 444.67 KB
Language: en
Added: Jul 31, 2024
Slides: 26 pages
Slide Content
Introduction to RAG
and It's Application
Presented By: Aayush Srivastava
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
▪Punctuality
Join the session 5 minutes prior to the session start time. We start on
time and conclude on time!
▪Feedback
Make sure to submit a constructive feedback for all sessions as it is very
helpful for the presenter.
▪Silent Mode
Keep your mobile devices in silent mode, feel free to move out of session
in case you need to attend an urgent call.
▪Avoid Disturbance
Avoid unwanted chit chat during the session.
Agenda
1.Introduction
▪What is LLM
▪What is RAG?
2.LLM And It's Limitation
▪WhyRAG is important?
3.RAGArchitecture
4.How Does RAG Work
5.RAG Vs Fine-Tuning
6.Benefits Of RAG
7.Applications
8.Demo
Introduction
What is LLM
•Alargelanguagemodel(LLM)isatypeofartificialintelligenceprogramthatcanrecognizeandgeneratetext,amongother
tasks.
•LLMareverylargemodelsthatarepre-trainedonvastamountsofdata.
•Builtontransformerarchitectureisasetofneuralnetworkthatconsistofanencoderandadecoderwithself-attention
capabilities.
•Itcanperformcompletelydifferenttaskssuchasansweringquestions,summarizingdocuments,translatinglanguagesand
completingsentences.
Open AI's GPT-3 model has 175 billion parameters. Also it can take inputs up to 100K tokens in each prompt
What is LLM
•Insimplerterms,anLLMisacomputerprogramthathasbeenfedenoughexamplestobeabletorecognizeandinterpret
humanlanguageorothertypesofcomplexdata.
•QualityofthesamplesimpactshowwellLLMswilllearnnaturallanguage,soanLLM'sprogrammersmayuseamore
curateddataset.
What is RAG?
•RAGstandsforRetrieval-AugmentedGeneration
•It'sanadvancedtechniqueusedinLargeLanguageModels(LLMs)
•RAGcombinesretrievalandgenerationprocessestoenhancethecapabilitiesofLLMs
•InRAG,themodelretrievesrelevantinformationfromaknowledgebaseorexternalsources
•Thisretrievedinformationisthenusedinconjunctionwiththemodel'sinternalknowledgetogeneratecoherentand
contextuallyrelevantresponses
•RAGenablesLLMstoproducehigher-qualityandmorecontext-awareoutputscomparedtotraditionalgenerationmethods
•Essentially,RAGempowersLLMstoleverageexternalknowledgeforimprovedperformanceinvariousnaturallanguage
processingtasks
RetrievalAugmentedGeneration(RAG)isanadvancedartificialintelligence(AI)techniquethatcombines
informationretrievalwithtextgeneration,allowingAImodelstoretrieverelevantinformationfromaknowledge
sourceandincorporateitintogeneratedtext.
Why is Retrieval-Augmented Generation important
▪You can think of the LLM as an over-enthusiastic new employee who refuses to stay informed with current events but
willalways answer every question with absolute confidence.
▪Unfortunately, such an attitude can negatively impact user trust and is not something you want your chatbots to emulate!
▪RAG is one approach to solving some of these challenges. It redirects the LLM to retrieve relevant information from
authoritative, pre-determined knowledge sources.
▪Organizations have greater control over the generated text output, and users gain insights into how the LLM generates the
response.
Overview
•Retrieval Augmented Generation (RAG) can be likened to a detective and storyteller duo. Imagine you are trying to solve a
complex mystery. The detective's role is to gather clues, evidence, and historical records related to the case.
•Once the detective has compiled this information, the storyteller designs a compelling narrative that weaves together the facts and
presents a coherent story. In the context of AI, RAG operates similarly.
•The Retriever Componentacts as the detective, scouring databases, documents, and knowledge sources for relevant information
and evidence. It compiles a comprehensive set of facts and data points.
•The Generator Componentassumes the role of the storyteller.Taking the collected information and transforming it into a
coherent and engaging narrative, presenting a clear and detailed account of the mystery, much like a detective novel author.
ThisanalogyillustrateshowRAGcombinestheinvestigativepowerofretrievalwiththecreativeskillsoftextgenerationtoproduce
informativeandengagingcontent,justasourdetectiveandstorytellerworktogethertounravelandpresentacompellingmystery.
RAG Components
RAGGenerator
▪TheRAGgeneratorcomponentisbasicallytheLLMModelsucha(GPT)
▪TheRAGgeneratorcomponentisresponsiblefortakingtheretrievedandrankedinformation,alongwiththeuser's
originalquery,andgeneratingthefinalresponseoroutput.
▪Thegeneratorensuresthattheresponsealignswiththeuser'squeryandincorporatesthefactualknowledgeretrievedfrom
externalsources.
Updateexternaldata
▪Tomaintaincurrentinformationforretrieval,asynchronouslyupdatethedocumentsandupdateembeddingrepresentationof
thedocuments.
▪Automated Real-time Processes: Updates to documents and embeddings occur in real-time as soon as new information
becomes available. This ensures that the system always reflects the most recent data.
▪Periodic Batch Processing: Updates are performed at regular intervals (e.g., daily, weekly) in batches. This approach may be
more efficient for systems with large volumes of data or where real-time updates are not necessary.
RAG Based ChatApplication
SimplifiedsequencediagramillustratingtheprocessofaRAGchatapplication
Step1-Usersendsquery:Theprocessbeginswhentheusersendsaqueryormessagetothechatapplication.