Online Course trending topic
Build Chat Applications with OpenAI and LangChain

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

4.8

862 reviews on
5,543 students already enrolled
  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Skill level:

Advanced

Duration:

7 hours
  • Lessons (4 hours)
  • Practice exams (3 hours)
  • Projects (8 hours)

CPE credits:

8
CPE stands for Continuing Professional Education and represents the mandatory credits a wide range of professionals must earn to maintain their licenses and stay current with regulations and best practices. One CPE credit typically equals 50 minutes of learning. For more details, visit NASBA's official website: www.nasbaregistry.org

Accredited

certificate

What you learn

  • Master LangChain to integrate applications with powerful LLMs.
  • Learn to connect to OpenAI’s language and embedding models.
  • Develop prompt engineering skills for optimal AI response.
  • Apply Retrieval‑Augmented Generation (RAG) with a knowledge base.
  • Leverage rare AI engineering skills to enhance career prospects.

Topics & tools

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

Your instructor

Course OVERVIEW

Description

CPE Credits: 8 Field of Study: Information Technology
Delivery Method: QAS Self Study
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.

Prerequisites

  • Python (version 3.8 or later), OpenAI API key, LangChain library, and a code editor or IDE (e.g., VS Code or Jupyter Notebook)
  • Intermediate Python skills are required.
  • Basic concepts in natural language processing (NLP) is helpful but not mandatory.

Advanced preparation

Curriculum

51 lessons 1 project 4 exams
  • 1. Introduction to the Course
    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.
    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 Free
    Business Applications of LangChain Free
    What Makes LangChain Powerful? Free
    What Does the Course Cover? Free
  • 2. Tokens, Models, and Prices
    9 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.
    9 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
    Models and Prices
  • 3. Setting Up the Environment
    13 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.
    13 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
    Obtaining an OpenAI API Key
    Setting the API Key as an Environment Variable
  • 4. The OpenAI API
    17 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.
    17 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
    System, User, and Assistant Roles
    Creating a Sarcastic Chatbot
    Temperature, Max Tokens, and Streaming
  • 5. Model Inputs
    38 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.
    38 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
    ChatOpenAI
    System and Human Messages
    AI Messages
    Prompt Templates and Prompt Values
    Chat Prompt Templates and Chat Prompt Values
    Few-Shot Chat Message Prompt Templates
    Practice exam
  • 6. Output Parsers
    8 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.
    8 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
    Comma-Separated List Output Parser
    Datetime Output Parser
  • 7. LangChain Expression Language (LCEL)
    52 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.
    52 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
    Batching
    Streaming
    The Runnable and RunnableSequence Classes
    Piping Chains and the RunnablePassthrough Class
    Graphing Runnables
    RunnableParallel
    Piping a RunnableParallel with Other Runnables
    RunnableLambda 
    The @chain Decorator
    Practice exam
  • 8. Retrieval Augmented Generation (RAG)
    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.
    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
    Introduction to RAG 
    Introduction to Document Loading and Splitting
    Introduction to Document Embedding
    Introduction to Document Storing, Retrieval, and Generation
    Indexing: Document Loading with PyPDFLoader
    Indexing: Document Loading with Docx2txtLoader
    Indexing: Document Splitting with Character Text Splitter (Theory)
    Indexing: Document Splitting with Character Text Splitter (Code Along)
    Indexing: Document Splitting with Markdown Header Text Splitter
    Indexing: Text Embedding with OpenAI
    Indexing: Creating a Chroma Vector Store
    Indexing: Inspecting and Managing Documents in a Vector Store
    Retrieval: Similarity Search
    Retrieval: Maximal Marginal Relevance Search
    Retrieval: Vector Store-Backed Retriever
    Generation: Stuffing Documents
    Generation: Generating a Response
    Practice exam
  • 9. Course project and exam
    570 min
    570 min
    Create a Q&A Chatbot with LangChain Project
    Course exam

Free lessons

Introduction to the Course

1.1 Introduction to the Course

5 min

Business Applications of LangChain

1.2 Business Applications of LangChain

5 min

What Makes LangChain Powerful?

1.3 What Makes LangChain Powerful?

5 min

What Does the Course Cover?

1.4 What Does the Course Cover?

6 min

Tokens

2.1 Tokens

6 min

Models and Prices

2.2 Models and Prices

3 min

Start for free

9 in 10

people walk away career-ready

with practical data and AI skills.

9 in 10

of our graduates landed a new AI & data job

after enrollment

4.8

Based on 862 reviews

#1 most reviewed

AI and data learning platform on Trustpilot.

ACCREDITED certificates

Craft a resume and LinkedIn profile you’re proud of—featuring certificates recognized by leading global institutions.

Earn CPE-accredited credentials that showcase your dedication, growth, and essential skills—the qualities employers value most.

  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Certificates are included with the Self-study learning plan.

A LinkedIn profile mockup on a mobile screen showing Parker Maxwell, a Certified Data Analyst, with credentials from 365 Data Science listed under Licenses & Certification. A 365 Data Science Certificate of Achievement awarded to Parker Maxwell for completing the Data Analyst career track, featuring accreditation badges and a gold “Verified Certificate” seal.

How it WORKS

  • Lessons
  • Exercises
  • Projects
  • Practice exams
  • AI mock interviews

Lessons

Learn through short, simple lessons—no prior experience in AI or data science needed.

Try for free

Exercises

Reinforce your learning with mini recaps, hands-on coding, flashcards, fill-in-the-blank activities, and other engaging exercises.

Try for free

Projects

Tackle real-world AI and data science projects—just like those faced by industry professionals every day.

Try for free

Practice exams

Track your progress and solidify your knowledge with regular practice exams.

Try for free

AI mock interviews

Prep for interviews with real-world tasks, popular questions, and real-time feedback.

Try for free

Student REVIEWS

A collage of student testimonials from 365 Data Science learners, featuring profile photos, names, job titles, and quotes or video play icons, showcasing diverse backgrounds and successful career transitions into AI and data science roles.