LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World

LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World

Mark Watson
Buy on Leanpub

Table of Contents

LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World

  • Preface
    • Requests from the Author
    • Newer Commercial LangChain Integrations That Are Not Covered In This Book
    • Deprecated Book Examples
    • LLM Hallucinations and RAG, Summarization, Structured Data Conversion, and Fact/Relationship Extraction LLM Applications
    • Comparing LangChain and LlamaIndex
    • About the Author
    • Book Cover
    • Acknowledgements
    • Requirements for Running and Modifying Book Examples
    • Issues and Workarounds for Using the Material in this Book
  • Large Language Model Overview
    • Technological Change is Increasing at an Exponential Rate
    • What LLMs Are and What They Are Not
    • Big Tech Businesses vs. Small Startups Using Large Language Models
  • Getting Started With LangChain
    • Installing Necessary Packages
    • Creating a New LangChain Project
    • Basic Usage and Examples
    • Creating Embeddings
    • Using LangChain Vector Stores to Query Documents: a Simple RAG Application
    • Example Using LangChain Integrations: Using Server APIs for Google Search
    • OpenAI Model GPT-4o Example
    • LangChain Overview Wrap Up
  • Overview of LlamaIndex
    • Using LlamaIndex for Question Answering from a Web Site
    • LlamaIndex Case Study Wrap Up
  • Extraction of Facts and Relationships from Text Data
    • Key Capabilities of LLMs for Fact and Relationship Extraction
    • Techniques and Approaches
    • Benefits
    • Applications
    • Example Prompts for Getting Information About a Person from Text and Generating JSON
    • Example Code
  • Using LLMs to Summarize Text
    • Example Prompt
    • Code Example
  • LLM Techniques for Structured Data Conversion
    • Example Prompt for Converting CSV Files to JSON
    • Example Code for Converting CSV Files to JSON
  • Retrieval Augmented Generation (RAG) Applications
    • Simple RAG Example Using LlamaIndex
    • RAG With Reranking Example
    • RAG on CSV Spreadsheet Files
  • Using Google’s Knowledge Graph APIs With LangChain
    • Setting Up To Access Google Knowledge Graph APIs
  • Using DBPedia and WikiData as Knowledge Sources
    • Using DBPedia as a Data Source
    • Using Wikidata as a Data Source
  • Using LLMs To Organize Information in Our Google Drives
    • Setting Up Requirements.
    • Write Utility To Fetch All Text Files From Top Level Google Drive Folder
    • Generate Vector Indices for Files in Specific Google Drive Directories
    • Google Drive Example Wrap Up
  • Natural Language SQLite Database Queries With LangChain
    • Natural Language Database Query Wrap Up
  • Examples Using Hugging Face Open Source Models
    • Using LangChain as a Wrapper for Hugging Face Prediction Model APIs
    • Creating a Custom LlamaIndex Hugging Face LLM Wrapper Class That Runs on Your Laptop
  • Running Local LLMs Using Llama.cpp and LangChain
    • Installing Llama.cpp with a Llama2-13b-orca Model
    • Python Example
  • Running Local LLMs Using Ollama
    • Simple Use of a local Mistral Model Using LangChain
    • Minimal Example Using Ollama with the Mistral Open Model for Retrieval Augmented Queries Against Local Documents
    • Wrap Up for Running Local LLMs Using Ollama
  • Using Large Language Models to Write Recipes
    • Preparing Recipe Data
    • A Prediction Model Using the OpenAI text-embedding-3-large Model
    • Cooking Recipe Generation Wrap Up
  • LangChain Agents
    • Overview of LangChain Tools
    • Overview of ReAct Library for Implementing Reading in LMS Applications
    • LangChain Agent Tool Example Using DBPedia SPARQL Queries
    • Another React Agent Tool Use Example: Search and Math Expressions
    • LangChain Agent Tools Wrap Up
  • Multi-prompt Search using LLMs, the Duckduckgo Search API, and Local Ollama Models
    • Example 1: “Write a business plan for a new startup using LLMs and expertise in medical billing.“
    • Example 2: “Common Lisp and Deep Learning consultant”
    • Example Code for Multi-prompt Search using LLMs, the Duckduckgo Search API, and Local Ollama Models
  • More Useful Libraries for Working with Unstructured Text Data
    • EmbedChain Wrapper for LangChain Simplifies Application Development
    • Kor Library
  • Book Wrap Up
LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World/overview

LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World

course_overview

The LangChain and LlamaIndex projects contain excellent documentation and examples. The purpose of this book is to present additional material to learn from.

count_chapters
begin_reading
download
p_implied_book_part_name

LangChain and LlamaIndex Projects Lab Book: Hooking Large Language Models Up to the Real World20 chapters

Begin ›
  1. Preface

  2. Large Language Model Overview

  3. Getting Started With LangChain

  4. Overview of LlamaIndex

  5. Extraction of Facts and Relationships from Text Data

  6. Using LLMs to Summarize Text

  7. LLM Techniques for Structured Data Conversion

  8. Retrieval Augmented Generation (RAG) Applications

  9. Using Google’s Knowledge Graph APIs With LangChain

  10. Using DBPedia and WikiData as Knowledge Sources

  11. Using LLMs To Organize Information in Our Google Drives

  12. Natural Language SQLite Database Queries With LangChain

  13. Examples Using Hugging Face Open Source Models

  14. Running Local LLMs Using Llama.cpp and LangChain

  15. Running Local LLMs Using Ollama

  16. Using Large Language Models to Write Recipes

  17. LangChain Agents

  18. Multi-prompt Search using LLMs, the Duckduckgo Search API, and Local Ollama Models

  19. More Useful Libraries for Working with Unstructured Text Data

  20. Book Wrap Up