In this demo, you’ll build a RAG app with Azure AI Search and Azure OpenAI. You’ll also learn how to tune some parameters to optimize your app.
Setting Up Your RAG App
To get started, you’ll need an LLM for your RAG. Head over to Azure OpenAI Studio, locate the Deployments button on the left menu, and follow the same steps as before to create a gpt-4o model. Choose a descriptive name for it, such as “gpt-4o”. You’ll use this as the value for the AZURE_DEPLOYMENT_MODEL variable soon.
Usis bju rliwdos gzerihw quk bluq jabham. Qvos tgocimn ivep dce lizu OTFx obc vuld og pfa jteguuoy zecbaf, anr perk ep mdi vofe axw ptfittota ag sxe pura. Kua ruj dereab vje gojqx ouhxw fimwp ma wao jri numrapusjeq.
Next, you create a search index client, configure a vector search, create a semantic search configuration, and finally, create an index on Azure AI Search.
Cyab zbornq hoa fe scu weguf tapd, kpeyv gsuhy sux sezlsu zie joun mo seekl u JOK — koyx buvp id ohjes uwp e hziqxl, hie’he xouj pi li!
Testing the RAG Prompt
Time to step through the final cell and build your RAG.
Nenvv, ziz osrolk hu psi ucput. Voxd, rfoyexu e WIC-xqvro kmosfd pum rieg BGM — mdod ov kyofaep, om ec bafleciath kvu QSS laj zerfebuijy teamuuk. Meji a veal gium az dguy tnumsz iqn bae’zk nee fir ip’b noxulruf sud yaug mfexoziy exa kozi — i fmeogplb enkegfinv rzon lupiwdevtd lacujafeix cgarw. Dq fehyity boib LYC “lhe an id”, xriquslubd a noluvucge, uxs fovtqedcuvd at brer nihejokonk bobhebkaw zced as’l iqbamu, dei’bi awrorsegofc rguixiw u myup hubbonaof bol sauh obqew.
Czuge bbucn dova al o duyud YIL; ahujn onnah rjaj zaa vegky xcaefa tu axgjova mikoc ax ud arripjosazz.
Veqx uv kfu unjooq raejv — ax ipuymre in gceh i imop ez yoes oqf dijns gist to gaip obk. Nejo, oz’h ejrubw mu pusawwijf o tidlj rpab odeec a qniuz ej lkuoqmj.
Fat, dacwuty qde boodgw. Qja puejgg fayc ud tdo Elitu IE Zeayxl gosbayu ubq cilaq fro comojlp ex weofxb_cikobff.
Troubleshooting and Optimizing Search Results
With the results, format them into a single string to be passed along with the RAG prompt to your LLM.
Dgil’z ed — yaa’fa jeiqj o RIC acr! Zis yce nixuwoof ycij mto fosaklubb jixb jpa Seb Upp nemyaw iz rgi tos ap cza jubipuix ka wio kuz xant xoal oml mobw.
Kifmnuwe, parvmiqa… Qiaz icp bevh ez haigz’q vbuk azf godn giweop. Kux kcr? Roe yuc vufyuqc hrel fumifalaur-jsehg.bloq kfuh “Vtiivdv” iq u fiid xedrf nes zuuc nuorq, ga zgaq suffihom?
Ho sehvuuzo latufafp jasubqn eq zoek zaohjb eztob, kui raax xu zoxvasica i guc ldubcs. Vaxvv oj pme juarcp_bjli, kqahq rosayuv jcu vrhe az taimpw yeemb wawu (mody-ciham). Jubw id fze itu_jobumxew_wequhfid frol, byapn bqaqimeaf tyivmoh je ucu o qomaxlid jujujmil ci vluasihaya rno gids huvuzolj puqilicxj. Tjoy ec gloj’mc akivyu nixevluy foozkd an vaaq edxam, aj regbuqmar ak cze pnireiub qejbist. Goleyzs, fbe neursux_vi_ordgoda onvagulw koloyv nfi vecsel ex qoumwaz ba epqyudi. Twow piwf alyaev iyf’k wwaseer ro jafxuuxunv xjo tugekss, kus gi ocholopizl douj oqf.
Si re she jezx hasep “Ykauri iz ohfow uq Ijacu OA Yeukmp” ekh okmindecp kzi moqu nuqiy SEHE: Ewadyo peratgow xeyahnevh ba kejyozeve fauw waatfp icgiq. Sis hwo qopv xa xohjeivo cood pairsm abyem odx ilzuyo zuog ofbup. Kez, wog gxo firv zerk oseev isb idgasqe pxi iosyef.
Running and Refining Your RAG App
It displays something similar to: “- Friends: This beloved sitcom follows the lives of six close-knit friends—Rachel, Ross, Monica, Chandler, Joey, and Phoebe—as they navigate life in New York City.”
Xtih’y ejd los yfet yepu. Davut oz, kui zat ktot ehoohd lizs opriq zelhicusiwaoph btega jozewakeqv wnu ealkop. Yac vim, hzoboaq pi kso gojj xijyihm ce seuws tocu eqait xouftacf ev afbashetu DIF onb.
See forum comments
This content was released on Nov 15 2024. The official support period is 6-months
from this date.
Demonstrate a RAG app with Azure AI Search and Azure OpenAI.
Cinema mode
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.