
Use a laptop to pace code-heavy content and review the Python basics in bonus videos. Engage the Q&A and online community, and leave constructive reviews to support the instructor.
The lecture demonstrates a hands-on LangChain workflow with wrappers, chains, and agents integrated with Pinecone and OpenAI, then builds a GDPR document question-answering and summarization app with a web interface.
Explore LangChain, a data aware and agentic aware framework that connects GPT-4 to your data via embeddings in a vector database. Learn wrappers, prompts, indexes, memory, chains, and agents.
Install the required libraries with pip or a requirements.txt, then set up and load environment variables using Python-dotenv for OpenAI and Pinecone keys in LangChain projects.
Learn to invoke OpenAI GPT models via LangChain using an LM object and the invoke method, with system and user messages and default GPT 3.5 turbo.
Learn how caching LLM responses speeds up apps and cuts costs by storing repeated results in an in-memory or SQLite cache, reducing API calls and delivering faster responses.
Discover how streaming delivers llm responses in a learning management system by sending content piece by piece to reduce latency, and learn to enable streaming with LangChain llm.stream.
Explore prompt templates, dynamic recipes for generating prompts for LMS that inject user input into text. Learn to create and format templates with placeholders like virus and language.
Build dynamic chat prompts with system and human messages using chat prompt templates. Learn to replace placeholders, format messages, and leverage templates for reusable, scalable, and accurate conversations.
Learn to build simple chains with LangChain by combining a language model and prompt templates into a cohesive task, and understand when to switch to sequential chains for complexity.
Explore sequential chains that connect multiple LMs by passing outputs from one chain as input to the next. Distinguish simple sequential chains from the general form to tackle complex tasks.
Explore why large language models need agents to perform tasks like calculations, web search, and SQL queries, and see how long chain agents enable tools beyond text generation.
Demonstrate using LangChain agents to generate and execute Python code in a Python Repl, leveraging tools, prompt templates, and agent executors to solve problems and verify results.
Explore link chain tools that connect language models to search engines, databases, and APIs, using DuckDuckGo and Wikipedia to get real-time weather updates, translate languages, and expand LM capabilities.
Learn how react blends reasoning and acting to generate reasoning traces. Build a react agent that selects the best tool for each query.
Test the ReAct agent across tools like the Python REPL, DuckDuckGo, and Wikipedia, exploring tool invocation, chain-of-thought, and translations while generating the first 20 Fibonacci numbers.
Explore how text embeddings convert words into numeric representations for NLP and ML, measure relatedness and similarity with cosine similarity or Euclidean distance, and enable classification, clustering, and question answering.
Explore vector databases and vector embeddings to power efficient AI applications, discuss why CSV storage is inefficient, and learn how Pinecone enables fast, scalable storage and querying of high-dimensional embeddings.
Authenticate to pinecone, the vector database for lm applications, by creating and securely storing an API key in a dot env file and loading it with the pinecone client library.
Learn Pinecone indexes for vector data, including serverless and pod based setups, and manage namespaces, with create, list, describe, and delete on the free starter plan.
Generate five random 1536-d vectors, upsert them into a pinecone index, then update, fetch, and delete by id; finally perform a top-k query to find the three most similar vectors.
Explore how namespaces partition a pinecone index into default and named scopes, enabling namespace-scoped upserts, fetches, deletes, and statistics.
Split long documents into semantically related chunks with a recursive character text splitter, tune chunk size and overlap, and embed chunks into vectors with OpenAI embeddings for later Pinecone indexing.
Embed text chunks into 1536-dimension embeddings and insert them into a Pinecone index using LangChain's vector store and OpenAI embeddings, enabling cosine similarity search.
Demonstrate building GenAI apps by embedding text, indexing with Pinecone, and performing similarity searches, then convert top results into natural language answers with a retrieval QA chain.
Learn to obtain a Gemini API key, check availability regions, use a VPN if needed, test with curl, and compare Gemini Pro free and paid pricing.
Discover Gemini multimodal models—nano, pro, and ultra—trained on images, audio, video, text, and code, delivering on-device and data-center versatility.
Install the Google Genie and LangChain libraries for Gemini, then authenticate by loading the API key from an env file and list models to confirm access.
Learn to use Gemini Pro with LangChain by setting up the model and API key, tweaking temperature, and generating a tweet via a prompt template and LM chain.
Learn how to use a system prompt to guide AI behavior and enable streaming, delivering Gemini 1.5 flash responses piece by piece to reduce latency.
Explore Gemini safety settings, including four harm categories and thresholds, and learn to customize protection with safety settings in LangChain, illustrated by blocking dangerous content and unsafe prompts.
Introduce a Jupyter AI section before hands-on Langshan projects, highlighting AI assistants as coding companions that boost productivity, accuracy, collaboration, and simplified learning through step-by-step instructions.
Explore Jupiter's open source AI chat for Jupyter Notebook and see Lang Chain connect Jupyter to embedding models and LMS, alongside Copilot, Codewhisperer, and star coder.
Install and set up Jupyter Lab and Jupyter AI extension across Python environments, using a virtual environment and pip installs for OpenAI and Long Chain.
Learn how to run jupyter in jupyter lab, connect OpenAI gpt 3.5 turbo and embedding model 8002, authenticate providers, and use Jupyter Note for code generation, explanations, and debugging.
Install the required Jupyter packages and authenticate with an OpenAI API key in Jupyter Notebook. Load Jupyter magics extension and use double percent cell magic to list providers and models.
Learn to run cell magic in Jupyter Notebook with double percent, pick a provider and model by id or alias, and format outputs while coding with dict.update, sort, and docstrings.
Learn interpolation in Jupyter using curly braces to embed variables and code, debug errors with percent error, and generate sequences via list comprehensions and triangular numbers.
Learn to call models from Hugging Face Hub via Jupyter, authenticate with access token, install the Hugging Face Hub package, and generate a stable diffusion image with a dystopian prompt.
Build a custom ChatGPT-style assistant with Python and LangChain from scratch. Enhance security with two-factor authentication and role-based access, and tailor the app with branding and CRM or knowledge-base integration.
Build a ChatGPT app with LangChain in Python by using chat models, system and human messages, chat prompt templates, and chains to run interactive conversations.
Add conversation memory to a LangChain chat app using ConversationBufferMemory to store all messages, inject history into the prompt, and enable follow-up questions with return messages.
Save chat sessions in a json file for cross-session persistence, load history on startup, and maintain context with a conversation buffer memory in a LangChain GenAI app.
Build a retrieval augmented question answering app with the OPL stack—OpenAI, Pinecone, and LangChain—using embeddings and chunking to answer questions from documents.
Discover how to load private pdf documents into LangChain using transform loaders and the pi pdf loader, with authentication setup for OpenAI and Pinecone, and modular code.
Extend the load document function to support pdf and docx using format-specific loaders, including docx to txt installation. Test with a doc file to verify loading in long chain.
Load data from online services using per-service loaders, demonstrated with Wikipedia loader accepting query and language. Limit results with max docs and prepare data for embedding into a vector store.
Learn chunking strategies to split documents into optimal chunks for accurate semantic search, embedding with Ada-002, and indexing in Pinecone to minimize noise and maximize relevance.
Embed document chunks and upload them with their embeddings to a Pinecone vector store for fast retrieval and similarity search, creating or loading the index as needed.
Demonstrates building a two-parameter df ask and get answer function that retrieves relevant chunks from a vector store, feeds them to an LM, and answers questions interactively.
Discover how chroma provides an open-source, in-memory vector store for retrieval augmented generation, offering a lightweight alternative to pinecone with simple embeddings and persistent storage.
Add memory to a rag system by using a conversational retrieval chain with a memory buffer to preserve chat history for follow-up questions.
Explore using a custom prompt with prompt templates to tailor a QA app for private documents, combining rag retrieval, augmented generation, memory, and vector stores with OpenAI, Pinecone, or Chroma.
Explore turning a LangChain question-answer app into a user-friendly web frontend with Streamlit, install dependencies via a virtual environment and requirements.txt, and configure Chroma or Pinecone.
Define a LangChain workflow for loading documents, chunking text with overlap, and creating embeddings via OpenAI and a Chroma vector store; use GPT-4 to answer queries.
Create a left sidebar in a streamlit app to securely load an OpenAI API key from dotenv or input, upload files, and chunk and embed data into a vector store.
Process uploaded files by reading, chunking, and embedding data into a Chroma vector store, tracking chunk size, embedding cost, and embedding results for seamless session persistence.
Build a web q&a interface that loads the vector store from session state, tunes k and chunk size for accuracy and speed, and returns answers with ask and get answer.
Save each question and its answer in the session state history and display all entries, with the current question and answer shown first behind a divider in a text area.
Use Streamlit callbacks to clear session history when a new document loads or when chunk size or key changes, ensuring fresh chat state.
Build a summarization application from scratch using LangChain long chain and OpenAI to generate an introduction paragraph, bullet points with main ideas, and a conclusion from large texts and conversations.
Learn the basics of one-shot summarization with a basic prompt, inserting text into the prompt to generate a concise summary in a language model call, noting the 4096 token limit.
Master summarizing using prompt templates with LangChain, leveraging dynamic prompts and token awareness to create concise summaries that can be translated into multiple languages.
Apply the stuffing method, loading all text into the prompt as context via the StuffDocumentsChain, enabling a single language model call for small documents while noting context-length limits.
Learn to summarize long documents beyond token limits using MapReduce: split into chunks, summarize each, then summarize the summaries; understand scalability, parallelization, and trade-offs with more API calls.
Apply map-reduce with custom prompts to summarize long documents by chunk, using a map prompt for each chunk and a final prompt for a concise, titled bullet-point summary.
Explore summarizing long documents with the refine chain, building progressive summaries from chunked content, and compare it to the MapReduce method, including practical coding steps for loading and splitting pdfs.
Learn to summarize long documents beyond token limits with a refine chain and custom prompts, using initial and refine templates to iteratively update summaries.
build GenAI apps with LangChain by using long chain agents and tools like the Wikipedia API wrapper, powered by GPT-3.5 turbo, to summarize documents quickly.
Build a custom chat assistant with Python, LangChain and Streamlit, adding security, personalization, and features, while learning to create apps for AI, machine learning, and data science using Streamlit Chat.
Build a Streamlit front end for a LangChain chat app using GPT 3.5 turbo, Streamlit Chat, and a configurable system prompt, with session state to store messages.
Display the chat history in a streamlit app by rendering session state messages as left/right chat bubbles, with a default system message and unique widget keys.
Test a custom chat app built with LangChain and Streamlit, exploring chat history, system and user message panels, and multilingual responses. Enhance security, user experience, and flexibility.
Fully Updated for the latest versions of LangChain, OpenaAI, and Pinecone.
Unlock the Power of LangChain and Pinecone to Build Advanced LLM Applications with Generative AI and Python!
This LangChain course is the 2nd part of “OpenAI API with Python Bootcamp”. It is not recommended for complete beginners as it requires some essential Python programming experience.
Are you ready to dive into the world of Large Language Models (LLMs) and Generative AI (GenAI)? This comprehensive course will guide you through building cutting-edge LLM applications using OpenAI or Gemini API, LangChain, and Pinecone.
By the end of this course, you'll master LangChain and Pinecone to create powerful, production-ready LLM apps in Python. You'll also develop modern web front-ends with Streamlit, bringing your AI applications to life.
In this course, you will:
Understand the fundamentals of LangChain for simplified LLM app development.
Dive into Generative AI with OpenAI and Google's Gemini.
Build real-world LLM applications step-by-step with Python.
Utilize LangChain Agents and Chains for advanced functionalities.
Explore Pinecone for efficient vector embeddings and similarity search.
Work with vector databases like Pinecone and Chroma.
Implement embeddings and indexing for custom document QA systems.
Create RAG (Retrieval-Augemented Generation) Apps with LangChain.
Summarize large texts using LLMs.
Learn Prompt Engineering best practices.
Create engaging front-ends using Streamlit.
Become proficient in using AI Coding Assistants (Jupyter AI)
Create LLM-Based Hands-On Projects with LangChain for the Real-Word: RAG, ChatBot, Summarization
Who should take this course?
Python developers interested in AI, LLMs, LangChain and LangGraph.
Data scientists and AI enthusiasts looking to expand their skill set.
Professionals aiming to leverage Generative AI (GenAI) and LangChain in real-world applications.
Don't miss out on the AI revolution! Equip yourself with the skills to build state-of-the-art LLM applications. Enroll now and stay ahead in the rapidly evolving field of AI.
Join me on this exciting journey to master LangChain, Pinecone, and Generative AI. Let's build the future together!
I look forward to seeing you in the course!