My Account Log in

1 option

Generative AI with LangChain : build large language model (LLM) apps with Python, ChatGPT and other LLMs / Ben Auffarth.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Auffarth, Ben, author.
Language:
English
Subjects (All):
Application software--Development.
Application software.
Artificial intelligence.
Computer programming.
Application program interfaces (Computer software).
Physical Description:
1 online resource
Place of Publication:
Birmingham, UK : Packt Publishing Ltd., 2023.
Summary:
Get to grips with the LangChain framework to develop production-ready applications, including agents and personal assistants, integrating with web searches, and code execution. Purchase of the print or Kindle book includes a free PDF eBook. Key Features Learn how to leverage LLMs' capabilities and work around their inherent weaknesses Delve into the realm of LLMs with LangChain and go on an in-depth exploration of their fundamentals, ethical dimensions, and application challenges Get better at using ChatGPT and GPT models, from heuristics and training to scalable deployment, empowering you to transform ideas into reality Book Description ChatGPT and the GPT models by OpenAI have brought about a revolution not only in how we write and research but also in how we can process information. This book discusses the functioning, capabilities, and limitations of LLMs underlying chat systems, including ChatGPT and Bard. It also demonstrates, in a series of practical examples, how to use the LangChain framework to build production-ready and responsive LLM applications for tasks ranging from customer support to software development assistance and data analysis - illustrating the expansive utility of LLMs in real-world applications. Unlock the full potential of LLMs within your projects as you navigate through guidance on fine-tuning, prompt engineering, and best practices for deployment and monitoring in production environments. Whether you're building creative writing tools, developing sophisticated chatbots, or crafting cutting-edge software development aids, this book will be your roadmap to mastering the transformative power of generative AI with confidence and creativity. What you will learn Understand LLMs, their strengths and limitations Grasp generative AI fundamentals and industry trends Create LLM apps with LangChain like question-answering systems and chatbots Understand transformer models and attention mechanisms Automate data analysis and visualization using pandas and Python Grasp prompt engineering to improve performance Fine-tune LLMs and get to know the tools to unleash their power Deploy LLMs as a service with LangChain and apply evaluation strategies Privately interact with documents using open-source LLMs to prevent data leaks Who this book is for The book is for developers, researchers, and anyone interested in learning more about LLMs. Whether you are a beginner or an experienced developer, this book will serve as a valuable resource if you want to get the most out of LLMs and are looking to stay ahead of the curve in the LLMs and LangChain arena. Basic knowledge of Python is a prerequisite, while some prior exposure to machine learning will help you follow along more easily.
Contents:
Cover
Copyright
Contributors
Table of Contents
Preface
Chapter 1: What Is Generative AI?
Introducing generative AI
What are generative models?
Why now?
Understanding LLMs
What is a GPT?
Other LLMs
Major players
How do GPT models work?
Pre-training
Tokenization
Scaling
Conditioning
How to try out these models
What are text-to-image models?
What can AI do in other domains?
Summary
Questions
Chapter 2: LangChain for LLM Apps
Going beyond stochastic parrots
What are the limitations of LLMs?
How can we mitigate LLM limitations?
What is an LLM app?
What is LangChain?
Exploring key components of LangChain
What are chains?
What are agents?
What is memory?
What are tools?
How does LangChain work?
Comparing LangChain with other frameworks
Chapter 3: Getting Started with LangChain
How to set up the dependencies for this book
pip
Poetry
Conda
Docker
Exploring API model integrations
Fake LLM
OpenAI
Hugging Face
Google Cloud Platform
Jina AI
Replicate
Others
Azure
Anthropic
Exploring local models
Hugging Face Transformers
llama.cpp
GPT4All
Building an application for customer service
Chapter 4: Building Capable Assistants
Mitigating hallucinations through fact-checking
Summarizing information
Basic prompting
Prompt templates
Chain of density
Map-Reduce pipelines
Monitoring token usage
Extracting information from documents
Answering questions with tools
Information retrieval with tools
Building a visual interface
Exploring reasoning strategies
Questions
Chapter 5: Building a Chatbot like ChatGPT
What is a chatbot?
Understanding retrieval and vectors
Embeddings
Vector storage
Vector indexing
Vector libraries
Vector databases
Loading and retrieving in LangChain
Document loaders
Retrievers in LangChain
kNN retriever
PubMed retriever
Custom retrievers
Implementing a chatbot
Document loader
Memory
Conversation buffers
Remembering conversation summaries
Storing knowledge graphs
Combining several memory mechanisms
Long-term persistence
Moderating responses
Summary
Questions
Chapter 6: Developing Software with Generative AI
Software development and AI
Code LLMs
Writing code with LLMs
StarCoder
StarChat
Llama 2
Small local model
Automating software development
Chapter 7: LLMs for Data Science
The impact of generative models on data science
Automated data science
Data collection
Visualization and EDA
Preprocessing and feature extraction
AutoML
Using agents to answer data science questions
Data exploration with LLMs
Notes:
OCLC-licensed vendor bibliographic record.
OCLC:
1415721028

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account