Build Chat Applications with OpenAI and LangChain

with Hristina Hristova
4.8/5
(17)

Gain cutting-edge AI skills: Master the LangChain framework to build and deploy real-world AI applications

8 hours of content 498 students

$99.00

Lifetime access

Buy now
14-Day Money-Back Guarantee

What you get:

  • 8 hours of content
  • 54 Downloadable resources
  • Interactive exercises
  • World-class instructor
  • Closed captions
  • Q&A support
  • Future course updates
  • Course exam
  • Certificate of achievement

Build Chat Applications with OpenAI and LangChain

$99.00

Lifetime access

Buy now
14-Day Money-Back Guarantee

What you get:

  • 8 hours of content
  • 54 Downloadable resources
  • Interactive exercises
  • World-class instructor
  • Closed captions
  • Q&A support
  • Future course updates
  • Course exam
  • Certificate of achievement

$99.00

Lifetime access

Buy now
14-Day Money-Back Guarantee

What you get:

  • 8 hours of content
  • 54 Downloadable resources
  • Interactive exercises
  • World-class instructor
  • Closed captions
  • Q&A support
  • Future course updates
  • Course exam
  • Certificate of achievement

What You Learn

  • Master LangChain to seamlessly integrate existing applications with potent Large Language Models (LLMs)
  • Learn to connect to OpenAI’s language and embedding models
  • Develop prompt engineering skills that improve performance and relevance of AI responses
  • Apply the state-of-the-art Retrieval Augmented Generation (RAG) technique to empower your AI-driven product with a knowledge base
  • Leverage AI to open up endless opportunities for your organization
  • Enhance your career prospects with rare and highly sought-after AI Engineering skills

Top Choice of Leading Companies Worldwide

Industry leaders and professionals globally rely on this top-rated course to enhance their skills.

Course Description

In this Build Chat Applications with OpenAI and LangChain course, we’ll unravel the LangChain framework that has gained massive popularity in AI. One of the components in this ever-growing ecosystem is the LangChain Python library, which we’ll use to leverage OpenAI’s potent language models and build the foundations for developing intriguing LLM-powered applications in our LangChain course. We’ll employ the power of the LangChain Expression Language to create stateful, context-aware, reasoning chatbots that remember past conversations, answer questions about unseen data, and take action to solve more complex problems. This course is part of our advanced deep learning courses, focusing on practical applications of AI.

Learn for Free

1.1 Introduction to the Course

5 min

1.2 Business Applications of LangChain

5 min

1.3 What Makes LangChain Powerful?

5 min

1.4 What Does the Course Cover?

6 min

Interactive Exercises

Practice what you've learned with coding tasks, flashcards, fill in the blanks, multiple choice, and other fun exercises.

Curriculum

  • 1. Introduction to the Course
    4 Lessons 21 Min

    In this introductory section, we outline the agenda and prerequisites for the LangChain course. We provide an overview of what LangChain represents and how it’s been used in real-life use cases.

    Introduction to the Course
    5 min
    Business Applications of LangChain
    5 min
    What Makes LangChain Powerful?
    5 min
    What Does the Course Cover?
    6 min
  • 2. Tokens, Models, and Prices
    2 Lessons 2 Min

    The smallest building block of a language model is the token. The collection of all unique tokens represents the vocabulary of a language model. In this section, we’ll discuss how a token is defined in the context of OpenAI’s language models and how tokens determine a model’s price. Additionally, we’ll spend a few minutes presenting the different models OpenAI offers. Understanding token management is vital for optimizing the use of OpenAI models.

    Tokens Read now
    1 min
    Models and Prices Read now
    1 min
  • 3. Setting Up the Environment
    3 Lessons 7 Min

    This section lays the groundwork for the course’s practical segment. We’ll cover creating a separate virtual environment with its own Python version and package set. Next, we’ll explain API key management and how to acquire an OpenAI API key—enabling our projects to use OpenAI’s expansive language models. Lastly, we’ll demonstrate setting this API key as an environment variable.

    Setting Up a Custom Anaconda Environment for Jupyter Integration
    4 min
    Obtaining an OpenAI API Key
    2 min
    Setting the API Key as an Environment Variable Read now
    1 min
  • 4. The OpenAI API
    4 Lessons 4 Min

    Before discussing the LangChain framework, we’ll first explore the OpenAI API basics—using various roles in prompts, setting the model temperature to adjust response randomness, limiting completion tokens, and streaming responses. This will later serve as a steppingstone towards understanding LangChain’s integration with OpenAI.

    First Steps Read now
    1 min
    System, User, and Assistant Roles Read now
    1 min
    Creating a Sarcastic Chatbot Read now
    1 min
    Temperature, Max Tokens, and Streaming Read now
    1 min
  • 5. Model Inputs
    8 Lessons 36 Min

    We now enter the realm of LangChain, starting with model inputs. We’ll distinguish between prompts, prompt templates, and chat prompt templates and explore the few-shot prompting—a technique that enhances model responses by training on tailored question-answer examples. We’ll also introduce the invoke() method—essential for the upcoming LangChain Expression Language section.

    The LangChain Framework Read now
    1 min
    ChatOpenAI
    6 min
    System and Human Messages
    4 min
    AI Messages
    5 min
    Prompt Templates and Prompt Values
    5 min
    Chat Prompt Templates and Chat Prompt Values
    6 min
    Few-Shot Chat Message Prompt Templates
    6 min
    LLMChain
    3 min
  • 6. Message History and Chatbot Memory
    6 Lessons 33 Min

    Language models are naturally stateless and don't retain previous interactions. This section of our how to build a chatbot tutorial examines popular methods for conversation storage—using a buffer, a capped buffer, or summarizing ongoing discussions and updating the summary after each interaction.

    Chat Message History
    6 min
    Conversation Buffer Memory: Implementing the Setup
    4 min
    Conversation Buffer Memory: Configuring the Chain
    7 min
    Conversation Buffer Window Memory
    4 min
    Conversation Summary Memory
    7 min
    Combined Memory
    5 min
  • 7. Output Parsers
    3 Lessons 9 Min

    As we’ve seen in previous sections, the output from a language model in LangChain comes as an AI message. This format, however, often doesn’t come in handy as we can’t pass it to other methods or applications. Therefore, LangChain offers what is known as output parsers—making it possible to parse an AI message to a different object: a string, a CSV, a DateTime object, or whatnot.

    String Output Parser
    3 min
    Comma-Separated List Output Parser
    3 min
    Datetime Output Parser
    3 min
  • 8. LangChain Expression Language (LCEL)
    14 Lessons 72 Min

    We now arrive at the crux of our practice journey—a discussion allowing us to build the most essential objects in LangChain: the chains. The foundational idea behind the LangChain Expression Language is that the output of one chain component serves as the input to the next one, making the chains modular objects that can be quickly composed and combined. Additionally, we’ll discuss Runnable objects—the type of objects that can be entered as chain components.

    Piping a Prompt, Model, and an Output Parser
    7 min
    Batching
    5 min
    Streaming
    4 min
    The Runnable and RunnableSequence Classes
    5 min
    Piping Chains and the RunnablePassthrough Class
    8 min
    Graphing Runnables
    2 min
    RunnableParallel
    6 min
    Piping a RunnableParallel with Other Runnables
    6 min
    RunnableLambda 
    5 min
    The @chain Decorator
    4 min
    Adding Memory to a Chain (Part 1): Implementing the Setup
    4 min
    RunnablePassthrough with Additional Keys
    5 min
    Itemgetter
    3 min
    Adding Memory to a Chain (Part 2): Creating the Chain
    8 min
  • 9. Retrieval Augmented Generation (RAG)
    18 Lessons 86 Min

    In this course section, we address retrieval augmented generation—a technique that efficiently supplies context-specific information to a model. This process involves loading and segmenting personal data, embedding these segments, storing them in a vector store, and selectively retrieving and delivering only the relevant segments to the model. We’ll start with a theoretical discussion on this topic, then apply our knowledge to develop a basic 365 Q&A chatbot using transcripts from two 365 lectures.

    How to Integrate Custom Data into an LLM
    4 min
    Introduction to RAG 
    4 min
    Introduction to Document Loading and Splitting
    4 min
    Introduction to Document Embedding
    7 min
    Introduction to Document Storing, Retrieval, and Generation
    4 min
    Indexing: Document Loading with PyPDFLoader
    7 min
    Indexing: Document Loading with Docx2txtLoader
    2 min
    Indexing: Document Splitting with Character Text Splitter (Theory)
    3 min
    Indexing: Document Splitting with Character Text Splitter (Code Along)
    5 min
    Indexing: Document Splitting with Markdown Header Text Splitter
    6 min
    Indexing: Text Embedding with OpenAI
    6 min
    Indexing: Creating a Chroma Vector Store
    6 min
    Indexing: Inspecting and Managing Documents in a Vector Store
    4 min
    Retrieval: Similarity Search
    5 min
    Retrieval: Maximal Marginal Relevance Search
    7 min
    Retrieval: Vector Store-Backed Retriever
    4 min
    Generation: Stuffing Documents
    4 min
    Generation: Generating a Response
    4 min
  • 10. Tools and Agents
    8 Lessons 38 Min

    The Build Chat Applications with OpenAI and LangChain Course's final section explores how reasoning chatbots select and apply the appropriate tools to tackle complex problems. This is accomplished by equipping a model with various tools, including a decision-making agent for tool selection and an executor to apply the chosen tool. Our LangChain course’s model will demonstrate this with a Wikipedia tool, a retriever tool, and a custom Python function.

    Introduction to Reasoning Chatbots
    3 min
    Tools, Toolkits, Agents, and Agent Executors
    7 min
    Fixing the GuessedAtParserWarning Read now
    1 min
    Creating a Wikipedia Tool and Piping It to a Chain
    6 min
    Creating a Retriever and a Custom Tool
    6 min
    LangChain Hub
    4 min
    Creating a Tool Calling Agent and an Agent Executor
    6 min
    AgentAction and AgentFinish
    5 min

Topics

OpenAI ModelsLangChain FrameworkChat Prompt TemplatesFew-Shot PromptingEnvironment VariablesOpenAI API KeyConversation MemoryOutput ParsersRetrieval Augmented GenerationLangChain Expression LanguageAgent Tooling

Tools & Technologies

langchain

Course Requirements

  • Intermediate Python coding skills are required
  • You need to have Jupyter Notebook up and running

Who Should Take This Course?

Level of difficulty: Advanced

  • Aspiring AI engineers
  • Everyone who is serious about integrating AI into their product

Exams and Certification

A 365 Data Science Course Certificate is an excellent addition to your LinkedIn profile—demonstrating your expertise and willingness to go the extra mile to accomplish your goals.

Exams and certification

Meet Your Instructor

Hristina Hristova

Hristina Hristova

Head of Data Content at 365 Data Science

4 Courses

1198 Reviews

8891 Students

Hristina Hristova is a Theoretical Physicist with experience in the fields of mathematics, physics, programming, and the creation of various educational content. For several years now, she has been tutoring physics and mathematics students online, following educational programs such as The IB Diploma, Cambridge IGCSE, and Cambridge AS & A Level, among many others. Hristina’s high qualification and adaptive teaching style have helped plenty of students successfully pass their exams, while also enjoying the learning process.

What Our Learners Say

07.09.2024
I waited lots of months for this course but in my view, the framework 'LangChain' requires 12-15 hours of one comprehensive course. This course uses OpenAI and if you use any other LLM model, the code is completely different and you have to use online sources a lot to understand that code (if you are using any other LLM model I mean). Plus, I felt the instructor in this course was in a hurry and someone is at an intermediate level when it comes to programming, I will say it was a lot to take and still I feel there is more to LangChain. Furthermore, this course needs a real-life project. The topics discussed should be used cohesively. In its current form, this course is fragmented and needs lots of depth and improvement.
30.08.2024

365 Data Science Is Featured at

Our top-rated courses are trusted by business worldwide.