LLM Project | End to End LLM Project Using LangChain, Google Palm In Ed-Tech Industry
ฝัง
- เผยแพร่เมื่อ 4 ก.ค. 2024
- This is an End-to-End LLM project using the langchain framework. We are building a question-and-answer system for a real e-learning company (no toy datasets). If you are new to GenAI and LLM application development, then this langchain tutorial will help you understand how to build the end-to-end application.
Code:
github.com/codebasics/langcha...
Langchain playlist: • LangChain Tutorials Pl...
⭐️ Timestamps ⭐️
00:00 Introduction
0:38 Project requirements analysis
4:08 Technical architecture
9:13 Google Makersuite overview, API key setup
11:50 Google palm in langchain
13:28 Langchain CSVLoader
15:04 Hugging face instructor embeddings
18:40 Vector database using FAISS
22:22 Langchain RetrieverQA
29:23 Putting it all together
38:53 Streamlit UI
Do you want to learn technology from me? Check codebasics.io/?... for my affordable video courses.
Need help building software or data analytics/AI solutions? My company www.atliq.com/ can help. Click on the Contact button on that website.
🎥 Codebasics Hindi channel: / @codebasicshindi
#️⃣ Social Media #️⃣
🧑🤝🧑 Discord for Community Support: / discord
📸 Codebasics' Instagram: / codebasicshub
📝 Codebasics' Linkedin : / codebasics
------
📝 Dhaval's Linkedin : / dhavalsays
📝 Hem's Linkedin: / hemvad
📽️ Hem's Instagram for daily tips: / hemvadivel
📸 Dhaval's Personal Instagram: / dhavalsays
🔗 Patreon: www.patreon.com/codebasics?fa...
Sir, Good morning. The way you teach the concepts are phenomenal . Love you from bottom of my heart.
Do this kind of video more in coming days. I know that majority just go by the fancy thumbnail but this kind of video need too much effort.
Thank You again!
sir, you are awesome! I wish we we had projects like this during undergrad.
I've been looking for a detailed guide on LLM projects, and this video delivers exactly what I needed. Kudos to the presenter.
Hey were you able to complete the project ? Since it's been 6 months I'm worrying whether I can start and finish this project without any outdated stuff
Thank you very very much.I can't explain how important this video was for me.
Thanks for the great and very very simple explanation of whole process. The method you explain the concept is extraordinary. Just super !!!
thanks Dhaval sir for another cool end to end project but I think we are missing one thing is that the Deployment part
Thank you! this is a great video!
Excellent Sir ... Truly mean it 😍😍😍😍
Amazing content. Loved it 💥
Thank you for sharing such informative session
Glad it was helpful!
Awesome explanation
Hey there Dhaval Sir ! Just finished creating this project, Following along and It was really amazing ! Got to learn a lot in the process. Had some issues with installations and versions at some steps, But solving them helped me learn more. Thank you very much 🙏
Great 👍
Can you please elaborate on what issues you faced at time of installations and versions as when I installed all the packages of the requirements.txt it gives this import error :
ImportError: Could not import google-generativeai python package. Please install it with `pip install google-generativeai`.
Code :
from langchain.llms import GooglePalm
api_key = "my api key"
llm = GooglePalm(google_api_key=api_key,temperature=0.8)
I had installed google-generativeai but it still gives this error
@@DARK-fs3rzI am getting error when I try to load it data=loader.load() error: 'utf-8' codec can't decode byte 0x92 in position 1197: invalid start byte.How to fix it?
Excellent 💯
@@amuralikrishna22 Open the csv file, you will find some special characters in prompts. Remove them and try again.
Thank you for providing such a valuable videos, In your free time could you please make a video on Concept Normalization .
Thank you sir . This vedio will very very useful to students. Moreover it is inspiring to those are settling as data scientist
You are most welcome
@@codebasics SIR UDATE DISCORD LINK
Thank you for this
This tutorial video helps me to complete my project 'chat with local pdf file'. Thank you 🙏.
So glad it resonated with you! 😊
Hey I have a question, so can we use a Word document instead of a CSV file and make the QA application by following the same.
sir, im facing lot of issues with packages used in this project. could you please help me out. its been 3 days since im facing this issue. i have tried in both vsocde and pycharm. please help me out
Great content, thank you and appreciate your effort. Shall we take the same approach to fine tune a LLM to generate python code ?
Thank you!
thank you bro you re a reference in this domain, might allah guide you and help you .
I am very excited when I watch video and title. It's full fill all the needs. And I have a request to you can you add to read pdf which are present in the website that also read and gave answer regarding that . See most of college of University update there notification panel only like they upload pdf. And if we use this it's only scrape the text data present on the website can it also scrape the pdf and creat knowledge base using all the data present on websit. And if it's done there next big hurdle is some are only upload image so can our ai will read that data like if some students of college got placed they not updated the placement page rather than put banner on the homepage. But overall love your content all the time❤❤
Great content
Very Nice video Dhavalbhai. I have question what are the privacy related risks connected to using this approach. Any data breach or anything like that ?
Love you sir ❤
Sir please make more project videos with open source hugging face model and more focoused towards fine tuning
Hi, sir. Since you are working with sequential data, may I kindly suggest that you consider creating a video tutorial on implementing Transformers for time series data? This tutorial could cover topics such as forecasting, classification, or anomaly detection. It's not necessary to cover all of them; just one would be sufficient.
❤❤❤❤q
How well it works for Tabular data having columns from SQL DB. Should we use SQlAgent or Vector DB can work. We aren't getting good result from SQLAgent
Hi, i am struggling about Out of context. how to minimize the percentage of out of context response?
We are expecting blockchain technology and TinyML course also sir
A doubt - How does the llm get to define the input variables i.e. context and question without being explicitly mentioned by user? We nowhere mentioned that the context should be the vectordb and question should be the user query. Any help would be appreciated!
PROMPT = PromptTemplate(
template=prompt_template, input_variables=["context", "question"]
)
same doubt
Hi, can you also cover end to end Autonomous AI agent creation and deployment.
There is plenty of material online but almost no one covers the topic comprehensively enough.
Please can you make a video on RAG implementation
Thank u sir!! Plz make a 6 month roadmap for a fresher data engineer with free resources its a request..
Hello Dhaval, great tutorial as usual !
I have a, probably silly, question (sorry about that).
I saw that even after the 'Instruction' prompt has been specified to indicate to the model that if not relevant documents have been retrieved it must answer 'I don't know'... there are some retrieved source documents anyway, why is that? It is clear that model is not using them as a context for its answer, how can he knows that it must not use them? There is some similarity threshold behind?
Thanks ! :)
how does the system associate answers with prompts if you only load and embed the prompt column ?
I have a question. Is it not necessary to clean the data after loading it?
where the new question is going to add ? is there any performance matrices to check?
Is vector database same as embedding matrux?
Waiting to hear from you
In prompt template there are two variables context and question. When you are using chain("do you have js course"). Is retriever the context? How will it know which is question and which is context?
great work
Did you face any issue's while embedding? Please do reply
@@abhishekghosh9523 No ,i have not faced any issue ...suppose if you face any issue you can use other embedding techniques like hugging face "sentence-transformers / all-mpnet-base-v2" or "sentence-transformers / all-MiniLM-L6-v2"
other transformers to embedding
@@samasrinivasreddy961
Hey thanks for the reply! But already sorted the issue.
Presently facing some dependencies issues while trying to run it on vscode, with huggingfaceinstructorembedding.
Have you faced something similar?
@@abhishekghosh9523 hey have you finished the whole project ?
Sir I am having an error while retrieving question's answer. The error says list index out of range.
waiting...
Sir can u make videos on how to predict future results with past data in basketball or even football I am trying to create a basketball prediction which predicts the result at any point of time of the match
what's the difference between query and retrieve? because both are returning the same result
if i have csv and excel file consist numerical and categorical now i want to get output in llm even for numerical also how to do it ? i need ur help to start this
sir, is there any better way to create a conversational chatbot for a huge database using langchain. I am encountering issues with the payload limit.
Why there is no textsplitters/chunks used here ?
@dhavalpatel,can we say this as rag chatbot which uses source url for context from vector database?
Yes
yes
why don't you save the chain like you did with vector db? and use that model. Im suffering from re running it, as in colab i had gpu, on my machine I don't, plus on colab there are libraries which make configuration easy. if you can please share a tutorial managing like that it'll be great
why can't we use streamlit in jupyterlab why we need pycharm code editor
Plz bring more langchain projecta
Yes. One more project will be published next week. It will be in retail domain
Why are we not splitting the document content in to chunks, in these examples ?
Sir we are encountering ImportError: Dependencies for InstructorEmbedding not found. Please tell how to resolve it . Can we get a list of all depedencies so we do not have to install them one by one . I have already downloaded the files in requirment.txt
When can I call myself a data scientist or a machine learning engineer. What all courses in your playlist will help me reach that tag name
in youtube search "codebasics data science roadmap" watch that video to know what all you need to learn
how to get the OpenAI api key when the existing key has expired , any help or suggestions?
Simply generate a new key no!?
Hi, महान लोग, I am wondering how you evaluate your model performance
Hi Dhaval, When we can expect AI+ML course in code basis
I am building math/statistics course right now once that is launched, next one is AI+ML. It will take few months though.
Does any one tried this recently and ran without any errors?
Sir please create this project as per new syntax of langchain, I am getting stuck while converting it into newer version.
at 19:12 you are using "docs" but it is "data" there, how it is working ?
I used docs and got the same behaviour. I pondered for a while and just moved on. :)
@@kishore961 , im facing lot of issues with packages used in this project. could you please help me out. its been 3 days since im facing this issue. i have tried in both vsocde and pycharm. please help me out
Hi Sir , I stay in Bangalore and I had applied at AtliQ ....Sir can we meet?
Yes .... Waiting a lottt😍......
Sir in previous Rocky Bot...
When I am using the urls which was provided by you...The data from urls is not fetching...( The docs where Empty)
But when I tried with other urls i am able to run without any error... Could you please give me a solution why it is happening...
Please sirrrr
It can be that it has issues browsing those urls. You can try it again to see it works. Or we need to debug it further to check what the issue is. For me it was working ok without any problems.
@@codebasics
Yes sir.... There is issue while browsing the urls....
As you said I have tried multiple times.... More than 20 times... But still not working for the urls you provided...
Please help me to slove sir....
I wish I will get proper solution from you.... Soo that i can put this project in my resume.. Because by seeing your videos I have learned all the things related to Langchain+ llms... (Built small small applications to get practical knowledge) ...But not able show them as end to end project... I thought this rockybot application is very good application to showcase in my resume...
Please help me sirr
@@chinnibngrm272hello in this question answering project I am getting error when I try to load it data=loader.load() error: 'utf-8' codec can't decode byte 0x92 in position 1197: invalid start byte.How to fix it?
same problem.@@amuralikrishna22
Is it possible to do it on colab?
sir i am getting credentials error while running just the poem line itself !!!. can any one help me
were you able to get a solution for this?
is it related to data analysis???
No. This is related to data science, machine learning, Gen AI
Dear sir how to download all model and embedding concept in my local server and how can run the all process without internet connection.
Hello... guys if any buddy have know so please tell me..
Best country to land a job as a data analyst ???????
Tell sir🤚
I have tried to fix this code. It is giving error while running this code.
I wish to better understand the issue of context and question
prompt_template = """Given the following context and a question, generate an answer based on this context only.
In the answer try to provide as much text as possible from "response" section in the source document context without making much changes.
If the answer is not found in the context, kindly state "I don't know." Don't try to make up an answer.
CONTEXT: {context}
QUESTION: {question}"""
PROMPT = PromptTemplate(
template=prompt_template, input_variables=["context", "question"]
why vector FAISS db from_document for documents parameter is Docs instead of data from loader.load() in the notebook? I think it's typo but may be Im wrong
Up
sir, im facing lot of issues with packages used in this project. could you please help me out. its been 3 days since im facing this issue. i have tried in both vsocde and pycharm. please help me out
sir, im facing lot of issues with packages used in this project. could you please help me out. its been 3 days since im facing this issue. i have tried in both vsocde and pycharm. please help me out
same here...please update if you have found a solution.
getting error for line
embeddings = HuggingFaceInstructEmbeddings(
query_instruction="Represent the query for retrieval: "
)
ImportError: Dependencies for InstructorEmbedding not found.
any help??
i am also getting the same error .please let me know if aapka theek ho gaya hai yeh error toh
use a different embedding like
embeddings = HugginngFaceEmbeddings()
this could be seen on the langchain embeddings like he mentioned
Raise NotImplementedError(
NotImplementedError: Need to determine which default deprecation schedule to use. within ?? minor releases....plsss help me to solve these...after 36.13
Hi did you resolved the error ? i am having the same issue.
@@gabbaSLwere you able to solve whole project?
@@ayush07310 yes
@@gabbaSLsorry to ask you again were you able to complete the project ? Since it's been 6 months I'm worrying whether I can start and finish this project without any outdated stuff
ImportError: Dependencies for InstructorEmbedding not found. This error shows even if I installed all libraries
same problem with me , please update if you have found a solution.
When I try to access to MakerSuite it says "Restricted Access". Why?
did you login using your google account? Anyone with a google account should be able to access this.
@@codebasics yes, still got restrictions
@@codebasics got why, in Italy the API is not available
I was facing the same problem in Finland. Tried with VPN and it works.
@@md.mahadehasan737 yes, in EU is not available
@Codebasics- Error Message - line 154, in __init__
raise ImportError("Dependencies for InstructorEmbedding not found.") from e
ImportError: Dependencies for InstructorEmbedding not found. . Can you pls help me to fix this issue?
yes I got the same error too how do we fix this
installed the required dependencies but still get it
i was getting this error too bro and i used gpt4all instead of instructembedding , its working fine for me
unfortunately gpt4all failed for me too@@ttvgolive3436
not sure if its becoz mine is m1 Mac or sth..
18:46 the whole cell is not working😢
yes bro, same.. been stuck there from last 3 hours. If you have found the soln, please share
Same bro....please update if you found a solution.
Not Audi
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚
Best country to land a job as a data analyst ???????
Tell sir🤚