LangChain Crash Course for Beginners

  Рет қаралды 146,393

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Learn how to use LangChain in this crash course for beginners. LangChain is a framework designed to simplify the creation of applications using large language models. It makes it easy to connect AI models with a bunch of different data sources so you can create customized NLP applications.
✏️ Course developed by ‪@rishabincloud‬
⭐️ Resources and Code ⭐️
Code Pets Name Generator - github.com/rishabkumar7/pets-...
KZbin Assistant - github.com/rishabkumar7/youtu...
LangChain docs - docs.langchain.com/docs/
Streamlit - streamlit.io
⭐️ Contents ⭐️
⌨️ (0:00:00) Intro to LangChain
⌨️ (0:03:19) Requirements for the projects
⌨️ (0:05:04) First Project - Pets Name Generator
⌨️ (0:28:41) Agents within LangChain
⌨️ (0:35:54) Second Project - KZbin Assistant
⌨️ (0:40:04) Creating our own vector stores
⌨️ (1:01:44) Conclusion and OpenAI API Costs
🎉 Thanks to our Champion and Sponsor supporters:
👾 davthecoder
👾 jedi-or-sith
👾 南宮千影
👾 Agustín Kussrow
👾 Nattira Maneerat
👾 Heather Wcislo
👾 Serhiy Kalinets
👾 Justin Hual
👾 Otis Morgan
👾 Oscar Rahnama
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news

Пікірлер: 138
@mochimochi5394
@mochimochi5394 8 ай бұрын
7:08 virtual environment and pip install 13:13: prompt template 14:11 chain 18:40 langchain helper py and streamlit 27:14 set output key 29:05 agents 32:42 giving task to agent 36:13 indexes and building youtube assistant 49:43 k
@LNN5194
@LNN5194 Ай бұрын
Beautiful introduction to Langchain. Amazing that you made 2 demos in 1 hour with such clarity and simplicity
@SgtVenom
@SgtVenom 8 ай бұрын
I cannot explain the usefulness of this tutorial. Helped me understand a lot of topics and also gave me some project ideas. 10/10. 🙌
@rishabincloud
@rishabincloud 8 ай бұрын
awesome, excited to see what you build! ✨
@webplethora
@webplethora 8 ай бұрын
I appreciate the effort to deliver a well-structured and very informative course. I just want to point out that rather than using multiple if statements for the pet_color as in the snippet below, if animal_type == "Dog": pet_color = st.sidebar.text_area( label="What color is your dog?", max_chars=15 ) if animal_type == "Cat": pet_color = st.sidebar.text_area( label="What color is your cat?", max_chars=15 ) ... you could do the below to avoid multiple if statements. pet_color = st.sidebar.text_area(label=f"What color is your {animal_type}?", max_chars=15)
@raismohaman6151
@raismohaman6151 8 ай бұрын
My thoughts exactly. You could even use animal_type.lower() to remove the capital first letter
@amogus1337-tw7wc
@amogus1337-tw7wc 4 ай бұрын
I think this could be done for the less experienced viewers to understand
@nirmesh44
@nirmesh44 7 ай бұрын
Brilliant stuff man. Keep up the good work.💯
@dtaubaso
@dtaubaso 8 ай бұрын
This was incredible!! Thank you so much for this video, it was really easy to understand and follow! I can't wait to start doing my own projects with langchain!!
@rishabincloud
@rishabincloud 14 күн бұрын
Glad you found it helpful!
@sv2109
@sv2109 8 ай бұрын
This is brilliant! Definitely the best langchain course for beginners. I saw several another courses on youtube and still couldn't understand fully how all of its tools works together. Only after this one I finally got it! Thank you so much!
@mrchongnoi
@mrchongnoi 8 ай бұрын
Excellent video. Cleared up a number of topics.
@rishabincloud
@rishabincloud 8 ай бұрын
glad you liked it!
@madhumitachatne2111
@madhumitachatne2111 5 ай бұрын
Great Video!! First AI related tutorial I watched end to end!
@greygoogone5174
@greygoogone5174 7 ай бұрын
Great tutorial. Streamlit seems incredibly useful. I would support a streamlit tutorial.
@syedomershah4361
@syedomershah4361 8 ай бұрын
Was literally searching for this course and you guys uploaded it
@aymanjaber2585
@aymanjaber2585 7 ай бұрын
Amazing intro video, thank you so much.
@yuricamposklink1400
@yuricamposklink1400 7 ай бұрын
Awesome content! Thanks for the video! Cheers from Brazil
@erwinleo7337
@erwinleo7337 8 ай бұрын
I'm not done with the html css tutorial and yet they upload another one tutorial. HOW PASSIONATE THEY ARE😭
@Tidbit0123
@Tidbit0123 8 ай бұрын
@@nicknico4121 heres a pro tip, do not learn new ones constantly. Pick one you think you might like, and get skills and build those skills until you can complete an application or project that you designed and implemented yourself. There is no need to be learning all the new frameworks and languages every 2 minutes, you cannot keep up and even the best developers in the world don't keep up. Get the core skills first, then you can build applications in any language or framework your project calls for.
@paakito799
@paakito799 8 ай бұрын
​​@@nicknico4121you shouldn't be worried about that, learn on your own pace and you'll be grateful afterwards. also, you should really only choose one programming language you think it's interesting to learn and stick to it.
@defaultdefault812
@defaultdefault812 8 ай бұрын
What?
@defaultdefault812
@defaultdefault812 7 ай бұрын
Dude this is a million miles away from html CSS ... Come back in 6-12 months.
@erwinleo7337
@erwinleo7337 7 ай бұрын
@@defaultdefault812 default bro. That's not the point of my comment I just admire how these people so passionately creating videos as soon as possible. I know I'm not that far, but what I'm sure is that I'm consistent in my own pace. Goodluck in your journey.
@NS_Miata
@NS_Miata 7 ай бұрын
Really cool tutorial and very helpfull for beginners. Best on KZbin I woul say. Just a quick tip for starters. Start with doeing a few non-coders like Langflow or Flowise. They realy help to visualize what you are doing. For me it realy helpt to understand the fundamental concepts of which componentens to use.
@user-vg6kh1bj5i
@user-vg6kh1bj5i 5 ай бұрын
Very, very cool! Thanks for making this video. Hopefully, you'll make a "Langchain: Taking it to the next level". :)
@abdulqadar9580
@abdulqadar9580 7 ай бұрын
You are crushing it bro.
@mohamedhassan8260
@mohamedhassan8260 3 ай бұрын
Thanks for this great vid 💕👌
@ericsalesdeandrade9420
@ericsalesdeandrade9420 8 ай бұрын
Fantastic course thank you
@massimodaros391
@massimodaros391 4 ай бұрын
Thanks for this video. It's very interesting and very easy to undestand.
@NotesandPens-ro9wx
@NotesandPens-ro9wx 5 ай бұрын
At least I got basic concepts cleared :) now I am making my app :D
@JoeSmith-kn5wo
@JoeSmith-kn5wo 6 ай бұрын
great video!!
@prashlovessamosa
@prashlovessamosa 8 ай бұрын
Thanks Rishabh.
@wlancer8826
@wlancer8826 7 ай бұрын
Hi, I really like your PS1 setups looks very neat! Could you make a video of it?
@skyforever1000
@skyforever1000 Ай бұрын
what I can say, super, super helpful ..., thank you
@user-wj1ee6cx7h
@user-wj1ee6cx7h 7 ай бұрын
Thanks for the nice introduction. Can you clarify which versions you have for the requirements?
@jawaidekram1288
@jawaidekram1288 7 ай бұрын
Great course - THANKS. Q: Is there a playlist or other videos that go into deeper details?
@eugenmalatov5470
@eugenmalatov5470 8 ай бұрын
Just fantastic !!! Thanks a lot. Some questions that come to my mind: - How to use it with HunggingFace Models or gpt4free? - How to use it with graphics or video based models like DALL-E? - Lets imagine I have a PDF that I convert to a vector db. What is the difference between asking an AI just based on the information of this PDF, as opposed to the total knowledge of ChatGPT + the information of the PDF? How to combine and compare it? - Since you are an Amazon Pro: Show how to deploy everything in the cloud with Beanstalk or the other web services
@arijitianbiplab2604
@arijitianbiplab2604 8 ай бұрын
Lots of Love
@HaiderAli-lr9fw
@HaiderAli-lr9fw 8 ай бұрын
Thanks for the brilliant video. There is a small bug, while using lch.get_response_from query method, please pass k variable a value. Do you use any extension for terminal? Thanks
@joseaguilera-lizano2461
@joseaguilera-lizano2461 4 ай бұрын
Thanks so much 😊
@nathanhart9184
@nathanhart9184 8 ай бұрын
Nice one.
@Nishanth_S
@Nishanth_S 8 ай бұрын
❤ From India
@susolkin
@susolkin 8 ай бұрын
Craving for Flowise full course, which is no-code UI on top of langchain
@nigerianprince5389
@nigerianprince5389 6 ай бұрын
thanks for such a helpful course the section for the Youtubw Assistant is much too dense and a bit all over the place. you don't run the langchain helper to check if file is okay (for a noob like me, i have to) then you are bouncing between tabs - also makes things more confusing. break that section down into specific chunks in the video, so that those of us who are ony starting out at coding can follow
@GeoWildcat
@GeoWildcat 7 ай бұрын
Much better than a course I bought on Udemy :D
@ashwaniraj4880
@ashwaniraj4880 8 ай бұрын
Please make a video for Time series forecasting
@nicholaslim2913
@nicholaslim2913 6 ай бұрын
very cool.
@user-zc7fv1rd4b
@user-zc7fv1rd4b Ай бұрын
what is the extension or package you use that shows the CPU and Mem on the command line? Looks really cool
@dwarkeshkaswala6553
@dwarkeshkaswala6553 7 ай бұрын
Nice 👍👍
@chaitanyakulkarni6416
@chaitanyakulkarni6416 8 ай бұрын
First .❤😊
@prasanna6798
@prasanna6798 2 ай бұрын
Hey you got a good learning experience, but one question, or we can able to do this things instead of using chat open ai to Microsoft Azure Open AI, can you give some notes on it.
@user-xk7de1jw8g
@user-xk7de1jw8g 8 ай бұрын
I like it.
@jpssasadara3624
@jpssasadara3624 4 ай бұрын
Thanks
@yashwanthyash352
@yashwanthyash352 7 ай бұрын
It would be helpful if someone could help with the answers. Why do we need to use an embedding model, rather we can just ask the Gpt- 4 model to answer our question based on our custom data, right? What is the use of an embedding model over a gpt- 4? What if I want to create a text classifier based on my custom data what should I use?
@leilalooloo8267
@leilalooloo8267 8 ай бұрын
thx for ur video, I wanna connect 7b-chat-hf to langchain for summarization, neither map-reduce nor refine responds me, in the last step- map reduce took 2 hrs without responding and refine gives me blank document, have u faced this problem
@pradeepvenkatesan5806
@pradeepvenkatesan5806 3 ай бұрын
text-davinci-003 has since been deprecated. The same tutorial works for me if I replace it with "gpt-3.5-turbo-instruct". Good Luck.
@sallylauper8222
@sallylauper8222 8 ай бұрын
This so useful. I was having trouble thinking of a name for my cat.
@Enjoyablewalks
@Enjoyablewalks 8 ай бұрын
😂😂😂😂😂
@shibbling
@shibbling 6 ай бұрын
Can someone else just appreciate with me that at approx 16:00 we learn that it takes 28Gb of memory to choose a Cat name. I died laughing. great video. i shall now continue watching.
@consig1iere294
@consig1iere294 8 ай бұрын
Please do a crash course for Beginners for Local LLMs.
@Flydergast
@Flydergast 7 ай бұрын
I still can't see why we need langchain. We can do templating with Jinja and use vllm for serving your LLM. Integrating with APIs is basic programming. Getting back structured data is much better with Guidance, LQML or Jsonformer. So why to use Langchain? I seem to not get it.
@nikolaypenev6032
@nikolaypenev6032 7 ай бұрын
Failing at the start unfortunately when running the dog name generating script. I can print the model name so things are set up correctly package wise, but when the code reaches name = llm("Write 5 dog names") it throws the error : "module 'openai' has no attribute 'error' "
@GagarineYuri
@GagarineYuri 4 ай бұрын
How come is it possible to have k=4 ? It only allows 97 tokens left for the prompt template and the output.
@akilkudil
@akilkudil 8 ай бұрын
Thanks for the effort. Do you have any udemy course on this topic?
@Reality_Check_1984
@Reality_Check_1984 3 ай бұрын
This has been great so far but for some reason it breaks down for me at the output key. I am getting a key error, " KeyError: 'pet_name'. Any ideas?
@DesignsbyBlanc
@DesignsbyBlanc 8 ай бұрын
FCC for the win!
@carpanojr
@carpanojr 4 ай бұрын
my man really started the tutorial copying Rabbitmetrics video on the subject word for word
@0xtz_
@0xtz_ 8 ай бұрын
First 🥇
@Majoh-us1ld
@Majoh-us1ld 6 ай бұрын
👏👌
@bhanuchirutha
@bhanuchirutha 5 ай бұрын
what are embeddings you imported it not explained or i missed it ?
@langqin3707
@langqin3707 28 күн бұрын
A questoin here: When I was following the agent part, I do used tools of wikipedia and llm-math, but the agent only chosed to use calculater but not wikipedia throughout the process. It gives " I need to find the average age of a dog and then multiply it by 3 Action: Calculator Action Input: 3 * (12 + 15 + 10 + 8 + 5) / 5 Observation: Answer: 30.0" for the first part, which is very weird cause I expect it to use wikipedia instead. Anyone knows why?
@Rohitsingh2410
@Rohitsingh2410 7 ай бұрын
I’ve not gone though it but can someone tell me this is not just another api calls to open api right ?
@powerball200
@powerball200 5 ай бұрын
Do i need to learn any language or skills before learning langchain?
@MohitKumar-dd8fc
@MohitKumar-dd8fc 7 ай бұрын
Can anyone please help me - how to get the exact poweshell as the guy using above?
@photoskiff
@photoskiff 8 ай бұрын
very informative, thanks, but this ugly bit of code around 23:50 made me feel extremely uncomfortable. instead of copy-pasting of the same code multiple times, why not use a simple f-string f"What color is your {animal_type}?" and dump all your "if" statements completely?
@defaultdefault812
@defaultdefault812 8 ай бұрын
Easier for beginners to follow
@tejas_gaonkar
@tejas_gaonkar 8 ай бұрын
Robotic operating system course plz😢
@cookies4techies992
@cookies4techies992 6 ай бұрын
getting error like belwo when pip install langchain command my intalled python version is 3.12 ERROR: Ignored the following versions that require a different python version: 0.55.2 Requires-Python
@199ua75
@199ua75 8 ай бұрын
I hated my English teacher cuz she just make me feel weid ND stupid but I'm good at English 😿
@akshaysharma30498
@akshaysharma30498 6 ай бұрын
Did I hear zero shot react uses react framework?
@MrFlexNC
@MrFlexNC 8 ай бұрын
So much complexity could have been resolved with f-strings, right? instead of using the llm template, just use an f-string, instead of using if statements for each animal type, use an f-string, ...
@daiwikkashyap1616
@daiwikkashyap1616 8 ай бұрын
Can anyone explain that does it send 4000 words at a time or a total of 4000 words because of token limit? If it only sends 4000 words when k=4, how does it come to conclusion without reading the whole transcript? Thank you for the help, very informative and interesting video.
@georgiospantermakis3006
@georgiospantermakis3006 5 ай бұрын
Based on my understanding, the KZbin assistant finds the 4 most similar parts of the transcript*, merge them, and then feeds the text-davinci-003 with the merged text. So, based on these 4000 chunks, the text-davinci-003 tries to answer the user's question. *Each part contains 1000 chunks
@Ricocase
@Ricocase 8 ай бұрын
Fcc...winning!
@kasper369
@kasper369 8 ай бұрын
Aw I wished this would be in javascript, but this works too
@pandey.anantk
@pandey.anantk 8 ай бұрын
6:03 "Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases." Even though i have installed python on my system. Please resolve this issue. Thank you!
@defaultdefault812
@defaultdefault812 8 ай бұрын
You probably need to install it in your virtual environment.
@4399lol
@4399lol 8 ай бұрын
no module named 'langchain', which streamlit does no like it
@fcanapa
@fcanapa 8 ай бұрын
What tool is he using to get his command prompt to show his cpu and mem usage? I have been using my best google foo to find it with no luck.
@curliet
@curliet 8 ай бұрын
I think it may be "oh my posh" 🤔
@dtaubaso
@dtaubaso 8 ай бұрын
powershell
@rishabincloud
@rishabincloud 6 ай бұрын
I am using oh-my-posh, theme called “clean-detailed”
@DaniDipp
@DaniDipp 7 ай бұрын
Why does the OpenAI LLM not respond with all the fluff like "Certainly! Finding a fitting name for a pet is a difficult process, and I'm happy to help in this regard. With this said, here are five examples of names that might fit your cat, which is black of color: 1. Shadow - Shadow is a common name for any black animal, so it would fit really well for your pet cat. 2. Midnight - The name midnight refers to the time of day at 12 am when it's really dark outside. The darkness is a reference to your cat's color! 3. etc etc etc Always remember that it's a big responsibility to choose a proper name for a pet. It's not easy to make such a decision lightly!"
@darrenfinch1935
@darrenfinch1935 6 ай бұрын
Not sure, but I do know that if you tell ChatGPT to provide the output in a particular format, it will do so. E.g. tell it to "provide the output in a numbered list format and do not include any other text than the numbered list" and it will do that.
@hp_12345
@hp_12345 8 ай бұрын
can anyone tell me do we have to pay for the API key ? than and then we execute it?
@YaroslavPoltaran
@YaroslavPoltaran 8 ай бұрын
Hi, no. You need to provide your card info, and then, at the end of the month, OpenAI will charge you as much as you spent. BTW they don't take any money when you used a small amount, for example 2 cents :)
@Ramzankhan-ql4nt
@Ramzankhan-ql4nt 8 ай бұрын
Hi ,very good i need course of searched clients Mean clients hunting crash course for every purpose with extremely deeply techniques and things which you know and even have made anyone this course tell me. Thanks ❤❤❤
@CryptoLando
@CryptoLando 8 ай бұрын
thanks keep getting rate limit errors lol
@eugenmalatov5470
@eugenmalatov5470 8 ай бұрын
Question to the crowd: What are the main python libraries to know apart from LangChain? Huggingface? OpenAI? Is AutoGPT a library? sorry, I am a bit lost.
@defaultdefault812
@defaultdefault812 8 ай бұрын
Just learn one and stop trying to run before you can walk. Langchain is a framework. Huggingface is a platform for deploying LLMs Open AI is a service provider. AutoGPT Is a library. Go start with OpenAI APIs
@sushmitaraj6948
@sushmitaraj6948 6 ай бұрын
hi can you help me , what embedding i can use if i want the youtube assistant using in open source@@defaultdefault812
@sekching8197
@sekching8197 4 ай бұрын
sorry i am like total begiinner, on 0:05:04 what is the app u are runnning?
@Mark-vv8by
@Mark-vv8by 3 ай бұрын
that's command prompt, just search 'cmd' on your window
@qwert-ly7uc
@qwert-ly7uc 2 ай бұрын
The code for the first example is now wrong and outdated.
@danielvalle9986
@danielvalle9986 2 ай бұрын
Sadly none of this code works anymore by April 2024
@super7ace
@super7ace 7 ай бұрын
me setting tempreture to 100 and it gave me 'Cat K!ller' as my dog's name 💀
@dhrumil5977
@dhrumil5977 8 ай бұрын
Why not teach langchain using gpt4free instead of open ai key
@Schadenfreudee
@Schadenfreudee 6 ай бұрын
You took most of the statements that you said in the introduction of this video from the 8 month old video on LangChain from Rabbitmetrics. You should have the decency and courtesy to at least mention that and cite that. It is a very bad practice to copy stuff from others and not cite it
@shadmansudipto7287
@shadmansudipto7287 2 ай бұрын
Thank you!
@mhillary04
@mhillary04 Ай бұрын
Most of this video is based on langchain documentation 😂😂
@kasper369
@kasper369 8 ай бұрын
Can we have Course for Advance or experts, instead of beginners all the time
@nicknico4121
@nicknico4121 8 ай бұрын
pay
@Knuhben
@Knuhben 4 ай бұрын
How is this for beginners? already failing at 5:33! Explain the steps for fucks sake!
@GeoWildcat
@GeoWildcat 7 ай бұрын
Around minute 23, how about: st.title("Pets name generator") animal_type = st.sidebar.selectbox("What is your pet?", ("Cat", "Dog", "Cow", "Hamster")) pet_color = st.sidebar.text_area(label="What color is your " + str.lower(animal_type) + "?", max_chars=15)
@ermalai
@ermalai 5 ай бұрын
I tried the agents as per your example, I added both wikipedia and ll-math as tools, and I asked the exact same question, but the response starts with action:calculator and it tries to compute the math first rather than using the wikipedia to search first. the agent is not reasoning... May I have your views?@rishabincloud
CrewAI Tutorial: Complete Crash Course for Beginners
1:05:43
codewithbrandon
Рет қаралды 144 М.
LangChain Explained in 13 Minutes | QuickStart Tutorial for Beginners
12:44
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 1,5 МЛН
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 397 М.
What is LangChain?
8:08
IBM Technology
Рет қаралды 146 М.
Build a Python Web App to chat with your datasets using GenAI
4:23
Tech at Worldline
Рет қаралды 20 М.
20 Programming Projects That Will Make You A God At Coding
14:27
The Coding Sloth
Рет қаралды 447 М.
3 Levels of WiFi Hacking
22:12
NetworkChuck
Рет қаралды 1,5 МЛН
Gen AI Course | Gen AI Tutorial For Beginners
3:19:26
codebasics
Рет қаралды 151 М.