The Idea in 60 Seconds
- In 2023 I was looking for work in a competitive market.
- To figure out the basics of AI, I built a couple of prototypes.
- One was an interview bot, a simple chatbot trained on my CV which people could ask the sort of questions they might about me in an interview.
- One of the technical components of that Soltuion was Langchain.
- This article explains what it is and how orchestration engines like this help chatbots appear more human.
Langchain is a Key COmponent Of Chatbots Like The Interview Bot We Made
Langchain is a critical component of the Interview Chatbot we made.

LangChain allows the developers we hired to create an algorithmic approach to facilitating engagement between a human and a chatbot. LangChain gives us the ability to generate and implement rules and to upload information a users gives it to ‘train’ the interview chatbot.
Source : My own research and questionable Powerpoint skills.
What Is LangChain And How Does It Help You Build A Bot?
We’ve used LangChain to manage the Interview Bot’s behavior, content, and performance. LangChain is designed to enhance the capabilities of OpenAI’s GPT- LLM (Large Language Model). It’s a framework for developing applications powered by language models. It allows you to build a process which is executed in part by an LLM (Large Language Model) as well as the other models to which LangChain has access. I think of it as the master script for the chatbots on the site. It’s what I would call an ‘orchestration engine’. You tell it what needs to run in what order.
From a technical standpoint, LangChain incorporates several key elements that work together to deliver (what appears to the user to be) an interrogative conversation. Some of LangChain’s components include:
- A Way For your ChatBot to Understand Natural Language:
LangChain’s NLU (Natural Language Understanding) engine is the most central part of our Interview Bot MVP (Minimum Viable Product). It processes user input, understands the intent behind queries (see next point), and extracts relevant ‘entities’ (Those are the key bits of the words said by the user which might influence the response the Bot gives.) - User Intent Recognition:
Intent recognition allows the chatbot to identify the purpose of user queries. I worked on Chatbots 6 years ago when they were just starting and, at the time, the key problem, what made the bots hard to work with, was that they weren’t actually very good at recognizing the intent the user had. In short, you typed something in (in technical terns, it was called an ‘utterance’) and the AI responded with ‘I’m not sure..’ LLMs like ChatGPT are now much better at recognizing intent and LangChain can receive the inputs from the user, send them off to ChatGPT for an answer. It then receives back variables it can use to craft a response. - Entity Extraction:
The ‘Entity Extraction’ feature in LangChain helps extract specific information from user input, such as names, dates, or skills (all of which are important given the nature of this particular Bot.) The ability to recognize these things improves the chances the ChatBot’s will understand and process user Interviewer) requests accurately, enabling it to provide tailored responses and relevant guidance for interview preparation. - Text Embeddings:
LangChain can convert text into numerical representations, known as embeddings. I think of this as a way of passing your CV and the other information you’ve given it to a computer ‘brain’ in a way which means it can ‘remember’ what you’ve told it and things which are similar to it. - Prompts and Prompt Templates:
LangChain lets users create dynamic prompts and to iterate them – i.e. establish a prompt and then use the results of that to generate it’s own follow up prompt. In the context of the Interview Bot, prompts can be filled based on our specific situation; your CV (and everything else you’ve given it) is the information and the ChatBot is ‘pretending’ to be you. This gives your Interview Bot a structure so that it can interact with the language model. This is important to the ChatBot because we want to give users a way to enter their own free form text, which will provide a bit of ‘personality’ to the bot. - Document Indexing and Text Splitting:
LangChain offers tools for structuring documents for better interaction with the language model. This includes text splitting, a process that divides large documents into smaller, manageable chunks that the language model can process more effectively. - Vector Stores / Databases and Retrievers:
Vector stores (we call them vector databases) in LangChain are digital libraries which store embeddings and their metadata. Keeping the details you provide your bot in Vector Databases in this way makes embeddings easily searchable. That makes tasks like document retrieval and comparison easier to execute. In the context of this Interview ChatBot, The Vector Database is the ‘brain’ and the ‘memory’ that the chatbot calls upon to answer questions. Retrievers interact with the Vector Database to extract relevant content. You can read more about Vector Databases in the blog on this site. - Dialogue Management:
The dialogue management component of LangChain provides a workable conversation flow in the Interview Bot. It keeps track of the conversation context, manages the dialogue state, and determines appropriate system responses based on the current dialogue history. This is incredibly important for our ChatBot. In developing the bot, we realized how important it was for the Interview Bot to initiate the conversation with something to start a discussion. - Free text / “The Prompt”:
We allow users to set the personality and response structure for their own bot to be whatever they feel best represents them. There is a free text entry area in the Interview Bot settings area of your profile. This area lets you impart some of your personality to your Interview Bot. See below for a suggestion of the sort of prompt you might like to write. You can use that as a starting point or design your own. The prompt also allows for the introduction of a personality and banter mode.
What are the ‘Readers’ in the diagram?
The InterviewBot solution requires that users have the ability to upload a couple of different documents.
- PDF Reader: (for your CV) You can also upload Word documents if you’d like to.
- Q&A Loader: (For specific questions and answers you want your bot to know the answers to, there’s a facility to upload a list of Q (Questions) and A (Answers) in Word format. As we know, most interviews ask common questions – for example, “Tell me a little bit about yourself.” This Q&A list gives you a chance to provide any answers to any questions you think might pop up – to give your Interview Bot a better chance of answering correctly, on your behalf. Initially, we did this in Excel but it just didn’t work as well as Word. LLMs appear to prefer an FAQ format in the more common format.
Other Technical Things To Think About
When setting up Langchain, and testing the resultes our solution generated, we realised that there were a couple of additional things to be considered:
- Temperature:
Temperature is simply a measure of how ‘random’ (or ‘creative’) you want the answers to be. My general answer is “not very” for an Interview Bot in professional mode. You’re not there to make up stories, you’re involved in a 2 sided evaluation of whether you’re right for the job and whether the job and the company is right for you. - Prompt Engineering:
You’ll have heard a bunch about prompt engineering from experts on TikTok. There is not much I can add to their wisdom. Some say prompt engineering will be a job in the future. I’m not so sure that there will be jobs on the horizon which pay hundreds of thousands of dollars a year to. Include phrases which will help your bot act on your behalf. Suffice to say that we tried many, many prompts to get to the version we launched with. We also tied the prompts in with the capabilities of LangChain which I described above.
It’s All Built Around LangChain
We may change the tools we use in this Interview bot as more become available over time. For now, we’ve built our solution around LangChain and we’re pleased with the results.
If you want to drop us a line and talk about this Interview Bot, please do at interviewbot38@gmail.com