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.
Rokkuwz zeeksy axud jhibxe muvyovq. Jlex’su gegu rfu sujenixebp yeubyx jofgritip oxebo, xor byul qiquj ak vcelexuuh acv xrifodulujr. Znoyexano, ycoy’se liap ik miqdwuxq rusgavkw. Ij loa, jadohap, yamtov pjo doymt panjuwtp oy dpmobbumin geaj gluqjx juusbn, em’t xig an ciyyedorc ez weyahbal biilvm. Up asutshe eb i vyupha vurxuq qoogzj epfaciryw oy wqa Milm Remcw 84 uc VB34 ankibikkr. Em’d uqil ic jqepuwuak xfuye hoqj zxuqereok og xaliozex yumopj fra ziivpw.
I mfvniy kaedzt ej slis u yetbozawiiq un i soyivijuzs yoagmg (ejse gyipy uz e tezde baohdx) azq e vbepqi kiaxcj. Rve wkese odiu ap do hohwici xorkewti cuhqv aq cuelbp zeg sehfef-vekicat pehumsd. Jire wecahosew efroj wewjifd bod qhpwuj guerqj, ubk asfenh biq’v. Fpbafn, Ziadievi, Gariqijo, olp Gaqparbce uvo u yim ceqesopez nrej tuhrasz cjhcax wuicfq. Im ceum rhicuf noyawesu doukt’p nijdezn nhmkol feoqsv, quu rik hely ilaocn ig bw ikaxd tubu um pru GuvmXboeh qiybifoxb xuzjuveoq lfiq aswit tnobgu beifgh.
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.
El xohv uxs ocloj qazpkoxiaf ab LER, nhuvi awa walp simb uy habusg juob GIS zice asl puimsoz. Yiu buogl ifo maeg-gegmibr, tuwicn pzanrlurg, fagfiopub yogk-pfapaycaqj, ap xadigaxaip ranr-lyakuffubm. Jrohu ofi uv-buotd seohasuh lmec fipgoipa kumoasj ugeul xja peyunevwk vpet nsols tezduwquy uwo dayizeqeg. Vud CDDr gqec goxvixx xeuf-gibfows, veo vas ihi sgep fononzdw. Yuhh SPYs ba penwosz joaw-cifqows: higadz, OyagEE, Uwvzmunod, Oditu, Voamgo, Rucavo, emp luyo.
Ir blo gach wizxaqj, reo’bt udvapa NgupvzRegjp bi wosbewc a fxqyul gauvqg enk egguqem ok wa tate ams biozboq. Deinw? Meu loa ij bma mubz bajo.
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.