100% found this document useful (1 vote)
65 views

00 Course Introduction

lang chain

Uploaded by

Tamer Mostafa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
65 views

00 Course Introduction

lang chain

Uploaded by

Tamer Mostafa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

LangChain

LangChain

● Welcome the course!


● Please make sure you’ve read the very first
lecture in the course, which is an article with
links to the .zip file of notebooks as a resource
and has links to the Google Slides for the course.
● In this lecture we’ll give you a brief overview of
the course and how it relates to LangChain, then
we’ll dive right into coding components with
LangChain!
LangChain

● Why LangChain?
○ LangChain is a framework for developing
applications that are powered by Large
Language Models, such as OpenAI’s GPT
models or Google’s PaLM-2 or Gemini LLMs.
○ The framework does this through the use of
Modules (also sometimes referred to as
Components).
LangChain

● Why LangChain?
○ The best way to understand the benefits of
LangChain is to understand these
Components and how the work together to
make it easier to build robust LLM based
Applications.
○ Let’s explore the main ideas of the modules
in relation to the course.
LangChain

● LangChain - Modules or Components?

?
LangChain

● LangChain - Modules or Components?


○ Python Documentation:
■ https://python.langchain.com/
○ General Documentation:
■ https://docs.langchain.com/docs/
○ JS/TS Documentation:
■ https://js.langchain.com/docs/get_started/
introduction/
○ Don’t be surprised if some links between
General Docs and Python Docs are a 404!
LangChain

● Course Structure
○ This course is designed to slowly build up to
understanding LangChain Agents, which are
extremely powerful LLM based applications
that allow you to perform complex tasks and
allow an LLM to perform actions (Wikipedia
Search, use a Calculator, etc…).
○ Agents themselves only require a few lines of
code, but jumping straight to Agents can
result in confusion about LangChain!
LangChain

● Course Structure
○ Advanced users may then try to learn
LangChain on their own, starting at Model IO,
and then be confused on what benefits
LangChain provides versus the default APIs.
○ This course trys to frame the modules in a
way where their individual utility is clear,
along with their “synergies” once you
understand multiple modules!
LangChain

● LangChain Course Sections

DATA
MODEL IO CONNECTIO CHAINS MEMORY AGENTS
N
LangChain

● LangChain Course Sections


● Model IO focuses on basic LLM inputs and
outputs. This replicates a lot of the
functionality already present in default APIs,
MODEL IO such as the OpenAI API.
● LangChain Advantage:
○ Model IO is standardized, allowing you to
easily switch between LLMs in the future
and supports both Text Completion APIs
and Chat Interface APIs.
LangChain

● LangChain Course Sections


● Data Connection focuses on connecting an
LLM Model to a data source, such as your
DATA
own documents or a vector store.
CONNECTIO ● LangChain Advantage:
N
○ Easily swap vector stores (ChromaDB).
○ Integrate with many different data
sources to create standardized document
objects from a variety of sources (CSVs,
PDFs, AWS, Google Cloud, etc…).
LangChain

● LangChain Course Sections


● Chains allows you to link the output of one
model to be the input of another model call.
● LangChain Advantage:
CHAINS ○ Easily chain together different LLM calls
to separate out work between models,
allowing you to swap LLMs in the middle
of a chain easily.
LangChain

● LangChain Course Sections


● Memory allows your models to retain
historical context of previous interactions.
● LangChain Advantage:
MEMORY ○ Easily save historical conversations or
results from LLMs or Chat Models and
reload them for future use.
LangChain

● LangChain Course Sections


● Agents are the most powerful part of
LangChain. Utilizing Models, Data
Connections, Chains, and Memory, Agents
AGENTS can use tools to reason through requests and
perform actions based on observational
outputs.
● LangChain Advantage:
○ Create agents and custom tools with just
a few lines of code!
LangChain

● Thoughts to keep in mind about


LangChain:
○ Users new to LangChain may find themselves
confused or frustrated because they only
interact with one module and sometimes miss
the larger picture of how they interact.
○ This course is meant to guide you step-by-
step to see how all the modules work
together, meaning you’ll want to take the
course in order (don’t just jump straight to
Agents, even though they are very cool!).
Let’s get started!

You might also like