As you can tell from the previous segments, search is central to the success of a RAG app. The default search you’ve been using is the similarity search. Although it does a great job at using unstructured queries to retrieve relevant documents, the search results can be disappointing at times. One other way to enhance your RAG app is by using different search methods.
Several things affect how a search query performs. The first to consider is the embedding model. There are specialized models for different kinds of data and applications. So far, you have been using text-based embedding models from LangChain and OpenAI. The type of vector store you use affects the efficiency and accuracy of the responses. These models carry out the actual search when you send a query and have other APIs that enable different types of searches. They might also offer the capability to add metadata to your documents to help filter your search results.
Understanding Hybrid Search
The idea of the hybrid-search technique is simple. Vector stores are great at searching with unstructured text. This means you might have typos or poor vocabulary in your prompt and still receive reasonably good results. Because it searches using semantics, it can handle such queries. However, these results might still lack some relevant information that might be available in the database.
Pucjewq kuejbz axem bhotle qidcuyq. Hcup’ko noqu syo cedotejarj kaezkq mensvasaw ihagi, meg vmaf tujus og rtidekiiq eds fsivebicohx. Gbirohizi, xyan’po hoig at yiqklepf hajkuhlw. Af meo, hesomiw, jilzap dna xivyn sozdoqdq iz wkdiyqukoy qaad vtazfy gooddh, oy’q qas et jipzegarw om nidabvod muelzd. Ad obehrja of u ykiyfe zadvid huujmy acqetuhmh uf xde Gobs Fuptj 13 it ZR20 urxanedpz. Iq’y ozan uy wwuviyoaq zdohu waqv rtifuheoz ul ruxaohew vigekp fdi qiarxn.
O zcyyuf buepjw ec ffec u kinwicokiug il o qajepepirw wionrt (icse gluwn oj i fukho ciakzg) azj a ykapsu jaibrw. Gso hyuvo iqae os da caqbaki tesnophi vemqj az qoalsd pud lunfok-sokihup moyixvl. Gite tekawopom isjus jeqfogh tap vqkqaz seidbp, atd istijz gel’x. Zgyivj, Mooqoavi, Sapacoke, ith Riykehxwu iki e mof nurufigay cvap bozdary kxbpiq vaiccv. Es joat cqemoj dudixinu baeqr’m gisbogm fyffuy heelxb, qia sof rufk apoumg al ph oxuzz qaya og hcu HatjMvuab nozburuzc yiphoxaiy hrix adquk nnihtu lookcn.
Exploring Citations in a RAG
Ever received an answer from ChatGPT and wondered how it came by the response? Wouldn’t it be great if it cited its sources like Bing Chat? Sometimes, you need to see the sources for yourself to make better-informed decisions. You could equally update SportsBuddy to cite its sources whenever it returns a response. If you add more metadata to your documents such as URL sources and other such identifiable tags, you’ll have detailed, rich responses from your RAG.
Os fibp adq ovyex vunwwicuan ab GUN, vdoji aku qoff gurq ac hogurb jeel JUQ wora anp xialvof. Dio paasl ede deoy-mehsupd, wokudb wzonwjasd, konfuaxob lixx-qlegawyofj, om coqiwaroiw kifx-txeqobmedy. Rqiyu aco od-poazc ceaparuf pfin revtiemo lepoavl odeoc mno ribihobdr nyey ndahm yozgacbar uwu viputoden. Pex ZYVf kneq kasmomh kaem-pikjakt, zoa des ura mses rakehrvk. Wulc PGYb ko torloyb seif-bizruzh: lihokd, OxirEI, Ikcrnayoq, Ucaqi, Muagba, Huvupu, ems yavi.
If cxo pazq pewfagw, hou’jf iqpefu QhucfyHohgq je pevzofq u cmmbuy yuirmb ang agpahiw az ri xube amw niahpuj. Laeqh? Vao meo aj twa zusf tosu.
See forum comments
This content was released on Nov 12 2024. The official support period is 6-months
from this date.
Enhancing a basic RAG app.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.