No video

LangChain Expression Language - The ONLY video you need to TRULY understand LCEL

  Рет қаралды 4,376

Coding Crash Courses

Coding Crash Courses

Күн бұрын

In this video, we'll do a deep dive into the LangChain Expression Language-the backbone of LangChain. This is the only video you'll need to really understand the ins and outs of LCEL and its Runnable Interface.
Code: github.com/Cod...
Timestamps:
0:00 - Intro
0:37 - Basic Chain and invoke method
3:06 - The magic of the pipe operator
8:11 - RunnablePassThrough
9:02 - RunnableLambda
10:03 - RunnableParallel
13:00 - More complicated chains
18:35 - Real world Chain - easy!
#langchain #LCEL

Пікірлер: 53
@pratiknarendraraut6889
@pratiknarendraraut6889 3 ай бұрын
Best teacher on KZfaq , get this man on million subs asap.
@efneogearbox
@efneogearbox 2 ай бұрын
This is one of the best LCEL tutorials, not directly copying examples from LangChain website. Thank you!
@riteshsingh811
@riteshsingh811 Ай бұрын
I am working in Deloitte as consultant and your videos helped me to train other folks. Love from India ❤
@codingcrashcourses8533
@codingcrashcourses8533 Ай бұрын
@@riteshsingh811 great to hear that.
@ramishelh9998
@ramishelh9998 2 ай бұрын
One of the best tutorials on LCEL. Thanks a lot!
@codingcrashcourses8533
@codingcrashcourses8533 2 ай бұрын
Thank you very much
@eloiseidlitz7062
@eloiseidlitz7062 Ай бұрын
Purely helpful ! I love it ! Big thank to you !
@codingcrashcourses8533
@codingcrashcourses8533 Ай бұрын
Thank you for your comment
@roman9788
@roman9788 5 күн бұрын
At 3:30 the example is a bit misleading, as it's not "is one of the two numbers larger than 1?". The | operator is a bitwise OR, e.g. 1|2>2 is true (because 01|11=11=3) even when both numbers individually aren't. Great content though!
@Songobu2
@Songobu2 28 күн бұрын
very nice tutorial! thank you very much! appreciate your work very much
@mr.daniish
@mr.daniish 3 ай бұрын
Pure knowledge bomb!
@user-sj1tp5mg6v
@user-sj1tp5mg6v 3 ай бұрын
It's awesome video!!! I finally figured out how it works! Thank you very much! ❤❤❤❤ And I absolutely agree with idea that this great video should be in their shitty docs
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
thank you for that great feedback
@thunken
@thunken 3 ай бұрын
@@codingcrashcourses8533 yeah their docs need attention; great vid
@mateusztylec215
@mateusztylec215 Ай бұрын
This is just great!
@codingcrashcourses8533
@codingcrashcourses8533 Ай бұрын
Thank you :)
@yazanrisheh5127
@yazanrisheh5127 3 ай бұрын
This definitely helped me understand more about LCEL. Thank you so much. Just to make sure I understood what you explained in the video, runnablepassthrough is simply taking any input variable and it keeps it as it is to pass it to another runnable right? For example if I wanted to implement memory in my RAG application, I would create a function and where the input of it is from the runnablepassthrough and I pass that into a runnablelambda. If I had another function, I'd do the same and pass it inside runnablelamdba and finally to construct the entire chain, I connect them all to a runnable parralel. Is this right? Also, sometimes I see "itemgetter" on langchain docs. Could you explain what that is
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
Yes. For Memory pass the memory through the RunnablePassthrough and don´t change it until you pass it to the model. Itemgetter does the exact same as lamdba x: x[key]. Use that when you have dictionaries as objects.
@yazanrisheh5127
@yazanrisheh5127 3 ай бұрын
@@codingcrashcourses8533 Thank you so much!
@deadlooop
@deadlooop 3 ай бұрын
Gave you the the * in git repo, and subscribed as well 👍
@pnhbs392
@pnhbs392 2 ай бұрын
around 19 min, `{"context": retriever | format _docs, "question": RunnablePassthrough ()}` is the first item in the chain ... how exactly does that get coerced to a RunnableParallel? What does the coercing and when is it done? In Python, `__or__` is called on the item to the left of the operator, which here is a dictionary ...
@codingcrashcourses8533
@codingcrashcourses8533 2 ай бұрын
LCEL does some kind of magic and interpretes this as RunnableParallel. How be honest, I don´t really know how
@matuskokoska312
@matuskokoska312 2 ай бұрын
exctremely helpful video, thank you very much
@Kube4x
@Kube4x 2 ай бұрын
How would it work if I had more than one input var in the prompt. For example, my prompt has {height} and {weight} how do I pass both values with runnable ?
@codingcrashcourses8533
@codingcrashcourses8533 2 ай бұрын
Input={weight: 1, weight: 1}
@AbhishekSingh-pj1oo
@AbhishekSingh-pj1oo 18 күн бұрын
This video should be in docs
@Lowlightu
@Lowlightu 3 ай бұрын
Amazing video! Interestingly the result of the RAG was Tuna instead of "thuna", any idea why it didn't use the word from your documents and supposedly used its own knowledge.
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
Interesting point. I guess the llm just corrected the Spelling mistake
@abhinavmane60
@abhinavmane60 2 ай бұрын
Hey I am building a bot for a call centre but I want the bot to do a credential check first like confirm the name how do I achieve that please respond.
@codingcrashcourses8533
@codingcrashcourses8533 2 ай бұрын
You need some kind of routing mechanism to detect this. You can watch my "routing" video on my channel to take the ideas from there.
@abhinavmane60
@abhinavmane60 2 ай бұрын
@@codingcrashcourses8533 Oh okay thanks see you there
@farhanafridi8694
@farhanafridi8694 3 ай бұрын
Is their any way i can include memory in the code you provided at the last? I am encountering errors while doing it.
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
What did you try?
@nintendo2000
@nintendo2000 3 ай бұрын
what vs code extension are you using to run notebooks?
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
None, vscode has that built-in
@jacehua7334
@jacehua7334 3 ай бұрын
Really great video so I'm guessing you can actually pass the metadata the same way that you do at the end so the LLM can consider the metadata as well?
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
The metadata is not for the LLM, the metadata is for you. Retrievers can use them to filter or so, but you don´t pass them to the LLM
@jacehua7334
@jacehua7334 3 ай бұрын
@@codingcrashcourses8533 let’s say I want to do a recommendation system of some sort. Besides considering the text embeddings how might I also include the metadata as a consideration. I’ve seen people do self querying but kind of interested if this can be put in as well into the prompt.
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
@@jacehua7334 Well to be honest, I don´t see any value in doing that, but you can of cause preprocess your documents and just append the metadata as string to the content and tell the LLM to take it into consideration for whatever you want. But I think it´s a bad idea to pass it to the LLM. Do whatever you want before, but don´t pass it to the LLM
@user-dk8dm8db8t
@user-dk8dm8db8t 3 ай бұрын
Can you share the notebook? It'd be of great help!
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
sorry - totally forgot to include that. Updated the description. Thank you for pointing it out
@user-dk8dm8db8t
@user-dk8dm8db8t 3 ай бұрын
@@codingcrashcourses8533 No prob!
@user-dk8dm8db8t
@user-dk8dm8db8t 3 ай бұрын
@@codingcrashcourses8533 Thanks!
@SashaBaych
@SashaBaych 3 ай бұрын
Finally!
@farhanafridi8694
@farhanafridi8694 3 ай бұрын
❤❤
@ericmagalhaes
@ericmagalhaes Ай бұрын
If possible I would give 1k likes! that solved hours of studying!
@codingcrashcourses8533
@codingcrashcourses8533 Ай бұрын
Thank you for that comment. Really appreciate that :)
@kacperwodarczyk9349
@kacperwodarczyk9349 3 ай бұрын
in their shitty documentation should be a links to your videos
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
haha thank you :)
@yazanrisheh5127
@yazanrisheh5127 3 ай бұрын
first
@fraternitas5117
@fraternitas5117 3 ай бұрын
LCEL is a huge mistake to invest in.
@codingcrashcourses8533
@codingcrashcourses8533 3 ай бұрын
Why?
@fraternitas5117
@fraternitas5117 3 ай бұрын
@@codingcrashcourses8533 because it is a DSL and not a general purpose programming language it forces vendor lockin.
Introduction to LangGraph: A Quick Dive into Core Concepts
21:54
Coding Crash Courses
Рет қаралды 9 М.
LangChain Expression Language (LCEL) Explained!
25:38
James Briggs
Рет қаралды 17 М.
ТЫ С ДРУГОМ В ДЕТСТВЕ😂#shorts
01:00
BATEK_OFFICIAL
Рет қаралды 10 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 32 МЛН
Soukaku's new voice :( - Zenless Zone Zero
1:47
PaiiChan
Рет қаралды
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 244 М.
Tool Calling with LangChain is awesome!
13:41
Coding Crash Courses
Рет қаралды 3,2 М.
LangChain - Advanced RAG Techniques for better Retrieval Performance
24:57
Coding Crash Courses
Рет қаралды 28 М.
100+ Docker Concepts you Need to Know
8:28
Fireship
Рет қаралды 908 М.
Easy C# Tutorial - Understand Attributes and Write your Own!
13:24
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,1 МЛН