HOW to Make Conversational Form with LangChain | LangChain TUTORIAL

preview_player
Показать описание
How to Make Conversational Form with LangChain

My Links:

Github:
Рекомендации по теме
Комментарии
Автор

This is what I had found for a long time! Thank you for your sharing.

tomjerry
Автор

What a great example from a Openai functions, hopefully more other examples from this stuff. Many thanks.

jayhu
Автор

I hope you get everything you want in life! thank you for your videos Sam!

shrvn
Автор

I love it!!! A huge thanks for sharing your knowledge Sam. One thing that's been on my mind lately - suppose a user initially introduces himself with a nickname, like Sam, and later wants to rectify it by saying, 'Apologies, but my actual name is Samuel, not Sam.' Is there an efficient way to manage this within the system and keep the other answers that were already given? I'm genuinely curious to learn more about handling such situations.

timttttast
Автор

Thanks. This is pretty cool for all sorts of interactive content and lead generation but could also be imagined for personalised experiences.

davidw
Автор

Thanks, this was extremely useful! You emphasized that this is still a memory-less version, but because of this, this is really limited, and I don't know yet how to build from this.

I should collect for example a date from the user. In the prompt, I can inject the current date, and thus the AI would be able to sesolve input like "this Friday" or similar. However, as this is memory-less, the parser chain will not be aware of the prompt with the current date or any other contextual info about the date.

I am new in LangChain, so any hint on how to proceed, would be appreciated.

ghrasko
Автор

This use case is similar to one I had been considering for a while. When companies put contact drop form on the web, the prevailing wisdom is to keep the form as short as possible, less you risk turning users away. But marketers always want to have more info, and we know SOME users are OK to share them.

My idea is to have conversational chatbot that tries to collect additional data fields after contact form submission. The bot would collect only as much as users are happy to share, then stop and add the gathered info to the previously submitted form. If users do not want to, they don't have to share anything more. Win-Win.

ChrisadaSookdhis
Автор

Great video. I would love to see an alternative way of conversational form using open source models

lughinoo
Автор

We can even have validations on here, check if the email is valid and ask again if not! Its a great usecase for LLMs

Mrbotosty
Автор

This is great!
What would you do in a case where I want to make a sort of chatbot quiz that asks questions in a certain order. The questions will either be multiple choice or answered by free text.
Meaning the LLM would either need to display the multiple choice options and then record it the user chose the right one. Or the LLM would receive a free text answer and then grade the user on how close it is to the actual textual answer.

The app will need to keep score and then finally grade the user.
Would you use agents or functions here?

joey
Автор

just brilliant .... I would like to ask how you would ensure that a user gives an indication that he is happy with the answer or not? I did play arround with adding this question to the prompt template (including memory) but was not so succesful. It works most of the time, but for whatever reason it is unable to deal with a simple yes / no answer. Looking forward for your tutorial. eye opener

svenandreas
Автор

Sam what if the use case has picklists which are dependent for example if the form has categories of fruits and vegetables and subcategory enumerators based on value of category?

RedCloudServices
Автор

As always, starting with thanks. I am always catching up with your videos.
I am curious about the use of field description in the pydantic class. What purpose does it serve? Is it picked by the LLM as well to understand what this means. Also curious about how to use few shot learning with the tagging chains you have created.

vinsi
Автор

Amazing Tutorial Sam! How could I give the user the option to ask clarifying questions? I guess memory In the ask for chain?

kilopist
Автор

Hi, sorry my question is not video related, but what language model would you recommend for training on a 24GB GPU from scratch if I have my own dataset and want to try from scratch? I don't want to use the pre-trained model because I want to have my own tokenizer and the dataset is not in English. I've played around a bit with GPT-NeoX with models with sub-1B parameter sizes, but I'm thinking that's a pretty old project and that maybe something more up to date (faster) has come out in past months. Thanks

datupload
Автор

Hi Sam, thank you for another great example to learn from :-) When you decided to use Pydantic, was it that you had experience with it and it fits this use case?

kenchang
Автор

Hi @sam, I am getting the below error, when I executed the run command in the Collab which you shared. Any idea what could be the reason?
ValidationError Traceback (most recent call last)
in <cell line: 1>()
----> 1 res = chain.run(test_string)

ValidationError: 1 validation error for AIMessage
content
none is not an allowed value

gautamsk
Автор

Great video thank you very much. What is the next step after creating the two chains? Should I create a global function to call them, develop an API, or consider another approach?

yasminesmida
Автор

I kind of have this working as a feedback form but it's a bit clunky and every question is starting with "I need to gather some feedback...", so it's repeating the "explain you need to get some info" on every loop. I also had to include "not mentioned" in the 'empty' conditions. I can't help but think it needs memory to contextualise what it has already asked but this might be expensive with regards token usage. Maybe you could add a "yes" or a "no" as to whether the question is answered and then have the parser review the memory to pick out the answers from the conversation history? I've not had any luck with that yet though.

PaulBenthamcom
Автор

Most of this is deprecated now. Run vs Invoke changes a lot of things. The function should be used instead of Plus, Pydantic format is different too (dict issues).

VeeDCreate