Тёмный

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

Coding Crashcourses
Подписаться 9 тыс.
Просмотров 3,2 тыс.
50% 1

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/Coding-Crashkurse/...
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

Опубликовано:

 

26 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@pratiknarendraraut6889
@pratiknarendraraut6889 Месяц назад
Best teacher on RU-vid , get this man on million subs asap.
@ramishelh9998
@ramishelh9998 12 дней назад
One of the best tutorials on LCEL. Thanks a lot!
@codingcrashcourses8533
@codingcrashcourses8533 12 дней назад
Thank you very much
@efneogearbox
@efneogearbox 23 дня назад
This is one of the best LCEL tutorials, not directly copying examples from LangChain website. Thank you!
@eloiseidlitz7062
@eloiseidlitz7062 10 дней назад
Purely helpful ! I love it ! Big thank to you !
@codingcrashcourses8533
@codingcrashcourses8533 8 дней назад
Thank you for your comment
@mateusztylec215
@mateusztylec215 7 дней назад
This is just great!
@codingcrashcourses8533
@codingcrashcourses8533 5 дней назад
Thank you :)
@mr.daniish
@mr.daniish Месяц назад
Pure knowledge bomb!
@matuskokoska312
@matuskokoska312 25 дней назад
exctremely helpful video, thank you very much
@deadlooop
@deadlooop Месяц назад
Gave you the the * in git repo, and subscribed as well 👍
@user-sj1tp5mg6v
@user-sj1tp5mg6v Месяц назад
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 Месяц назад
thank you for that great feedback
@thunken
@thunken Месяц назад
@@codingcrashcourses8533 yeah their docs need attention; great vid
@SashaBaych
@SashaBaych Месяц назад
Finally!
@yazanrisheh5127
@yazanrisheh5127 Месяц назад
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 Месяц назад
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 Месяц назад
@@codingcrashcourses8533 Thank you so much!
@Lowlightu
@Lowlightu Месяц назад
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 Месяц назад
Interesting point. I guess the llm just corrected the Spelling mistake
@farhanafridi8694
@farhanafridi8694 Месяц назад
❤❤
@jacehua7334
@jacehua7334 Месяц назад
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 Месяц назад
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 Месяц назад
@@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 Месяц назад
@@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
@pnhbs392
@pnhbs392 25 дней назад
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 24 дня назад
LCEL does some kind of magic and interpretes this as RunnableParallel. How be honest, I don´t really know how
@nintendo2000
@nintendo2000 Месяц назад
what vs code extension are you using to run notebooks?
@codingcrashcourses8533
@codingcrashcourses8533 Месяц назад
None, vscode has that built-in
@farhanafridi8694
@farhanafridi8694 Месяц назад
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 Месяц назад
What did you try?
@Kube4x
@Kube4x Месяц назад
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 Месяц назад
Input={weight: 1, weight: 1}
@user-dk8dm8db8t
@user-dk8dm8db8t Месяц назад
Can you share the notebook? It'd be of great help!
@codingcrashcourses8533
@codingcrashcourses8533 Месяц назад
sorry - totally forgot to include that. Updated the description. Thank you for pointing it out
@user-dk8dm8db8t
@user-dk8dm8db8t Месяц назад
@@codingcrashcourses8533 No prob!
@user-dk8dm8db8t
@user-dk8dm8db8t Месяц назад
@@codingcrashcourses8533 Thanks!
@abhinavmane60
@abhinavmane60 Месяц назад
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 Месяц назад
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 Месяц назад
@@codingcrashcourses8533 Oh okay thanks see you there
@ericmagalhaes
@ericmagalhaes 5 дней назад
If possible I would give 1k likes! that solved hours of studying!
@codingcrashcourses8533
@codingcrashcourses8533 5 дней назад
Thank you for that comment. Really appreciate that :)
@yazanrisheh5127
@yazanrisheh5127 Месяц назад
first
@kacperwodarczyk9349
@kacperwodarczyk9349 Месяц назад
in their shitty documentation should be a links to your videos
@codingcrashcourses8533
@codingcrashcourses8533 Месяц назад
haha thank you :)
@fraternitas5117
@fraternitas5117 Месяц назад
LCEL is a huge mistake to invest in.
@codingcrashcourses8533
@codingcrashcourses8533 Месяц назад
Why?
@fraternitas5117
@fraternitas5117 Месяц назад
@@codingcrashcourses8533 because it is a DSL and not a general purpose programming language it forces vendor lockin.
Далее
Tool Calling with LangChain is awesome!
13:41
Просмотров 2,3 тыс.
ВСЕ СЕКРЕТЫ КОТА В ВР ( I Am Cat VR )
22:46
LangChain Expression Language (LCEL) Explained!
25:38
So You Think You Know Git - FOSDEM 2024
47:00
Просмотров 1 млн