2025 Deploy Llm App With Ollama And Langchain In Production

Posted By: ELK1nG

2025 Deploy Llm App With Ollama And Langchain In Production
Published 11/2024
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz
Language: English | Size: 7.16 GB | Duration: 12h 0m

Build Private AI Chatbots, Deploy on AWS. Master Langchain v0.3, Ollama, LLAMA, FAISS, Prompt Engineering and RAG

What you'll learn

Set up and Integrate Ollama with Langchain: Students will learn how to install, configure, and operate Ollama alongside Langchain.

Build Custom Chatbots: Learners will develop skills to create chat applications with memory, history, advanced chatbot features using Streamlit and Langchain.

Use Prompt Templates, Chains, and Output Parsers: Students will master prompt templates and chaining methods (Sequential, Parallel, and Router Chains).

Deploy Real-World Applications: The course will guide students through deploying applications on AWS EC2

Requirements

Basic Python programming knowledge

Familiarity with APIs and web requests

Basic understanding of machine learning concepts

Access to a computer with internet for installations and setups

Description

This course is a practical guide to integrating Langchain and Ollama to build, automate, and deploy AI applications. Learn to set up these tools, create prompt templates, automate workflows, manage data retrieval, and deploy real-world applications on AWS. Each section is designed to provide you with hands-on skills and experience.What You Will LearnOllama & Langchain SetupComplete setup and installation of Ollama and Langchain.Configure base URLs and handle direct API calls.Establish the environment for efficient integration.Prompt EngineeringUnderstand AI, human, and system message prompts.Use AIPromptTemplate, Human, System, and ChatMessagePromptTemplate to shape responses.Explore the invoke method to control the model's behavior.Chains for Workflow AutomationLearn Sequential, Parallel, and Router Chains to build flexible workflows.Work with custom chains and explore Chain Runnables for added automation.Implement real-world workflows using Langchain's chaining capabilities.Output ParsingFormat data with parsers like JSON, CSV, Markdown, and Pydantic.Parse structured output and use date-time output handling for organized data.Chat Message MemoryUse BaseChatMessageHistory and InMemoryChatMessageHistory for managing chat sessions.Create chat applications with memory to improve user experience.Build and Deploy ChatbotsBuild a chatbot application using Streamlit.Maintain chat history and handle user inputs efficiently.Document Loaders and RetrievalsWork with loaders for web pages, PDFs, Google Drive, and WhatsApp data.Retrieve and summarize documents, convert text data, and use vector stores.Vector Stores and RetrievalsIntegrate vector stores for document retrieval using FAISS and Chroma.Reload retrievers, index documents, and enhance retrieval accuracy.Tool Calling and Custom AgentsSet up tools for Tavily Search, PubMed, Wikipedia, and more.Design custom agents that can use these tools and execute step-by-step instructions.Real-World IntegrationsExecute text-based queries on MySQL .Deploy LLAMA with OLLAMA on AWS (Coming Soon)Who This Course Is ForDevelopers and data scientists who want to use Langchain and Ollama for AI applications.AI enthusiasts looking to automate workflows and create document retrieval systems.Professionals needing to build end-to-end chatbots or deploy applications on AWS.Learners with basic Python knowledge who want practical experience with real-world AI tools.By the end of this course, you’ll have the skills to build, deploy, and manage AI-powered applications, from chatbots to document retrievers, ready for production.

Overview

Section 1: Introduction

Lecture 1 Code File

Section 2: Ollama Setup

Lecture 2 Install Ollama

Lecture 3 Touch Base with Ollama

Lecture 4 Inspecting LLAMA 3.2 Model

Lecture 5 LLAMA 3.2 Benchmarking Overview

Lecture 6 What Type of Models are Available on Ollama

Lecture 7 Ollama Commands - ollama server, ollama show

Lecture 8 Ollama Commands - ollama pull, ollama list, ollama rm

Lecture 9 Ollama Commands - ollama cp, ollama run, ollama ps, ollama stop

Lecture 10 Create and Run Ollama Model with Predefined Settings

Lecture 11 Ollama Model Commands - /show

Lecture 12 Ollama Model Commands - /set, /clear, /save_model and /load_model

Lecture 13 Ollama Raw API Requests

Lecture 14 Load Uncesored Models for Banned Content Generation [Only Educational Purpose]

Section 3: Getting Started with Langchain

Lecture 15 Langchain Introduction

Lecture 16 Lanchain Installation

Lecture 17 Langsmith Setup of LLM Observability

Lecture 18 Calling Your First Langchain Ollama API

Lecture 19 Generating Uncensored Content in Langchain [Educational Purpose]

Lecture 20 Trace LLM Input Output at Langsmith

Lecture 21 Going a lot Deeper in the Langchain

Section 4: Chat Prompt Templates

Lecture 22 Why We Need Prompt Template

Lecture 23 Type of Messages Needed for LLM

Lecture 24 Circle Back to ChatOllama

Lecture 25 Use Langchain Message Types with ChatOllama

Lecture 26 Langchain Prompt Templates

Lecture 27 Prompt Templates with ChatOllama

Section 5: Chains

Lecture 28 Introduction to LCEL

Lecture 29 Create Your First LCEL Chain

Lecture 30 Adding StrOutputParser with Your Chain

Lecture 31 Chaining Runnables (Chain Multiple Runnables)

Lecture 32 Run Chains in Parallel Part 1

Lecture 33 Run Chains in Parallel Part 2

Lecture 34 How Chain Router Works

Lecture 35 Creating Independent Chains for Positive and Negative Reviews

Lecture 36 Route Your Answer Generation to Correct Chain

Lecture 37 What is RunnableLambda and RunnablePassthrough

Lecture 38 Make Your Custom Runnable Chain

Lecture 39 Create Custom Chain with chain Decorator

Section 6: Output Parsing

Lecture 40 What is Output Parsing

Lecture 41 What is Pydantic Parser

Lecture 42 Get Pydantic Parser Instruction

Lecture 43 Parse LLM Output Using Pydantic Parser

Lecture 44 Parsing with `.with_structured_output()` method

Lecture 45 JSON Output Parser

Lecture 46 CSV Output Parsing - CommaSeparatedListOutputParser

Lecture 47 Datetime Output Parsing

Section 7: Chat Message Memory | How to Keep Chat History

Lecture 48 How to Save and Load Chat Message History (Concept)

Lecture 49 Simple Chain Setup

Lecture 50 Chat Message with History Part 1

Lecture 51 Chat Message with History Part 2

Lecture 52 Chat Message with History using MessagesPlaceholder

Section 8: Make Your Own Chatbot Application

Lecture 53 Introduction

Lecture 54 Introduction To Streamlit and Our Chat Application

Lecture 55 Chat Bot Basic Code Setup

Lecture 56 Create Chat History in Streamlit Session State

Lecture 57 Create LLM Chat Input Area with Streamlit

Lecture 58 Update Historical Chat on Streamlit UI

Lecture 59 Complete Your Own Chat Bot Application

Lecture 60 Stream Output of Your Chat Bot like ChatGPT

Section 9: Document Loaders | Projects on PDF Documents

Lecture 61 Introduction to PDF Document Loaders

Lecture 62 Load Single PDF Document with PyMuPDFLoader

Lecture 63 Load All PDFs from a Directory

Lecture 64 Combine All PDFs Data as Context Text

Lecture 65 How Many Tokens are There in Contex Data.

Lecture 66 Make Question Answer Prompt Templates and Chain

Lecture 67 Ask Questions from Your PDF Documents

Lecture 68 Summarize Your PDF Documents

Lecture 69 Project 3 - Generate Detailed Structured Report from the PDF Documents

Section 10: Document Loaders | Stock Market News Report Generation

Lecture 70 Introduction to Webpage Loaders

Lecture 71 Load Unstructured Stock Market Data

Lecture 72 Make LLM QnA Script

Lecture 73 Catastrophic Forgetting of LLM

Lecture 74 Break Down Large Text Data Into Chunks

Lecture 75 Create Stock Market News Summary for Each Chunks

Lecture 76 Generate Final Stock Market Report

Section 11: Document Loaders | Microsoft Office Files Reader and Projects

Lecture 77 Introduction to Unstructured Data Loader

Lecture 78 Load .PPTX Data with DataLoader

Lecture 79 Process .PPTX data for LLM

Lecture 80 Generate Speaker Script for Your .PPTX Presentation

Lecture 81 Loading and Parsing Excel Data for LLM

Lecture 82 Ask Questions from LLM for given Excel Data

Lecture 83 Load .DOCX Document and Write Personalized Job Email

Section 12: Document Loaders | YouTube Video Transcripts and SEO Keywords Generator

Lecture 84 Load YouTube Video Subtitles

Lecture 85 Load YouTube Video Subtitles in 10 Mins Chunks

Lecture 86 Generate YouTube Keywords from the Transcripts

Section 13: Vector Stores and Retrievals

Lecture 87 Introduction to RAG Project

Lecture 88 Introduction to FAISS and Chroma Vector Database

Lecture 89 Load All PDF Documents

Lecture 90 Recursive Text Splitter to Create Documents Chunk

Lecture 91 How Important Chunk Size Selection is?

Lecture 92 Get OllamaEmbeddings

Lecture 93 Document Indexing in Vector Database

Lecture 94 How to Save and Search Vector Database

Section 14: RAG | Question Answer Over the Health Supplements Data

Lecture 95 Load Vector Database for RAG

Lecture 96 Get Vector Store as Retriever

Lecture 97 Exploring Similarity Search Types with Retriever

Lecture 98 Design RAG Prompt Template

Lecture 99 Build LLM RAG Chain

Lecture 100 Prompt Tuning and Generate Response from RAG Chain

Section 15: Tool and Function Calling

Lecture 101 What is Tool Calling

Lecture 102 Available Search Tools at Langchain

Lecture 103 Create Your Custom Tools

Lecture 104 Bind tools with LLM

Lecture 105 Working with Tavily and DuckDuckGo Search Tools

Lecture 106 Working with Wikipedia and PubMed Tools

Lecture 107 Creating Tool Functions for In-Built Tools

Lecture 108 Calling Tools with LLM

Lecture 109 Passing Tool Calling Result to LLM Part 1

Lecture 110 Passing Tool Calling Result to LLM Part 2

Section 16: Agents

Lecture 111 How Agent Works

Lecture 112 Tools Preparation for Agent

Lecture 113 More About the Agent Working Process

Lecture 114 Selection of Prompt for Agent

Lecture 115 Agent in Action

Section 17: Text to MySQL Queries | With and Without Agents

Lecture 116 Create MySQL Connection with Local Server

Lecture 117 Get MySQL Execution Chain

Lecture 118 Correct Malformed MySQL Queries Using LLM

Lecture 119 MySQL Query Chain Execution

Lecture 120 MySQL Query Execution with Agents in LangGraph

Section 18: Deploy LLM App with Ollama on AWS (coming soon)

Lecture 121 Introduction

Developers aiming to integrate language models into applications.,Data scientists interested in automating workflows and leveraging document retrieval.,AI enthusiasts eager to build custom chatbots and conversational tools.,Professionals seeking skills in deploying applications on AWS and other platforms.,Learners with basic Python and API knowledge who want to create end-to-end AI solutions.