Code and slides to accompany the online series of webinars: https://data4sci.com/langchain by Data For Science.
LangChain is the state-of-the-art framework for developing Large Language Model (LLM) based applications. It provides a wide range of Lego-like components to streamline the integration of various LLM functionalities into functional pipelines without requiring in-depth expertise in ML.
In this course, students will get an in-depth view of the structure of LangChain and its various components. You will learn how to apply these components to Information Retrieval and the development of chatbots. An overview of the pros and cons of LLMs from OpenAI, HuggingFace, and Anthropic, as well as a primer on Prompt Engineering, will also be provided to empower students to make the best use possible of the capabilities that LangChain puts at their fingertips.
- Overview of Generative Models
- Comparison of GPT to other LLMs
- Text to Image Models
- LangChain structure
- Understanding Chains
- Exploring Agents
- Using tools to interact with the world
- Understanding Text Summarization
- Information Extraction Applications
- Developing a Question Answering
- Information Retrieval and Vectors
- Retrievers in LangChain
- Implementing a simple Chatbot
- Overview of Prompt Engineering Techniques
- Comparison of Zero-Shot and Few-Shot Prompting
- Understanding Chain of Thought prompts
- Developing Tree of Thought prompts
- Chains vs Graphs
- State
- Cycles
- Tool Calling Agents
- Streaming
1. Generative Models.ipynb- direct OpenAI usage, HuggingFace pipelines, and model basics2. LangChain.ipynb- LCEL chains, prompts, tools, SQL, and message history3. Information Processing.ipynb- summarization, extraction, and text splitting workflows4. ChatBots.ipynb- retrieval, vector stores, and chatbot pipeline construction5. Prompt Engineering.ipynb- zero-shot, few-shot, and chain-of-thought prompting6. LangGraph.ipynb- graph-based agents, state, cycles, and streaming
slides/LangChain.pdf
data/Northwind_small.sqlitedata/trump.csvdata/pg43548-h.zipimages/(generated output images)d4sci.mplstyle(custom notebook plotting style)
- Python
>=3.13 uv(recommended) orpip
uv syncpython -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtjupyter labKey libraries used in this repo include:
langchain,langchain-core,langchain-communitylangchain-openai,langchain-anthropic,langchain-huggingfacelanggraphchromadb,sentence-transformerstransformers,torchjupyter,pandas,matplotlibduckduckgo-search
|
Web: www.data4sci.com |
