WORKING CHATBOT IN LESS THAN AN HOUR
So, since November 2022 I’m in awe of what openai had pulled in the form of chatgpt. Y’all know what they did and how much impact they have made in the field of AI. Since, this is isn’t going to be a chatgpt appreciation post , let me tell you that I have utilised it in the best way possible. NO! not just prompt-ing to find answers and pasting it. I have just made use of the unknown framework they released in the form of LANGCHAIN.
What in the blue hell is langchain? you may ask. Or you would’ve already got into a state of boredom. If you are, then stay a little longer and I’ll try to explain in the easiest way possible.
Langchain is a framework( like django, Node.js , React, Flutter) which was developed by OPEN-AI where we can be able to create our own chatbots…..WHATTT!!!!!…How would the biggest tech AI company would let others create their own chatbots. Wouldn’t that be a loss to OPEN-AI for revealing/leaking such a thing to the world. A society where a war can be started with a tweet of a word “Property”, how can they just reveal their algorithm to the open world. Wouldn’t these “Marks” just create another chatgpt or bard with an open source code like this. And they have made their code open source in addition.
Let’s first see how these chatbots work :
I’ll summarize shortly what langchain could do:
- They have created a simple API for interacting with LLMs(Large Language Models which is a type of artificial intelligence (AI) algorithm that uses deep learning techniques and massively large data sets to understand, summarize, generate and predict new content)
- It literally supports the chatbot we’re using right now(i.e., GPT-3)
- All you need is a pdf file to start from
- With very less code, we HUMANS can create a chatbot that could interact legibly with us with limited amount of input data we would give
Basically we could get from the word langchain as we can “chain” together different components to create more advanced use cases around LLMs (Chat gpt / Hugging Face). So, let’s dive into what I have created using langchain with the time limit I got of 30 mins and show what Metamorphosis you too could make with the time you’ve got.
So, Let me just give a gist on what I have developed. I had this hackathon this past week and there was this problem statement i had to choose whose topic is “Develop an AI-powered chatbot that can provide personalized feedback and guidance to students based on their learning goals and progress.”.
At the time of the hackathon, I had only created only the ppt presentation for what I’m gonna do which is a very basic chatbot with a very long code which i don’t even understand. The coordinators present there told me I will be going last. So, with the plenty of time I had , I looked for a way to create a chatbot with the time I got. That is when I got into this github repository created by open-ai had the title “Langchain chatbot” “made changes a week before”. I went into this repository and looked at their readme file and understood that no one is talking about it or a matter of fact- No one knows about this. After looking at their code I wanted to use that in my project. But their readme file had very basic format of their code with no description whatsoever( now it’s changed). I went to the sacred saviour chatgpt to see how i could modify the code to make it apt to my project.
Fast forward to 30 mins I literally created an AI chatbotttt!!!!!!!!!. The most complicated task is made easy and it was the very company which started this revolution.
I’m keep on getting away on what I developed. I downloaded a pdf from Kaggle(another saviour) regarding students academic performance and remarks. Embedded into my code. Used an api-key(which made me rage) from open-ai. Created a chatbot. Easy Peasy
You can see the data I have given as input here https://www.frontiersin.org/articles/10.3389/fpsyg.2016.00603/full
The very notion of this blog is to make it public(…) that these type of things are available on the internet with free of costs. But what we prefer to do is to watch K-dramas all day or pull an all nighter to watch Champions League.
It is very common that in the very final year, people start to finally see what is happening in the world and they have to do something to set their lives. That is when people realize their RIZZ didn’t matter the whole time and have to achieve something in this competitive world. Being in India, this is a recurring theme as every student you could would be playing PUB-G or working on their RIZZ. Anyways, once again I’m getting out of the notion.
I will post this as an open source code in my repository here https://github.com/Harishspice/Chatbot . Feel free to fork and use it for y’all purpose. I have modified it in a way where you just have to change the file name.
THANK YOU MY DAWGS
Any Doubts?
Linkedin: https://www.linkedin.com/in/harish-ravishankar-a4aa79255/
Instagram: https://www.instagram.com/harishblahh/
Twitter(would be fun actually): https://twitter.com/HarishrShankar
Github: https://github.com/Harishspice