Step-by-Step Guide to Building a RAG LLM App with LLamA2 and LLaMAindex

  Рет қаралды 76,118

Krish Naik

Krish Naik

Күн бұрын

Пікірлер: 156
@GerardoBarcia
@GerardoBarcia Жыл бұрын
It would be amazing if you show us how to put all of this into production through an API! Thanks for your wonderful work! You Rock!!
@timothylenaerts1123
@timothylenaerts1123 11 ай бұрын
vLLM is easy enough to use, they provide a docker image, run that bad boy with whatever model you want and use their openAI endpoint then you can just use that in langchain or Llama index
@Abhijit-VectoScalar
@Abhijit-VectoScalar 5 ай бұрын
@@timothylenaerts1123 wdym! could you please elaborate i actually want the same thing to do
@Паша_Вамкон
@Паша_Вамкон 10 ай бұрын
Thank you so much for this video!!! Very helpful!! I've managed to get a bit of understanding of LLM and to do my lab task!!!
@aravindsai2843
@aravindsai2843 Жыл бұрын
Much awaited series, thank you krish Sir♥
@smartwork7098
@smartwork7098 10 ай бұрын
Thanks man, it works well. (After correcting some changes made in llama and huggingface)
@ahmadmasood3939
@ahmadmasood3939 8 ай бұрын
I am facing problem while importing huggingfacellm. can you tell me what you did?
@krvedhavakrishna7710
@krvedhavakrishna7710 8 ай бұрын
@@ahmadmasood3939 while accessing tokens, in the create new token option, chnage token mode to write
@koushikvenuganan3999
@koushikvenuganan3999 7 ай бұрын
hi, btw im also facing the same issues while importing llama and huggingface . Can u help me to fix the issues ?
@veerabhadrayyakalacharanti4051
@veerabhadrayyakalacharanti4051 2 ай бұрын
!pip install install sentence_transformers for this code i am getting error as ERROR: Could not find a version that satisfies the requirement install (from versions: none) ERROR: No matching distribution found for install what i have to do
@MrGirishbarhate
@MrGirishbarhate 2 ай бұрын
@@veerabhadrayyakalacharanti4051 you have install keyword twice.. please check and fix
@chanishagarwal9103
@chanishagarwal9103 10 ай бұрын
Thanks you krish for all your hard work. keep making such amazing videos.
@sandeepmahale1941
@sandeepmahale1941 7 ай бұрын
Krish, thank you for creating easy to understand videos
@rubyrana7786
@rubyrana7786 11 ай бұрын
Indeed great video. Please try to include the reason for using different approaches of doing any process like in earlier videos the model was loaded differently and here differently. A simple explanation of the reason behind using a specific approach can be useful for the beginners. As the approach changes when we move forward in more complex applications and different use cases.
@MamadouMoussaBangoura
@MamadouMoussaBangoura 8 ай бұрын
thank you the cours i see in this rag topic , very good , i 'm french speaker but i understand your cours
@atifsaeedkhan9207
@atifsaeedkhan9207 10 ай бұрын
U r really a good instructor. ❤
@RanjitSingh-rq1qx
@RanjitSingh-rq1qx Жыл бұрын
Sir everything fine, but you have missed just one thing in this project, that why you have implemented or build prompt and why you have not used that prompt, why you have gone with default prompt ? And remaining part was so good with good explanation ❤️
@krishnaik06
@krishnaik06 Жыл бұрын
More examples i will come up with...this basic to intermediate RAG system
@akshatapalsule2940
@akshatapalsule2940 Жыл бұрын
Thankyou so much Krish, it was worth the wait :)
@lixiasong3459
@lixiasong3459 11 ай бұрын
Thank you, Sir, you are amazing!
@y6bt2501
@y6bt2501 Жыл бұрын
Please make a video on RAG with CSV or database with local open source llm and with memory
@ITwala-f2d
@ITwala-f2d 11 ай бұрын
I am getting the error of VectorStorIndex from LLama_index
@ByYouTube2
@ByYouTube2 11 ай бұрын
use- from llama_index.core import VectorStoreIndex,SimpleDirectoryReader,ServiceContext
@stevefisher35
@stevefisher35 11 ай бұрын
Thanks for the detailed run through, very useful . One question I have is on the two PDF documents you have. Are these available anywhere, just for testing purposes?
@sravan160
@sravan160 11 ай бұрын
i have some doubts in implementing the code.,can u help?
@eswararya196
@eswararya196 9 ай бұрын
Yeah ask me?
@ivanrowland142
@ivanrowland142 11 ай бұрын
Love this. When is the next instalment?
@haseebkhan-d5q5e
@haseebkhan-d5q5e 10 ай бұрын
Lets Goooooo
@MK5491
@MK5491 11 ай бұрын
@krishnaik06 Sir Thank you for this knowledgeable video, My question is which Evalution model we should use to show the accuracy in terms of answer and context retrieval. If possible, will you please create one video on evaluation method for RAG application.
@akashchavan3353
@akashchavan3353 11 ай бұрын
@krishnaik06 sir I also want this thing, can you please create one video on evolution method. Thanks
@anant9421
@anant9421 11 ай бұрын
@krishnaik06 yes please can you please create a video on evaluation method for RAG application
@MrVinodkumar92
@MrVinodkumar92 2 ай бұрын
Hi sir...can you please explain storing the contexts or history for next prompts like memory management or state management.
@MLAlgoTrader
@MLAlgoTrader 8 ай бұрын
You are amazing.
@Raaj_ML
@Raaj_ML 7 ай бұрын
Sorry Krish...you started the playlist saying you would explain the difference in llamaindex vs langchain and why we should use either and when...but this play list with three videos does not deal with that, instead explains some hands on....Thanks for your work, but I think the assurances are not met..The play list has not been updated since Jan 24 ?
@nunoalexandre6408
@nunoalexandre6408 Жыл бұрын
Love it
@celestialgamer360
@celestialgamer360 Ай бұрын
Now most of the classes doesn't work when importing but we can learn the logics, how to implement. i suggest everyone first of all please visit the documentation and come here cause some of the classes are changed...
@GaneshEswar
@GaneshEswar 10 ай бұрын
waiting for next video, please upload it ...
@yashghugardare519
@yashghugardare519 Жыл бұрын
Sir..instead of RAG with pdf..make a video on Rag with videos.. which will process videos and be able to answer questions based on the video
@sayanghosh6996
@sayanghosh6996 9 ай бұрын
06:00 !pip install -q llama-index llama-index-llms-huggingface from llama_index.core import VectorStoreIndex,SimpleDirectoryReader,ServiceContext from llama_index.llms.huggingface import HuggingFaceLLM from llama_index.core.prompts.prompts import SimpleInputPrompt
@meowzerilla
@meowzerilla 9 ай бұрын
thank you so much
@malindumusicMD
@malindumusicMD 2 ай бұрын
Thankyou bro
@miteshgarg9420
@miteshgarg9420 11 ай бұрын
Hey Krish, amazing video again. Can you please help to create a similar solution for custom text 2 sql
@hassubalti7814
@hassubalti7814 Жыл бұрын
sir greet method to teach us as well as gaining good grip on english. please make video about token used in llama 2 model used
@Glimmer-t44
@Glimmer-t44 8 ай бұрын
"ServiceContext" is now deprecated and replaced with "Settings" object. You may need to update this tutorial. Also, at 16:19 why did you used two different embeddings? HuggingFaceEmbeddings and LangChainEmbedding? Isn't just any one is enough?
@Raaj_ML
@Raaj_ML 7 ай бұрын
Yes, there are lots of gaps such as these in his recent videos..Seems like he is in a hurry to have his hands on every topic that emerges and he is losing direction..starting new playlist and leaving it to start new ones..
@yuvrajthakur5728
@yuvrajthakur5728 Жыл бұрын
Hey Krish, why you left PWskills masters in data science course. I joined this because of you. But I am seeing there new tutors. I joined this course because of you only.
@rafiquemohammed3029
@rafiquemohammed3029 6 ай бұрын
Hey @krishnaik06 Please create video on Intent Classification using LLM and VectorDB. How to create and train Intents and use to ask Custom Question without LLM?
@DoomsdayDatabase
@DoomsdayDatabase 10 ай бұрын
Hi krish sir! they have updated the service_context to settings.llm and i am not able to understand how to implement it into this code. Please help! Thanks!
@sameersah-p3b
@sameersah-p3b 2 ай бұрын
I did not understood where was pypdf and other libraries imported in the starting of the colab were used ?
@MrGirishbarhate
@MrGirishbarhate 2 ай бұрын
SimpleDirectoryReader method will internally use that pypdf parser which we installed.. documents=SimpleDirectoryReader("/content/data").load_data()
@مستقبل_مشرق
@مستقبل_مشرق 10 ай бұрын
Can I combine the LORA fint tuning for example and a RAG FOR THIS llm, can this work give me very interesting performances?
@charmilagiri4602
@charmilagiri4602 Жыл бұрын
Sir Instead of using LLamA2 model from huggingface, Can we try the quantized llama model? If we use the quantized llama model will the output accuracy varies?
@rubyrana7786
@rubyrana7786 11 ай бұрын
Why did we use a separate Embedding model here while in the earlier video of this playlist we directly used VectorStoreIndex on the documents. So why did we follow different approaches while creating similar Applications? Is it because of the different Model or it is just a different approach and can be done either way ?
@nikhilanand9022
@nikhilanand9022 9 ай бұрын
I had one doubt is Vector Store Index use any embedding model behind it for creating the Index or how it create the embedding the vector store index
@Glimmer-t44
@Glimmer-t44 8 ай бұрын
@@nikhilanand9022 By default, VectorStoreIndex use OpenAI Embeddings if no other embeddings are explicitly specified.
@amritsubramanian8384
@amritsubramanian8384 9 ай бұрын
gr8 video
@azizahmed6406
@azizahmed6406 4 күн бұрын
also what exactly happens when there's no context available?
@dillikaextrovert
@dillikaextrovert 11 ай бұрын
Hello Krish The list of accessories you have mentioned, is not having right links for Amazon. Can you please give me the link for the writing pad which you use ?
@vinayaktiwari4463
@vinayaktiwari4463 11 ай бұрын
Hi Krish , which vector store have you utilised here? there was no mention of such in the code
@VivekGuptaMusic
@VivekGuptaMusic 11 ай бұрын
not saving the embeddings in any vector store directly using it
@vivekshindeVivekShinde
@vivekshindeVivekShinde Жыл бұрын
I have lots of pdf documents data and want to create a custom chatbot based on it. Then which one will be better: Langchain or Llamaindex?
@RanjitSingh-rq1qx
@RanjitSingh-rq1qx Жыл бұрын
Llamaindex for indexing purpose, and langchain used for response of query with Prompt by the langchain LLM, and used Gemini pro as a LLM model. Will be great combination of all these technologies ❤
@vivekshindeVivekShinde
@vivekshindeVivekShinde Жыл бұрын
@@RanjitSingh-rq1qx Thanks for suggestions. I am looking for Open Source. So while Indexing in the Llamaindex, it doesn't use OpenAI api or something right?
@RanjitSingh-rq1qx
@RanjitSingh-rq1qx Жыл бұрын
@@vivekshindeVivekShinde yes all are open source
@chinnibngrm272
@chinnibngrm272 11 ай бұрын
Guys can you please share the implementation of this by mixing llama index, Langchain, Gemini pro.... Please ... It will be very helpful 😊😊
@nikhilanand9022
@nikhilanand9022 9 ай бұрын
@@vivekshindeVivekShinde I think when we use the Vector Store index it use the openai embedding model api for creating the index can you please confirm once ?
@atifsaeedkhan9207
@atifsaeedkhan9207 10 ай бұрын
Is it possible to use local llms instead huggingface directly? I have ollama nd lmstudio installed.
@blakdronzer
@blakdronzer 7 ай бұрын
there is an issue downloading the model LLAMA2 / LLAMA3 - as it requires to be authenticated / accepted by their team. Even after getting it authenticated / accepted - when we try download the code by your pattern / huggingface_clt - it still says - access denied to the config file - and hence cannot download any model locally - so if you could practically share insights or build a new video that pertains to the latest situation, will be awesome
@Raaj_ML
@Raaj_ML 7 ай бұрын
Please try in google colab..I tried in my local laptop and many things failed.
@blakdronzer
@blakdronzer 7 ай бұрын
Well i discovered lately that this models are available only for pro accounta. Since I subscribed to one monther, it is working fine now. Strange... Marking it open but available only for subscribers
@chinnibngrm272
@chinnibngrm272 11 ай бұрын
Sir as I am a student.. I am not having gpu in my machine... I am not able to do projects with this open source llms n also with open ai... Can u please help us to solve the resource errors by using other models
@junaidbadshah9343
@junaidbadshah9343 5 ай бұрын
All youtuber self don't know how to solve this issues and i don't think so that AI is working without GPU.
@achukisaini2797
@achukisaini2797 Жыл бұрын
How to reduce hallucination? if answer is not in context then it is hallucinating .
@soulfuljourney22
@soulfuljourney22 Жыл бұрын
may be you can modify the prompt to answer for not in context situation
@IamMarcusTurner
@IamMarcusTurner 11 ай бұрын
literally prompt the LLM if not in document tell the LLM to say it does not know.
@riteshsingh811
@riteshsingh811 11 ай бұрын
If the content is present , still its hallucinating , there are certain advance RAG techniques like Window Sentence Retrieval and Auto Merging Retrieval that can help.It will help in improving the context. Just try read regarding it and implement. It will help u. Also tuning agent to not give answer when it doesn't know helps in case of unknown scenario.
@Lirim_K
@Lirim_K 9 ай бұрын
Old tutorial. Most of the imports no longer work due to deprications.
@HammieLicious
@HammieLicious 7 ай бұрын
SimpleInputPrompt is broken. still shows the concept tho
@CoderX92-mc5hv
@CoderX92-mc5hv Ай бұрын
But they actually tell u the real import after uu tried to install the deprecated one
@CuriousBeingVP
@CuriousBeingVP 5 ай бұрын
Can we please implement this using TS/JS ?
@azizahmed6406
@azizahmed6406 4 күн бұрын
Now I know it might be really obvious to you but I just wanna know the downside, if any, to quantizing the model to 8-bit.
@shehrozkhan9563
@shehrozkhan9563 10 ай бұрын
Can we add in conversation history to this app?
@madhujegishetti4102
@madhujegishetti4102 7 ай бұрын
ImportError: cannot import name 'VectorStoreIndex' from 'llama_index' (unknown location)--getting this error
@jeruc.r7382
@jeruc.r7382 6 ай бұрын
Same error 😢 did you cleard that
@HillParkEnterprise
@HillParkEnterprise 6 ай бұрын
from llama_index.core import VectorStoreIndex,SimpleDirectoryReader,ServiceContext
@Narutome30
@Narutome30 Жыл бұрын
Y is he using google colab rather than vs code And also please answer this question -> can we use vs code to run seamless m4t meta model
@nostalgia18rishi
@nostalgia18rishi 7 ай бұрын
I can't login using hugging face cli on colab. I have pasted the token from hugging face and control enter. The cell on my collab keeps running.
@fadhilayosof5927
@fadhilayosof5927 Жыл бұрын
can you make a video to create flowchart by LLM
@goldy5553
@goldy5553 11 ай бұрын
Library is pretty messed up, nothing is working everwhere there is a module import error and function is missing or deprecated. if you found this, don't worry guys we are on same page. Sir could you please check if there is a some issues or what they have done to library
@eswararya196
@eswararya196 9 ай бұрын
If you are having moldule import error then use llama_index.core Instead of llama_index
@MatkoZaja
@MatkoZaja 9 ай бұрын
Is there a way to ensure that once PDFs are processed, they do not need to be reprocessed every time the script runs, but rather that a cached database can be stored? Does anyone have code for this?
@SagarGuhe
@SagarGuhe 6 ай бұрын
Apparently imports from llama_index are not working as of now.
@Jayesh-s4h
@Jayesh-s4h 11 ай бұрын
Sir , the llama index library is modifying everyday , and there are many import errors in the code , can you tell me the suitable version of llama-index to run the code
@ishratsyed2857
@ishratsyed2857 11 ай бұрын
I was having the same issue, I tried installing version 0.9.40 and it's working now
@sebastienmaillet9371
@sebastienmaillet9371 11 ай бұрын
@@ishratsyed2857 i tried to install llama_index version 0.9.40 but i got the following message: ImportError Traceback (most recent call last) in () ----> 1 from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext 2 from llama_index.llms import HuggingFaceLLM 3 from llama_index.prompts.prompts import SimpleInputPrompt ImportError: cannot import name 'VectorStoreIndex' from 'llama_index' (unknown location)
@sebastienmaillet9371
@sebastienmaillet9371 11 ай бұрын
do you know what i might be missing ?
@santhoshmanoharan8969
@santhoshmanoharan8969 11 ай бұрын
@@sebastienmaillet9371 I have tried the same code from my local anaconda environment, I'm getting error with the importing packages but it is working fine when I use Google Colab, can anyone explain why?
@ShreyasR-vr1es
@ShreyasR-vr1es 9 ай бұрын
Trying using the import like this instead: from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, ServiceContext from llama_index.llms.huggingface import HuggingFaceLLM from llama_index.core.prompts.prompts import SimpleInputPrompt This should work for you!
@ridj41
@ridj41 10 ай бұрын
where to get the data from, like you have done in this case? \
@sandhya77331
@sandhya77331 6 ай бұрын
how to integrate streamlit for front-end into this
@sumanmaity3162
@sumanmaity3162 9 ай бұрын
Hello Krish, I'm getting a basic error as below. Can you please help? ImportError Traceback (most recent call last) in () ----> 1 from llama_index import VectorStoreIndex,SimpleDirectoryReader,ServiceContext 2 from llama_index.llms import HuggingFaceLLM 3 from llama_index.prompts.prompts import SimpleInputPrompt ImportError: cannot import name 'VectorStoreIndex' from 'llama_index' (unknown location)
@ShreyasR-vr1es
@ShreyasR-vr1es 9 ай бұрын
Trying using the import like this instead: from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, ServiceContext from llama_index.llms.huggingface import HuggingFaceLLM from llama_index.core.prompts.prompts import SimpleInputPrompt This should work for you!
@sumanmaity3162
@sumanmaity3162 9 ай бұрын
@@ShreyasR-vr1es Thank you, other 2 worked but I'm getting error in below ModuleNotFoundError Traceback (most recent call last) in () ----> 1 from llama_index.llms.huggingface import HuggingFaceLLM ModuleNotFoundError: No module named 'llama_index.llms.huggingface'
@sumanmaity3162
@sumanmaity3162 9 ай бұрын
Please ignore, it worked, had some installation issues. Thank you so much.
@darshitshah8668
@darshitshah8668 8 ай бұрын
@@sumanmaity3162 I am facing same error, how did it get resolved for you?
@sumanmaity3162
@sumanmaity3162 8 ай бұрын
@@darshitshah8668 Please reinstall, it should work
@aritrasaha1854
@aritrasaha1854 7 ай бұрын
how to do it if I have a csv file instead of a pdf
@chinnibngrm272
@chinnibngrm272 11 ай бұрын
I am getting Runtimeerror: CUDA Error.... While running index= VectorStoreIndex.from_documents (docs, service_context=service_context) Sir please provide a solution to run with cpu....
@harshab2743
@harshab2743 9 ай бұрын
i am getting an error while importing vectorstoreIndex from llamaIndex saying that llamaIndex doesn't exist. can someone help
@ShreyasR-vr1es
@ShreyasR-vr1es 9 ай бұрын
Trying using the import like this instead: from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, ServiceContext from llama_index.llms.huggingface import HuggingFaceLLM from llama_index.core.prompts.prompts import SimpleInputPrompt This should work for you!
@aiwithuday
@aiwithuday 8 ай бұрын
@@ShreyasR-vr1es also pip install llama-index-llms-huggingface
@lesstalkeatmore9441
@lesstalkeatmore9441 6 ай бұрын
i am getting error while i am import library
@shreyavalte3077
@shreyavalte3077 Жыл бұрын
I have a very big question
@yetanotheremail
@yetanotheremail Жыл бұрын
Han please ask
@minimal2224
@minimal2224 11 ай бұрын
Lol the suspense is killing me
@Lemonboi-lmn21
@Lemonboi-lmn21 10 ай бұрын
any updates ?
@quraisyi5090
@quraisyi5090 4 ай бұрын
how to download data folder?
@abhinandansharma3983
@abhinandansharma3983 10 ай бұрын
where i will get this dataset
@Playstore-zc5xk
@Playstore-zc5xk Жыл бұрын
How to convert this into end to end?
@veerabhadrayyakalacharanti4051
@veerabhadrayyakalacharanti4051 2 ай бұрын
!pip install install sentence_transformers for this code i am getting error as ERROR: Could not find a version that satisfies the requirement install (from versions: none) ERROR: No matching distribution found for install what i have to do
@AbhijithNarayanan-x1r
@AbhijithNarayanan-x1r Ай бұрын
use !pip install sentence_transformers
@himanshudeswal9895
@himanshudeswal9895 11 ай бұрын
Hi, can anyone tell me how to download these raw pdf’s for hands on please??
@nidhiawasthi12
@nidhiawasthi12 Ай бұрын
Could you please help me to Llama index code for Text to SQL ..consideration Highly Scalable
@NavyaSravaniSomu
@NavyaSravaniSomu 10 ай бұрын
i need those pdfs
@JENNYOPJOD
@JENNYOPJOD 3 ай бұрын
ur code doesn't work
@KumR
@KumR Жыл бұрын
Hey Krish. Video is cool. But can you tell us how we will know what are the different things we will need to import . You may have done lot of research. Kindly point us to the source of truth.
@kuls810
@kuls810 9 күн бұрын
Service context has been deprecated. incase you face erroryou can use: from llama_index.core import Settings from llama_index.core.node_parser import SentenceSplitter Settings.llm = llm Settings.embed_model = embed_model Settings.node_parser = SentenceSplitter(chunk_size=1024) index= VectorStoreIndex.from_documents(documents, embed_model=embed_model)
@khyathinkadam5524
@khyathinkadam5524 9 ай бұрын
while running import torch llm = HuggingFaceLLM( context_window=4096, max_new_tokens=256, generate_kwargs={"temperature": 0.0, "do_sample": False}, system_prompt=system_prompt, query_wrapper_prompt=query_wrapper_prompt, tokenizer_name="meta-llama/Llama-2-7b-chat-hf", model_name="meta-llama/Llama-2-7b-chat-hf", device_map="auto", # uncomment this if using CUDA to reduce memory usage model_kwargs={"torch_dtype": torch.float16 , "load_in_8bit":True} ) in colob i m getting import error stating that i need to install accelarate but i already have in in my env
@AnandYadav-gv1xw
@AnandYadav-gv1xw 9 ай бұрын
from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext ImportError: cannot import name 'VectorStoreIndex' from 'llama_index' (unknown location)
@Sohammhatre10
@Sohammhatre10 9 ай бұрын
Simple directory reader too
@ShreyasR-vr1es
@ShreyasR-vr1es 9 ай бұрын
Trying using the import like this instead: from llama_index.core import VectorStoreIndex, SimpleDirectoryReader, ServiceContext from llama_index.llms.huggingface import HuggingFaceLLM from llama_index.core.prompts.prompts import SimpleInputPrompt This should work for you!
@arnavdeshmukh2820
@arnavdeshmukh2820 10 ай бұрын
facing issue index=VectorStoreIndex.from_documents(documents,service_context=service_context) can anyone help
@Anusho2012
@Anusho2012 5 ай бұрын
what is the error ?
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 231 М.
Real time RAG App using Llama 3.2 and Open Source Stack on CPU
29:33
I used LLaMA 2 70B to rebuild GPT Banker...and its AMAZING (LLM RAG)
11:08
All You Need To Know About DeepSeek- ChatGPT Killer
14:43
Krish Naik
Рет қаралды 114 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН