Movatterモバイル変換


[0]ホーム

URL:


Packt
Search iconClose icon
Search icon CANCEL
Subscription
0
Cart icon
Your Cart(0 item)
Close icon
You have no products in your basket yet
Save more on your purchases!discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Profile icon
Account
Close icon

Change country

Modal Close icon
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timerSALE ENDS IN
0Days
:
00Hours
:
00Minutes
:
00Seconds
Home> Data> Databases> Building AI Intensive Python Applications
Building AI Intensive Python Applications
Building AI Intensive Python Applications

Building AI Intensive Python Applications: Create intelligent apps with LLMs and vector databases

Arrow left icon
Profile Icon Rachelle PalmerProfile Icon Ben PerlmutterProfile Icon Ashwin GangadharProfile Icon Nicholas LarewProfile Icon Sigfrido NarváezProfile Icon Thomas RueckstiessProfile Icon Henry WellerProfile Icon Richmond AlakeProfile Icon Shubham Ranjan +5 more Show less
Arrow right icon
€44.99
eBookSep 2024298 pages1st Edition
eBook
€44.99
Paperback
€56.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Rachelle PalmerProfile Icon Ben PerlmutterProfile Icon Ashwin GangadharProfile Icon Nicholas LarewProfile Icon Sigfrido NarváezProfile Icon Thomas RueckstiessProfile Icon Henry WellerProfile Icon Richmond AlakeProfile Icon Shubham Ranjan +5 more Show less
Arrow right icon
€44.99
eBookSep 2024298 pages1st Edition
eBook
€44.99
Paperback
€56.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€44.99
Paperback
€56.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature iconInstant access to your Digital eBook purchase
Product feature icon Download this book inEPUB andPDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning
OR

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Billing Address

Table of content iconView table of contentsPreview book icon Preview Book

Building AI Intensive Python Applications

Building Blocks of Intelligent Applications

In the rapidly evolving landscape of software development, a new class of applications is emerging: intelligent applications.Intelligent applications are a superset of traditional full stack applications. These applications useartificial intelligence (AI) to deliver highly personalized, context-aware experiences that go beyond the capabilities oftraditional software.

Intelligent applications understand complex, unstructured data and use this understanding to make decisions and create natural,adaptive interactions.

The goal of this chapter is to provide you with an overview of the logical and technical building blocks of intelligent applications. The chapter explores how intelligent applications extend the capability of traditional full-stack applications, the core structures that define them, and how these components function to create dynamic, context-aware experiences. By the end of this chapter, you will understand how these...

Technical requirements

This chapter is theoretical. It covers the logical components of intelligent applications and how theyfit together.

This chapter assumes fundamental knowledge of traditional full stack application development components, such as servers, clients, databases,and APIs.

Defining intelligent applications

Traditional applications typically consist of a client-side user interface, a server-side backend, and a database for data storage and retrieval. They perform tasks following a strict set of instructions. Intelligent applications require a client, server, and database as well, but they augment the traditional stack with AI components.

Intelligent applications stand out by understanding complex, unstructured data to enable natural, adaptive interactions and decision-making. Intelligent applications can engage in open-ended interactions, generate novel content, and makeautonomous decisions.

Examples of intelligent applications includethe following:

  • Chatbots that provide natural language responses based on external data usingretrieval-augmented generation (RAG). For example, Perplexity.ai (https://www.perplexity.ai/) is an AI-powered search engine and chatbot that provides users with AI-generated answers to their queries based on sources...

LLMs – reasoning engines for intelligent apps

LLMs are the key technology of intelligent applications, unlocking whole new classes of AI-powered systems. These models are trained on vast amounts of text data to understand language, generate human-like text, answer questions, and engagein dialogue.

LLMs undergo continuous improvement with the release of new models. featuring billions or trillions of parameters and enhanced reasoning, memory, andmulti-modal capabilities.

Use cases for LLM reasoning engines

LLMs have emerged as a powerful general-purpose technology for AI systems, analogous to thecentral processing unit (CPU) in traditional computing. Much like CPUs, LLMs serve as general-purpose computational engines that can be programmed for many tasks and play a similar role in language-based reasoning and generation. The general-purpose nature of LLMs lets developers use their capabilities for a wide range ofreasoning tasks.

A crop of techniques to leverage...

Embedding models and vector databases – semantic long-term memory

In addition to the reasoning capabilities provided by LLMs, intelligent applications require semantic long-term memory for storing andretrieving information.

Semantic memory typically consists of two core components—AI vector embedding models and vector databases. Vector embedding models represent the semantic meaning of unstructured data, such as text or images, in large arrays of numbers. Vector databases efficiently store and retrieve these vectors to support semantic search and context retrieval. These components work together to enable the reasoning engine to access relevant context and informationas needed.

Embedding models

Embedding models are AI models that map text and other data types, such as images and audio, into high-dimensional vector representations. These vector representations capture the semantic meaning of the input data, allowing for efficient similarity comparisons and semantic...

Your (soon-to-be) intelligent app

With LLMs, embedding models, vector databases, and model hosting, you have the key building blocks for creating intelligent applications. While the specific architecture will vary depending on your use case, a commonpattern emerges:

  • LLMs for reasoningand generation
  • Embeddings andvector search for retrievaland memory
  • Model hosting to serve these componentsat scale

This AI stack is integrated with traditional application components, such as backend services, APIs, frontend user interfaces, databases, and data pipelines. Additionally, intelligent applications often include components for AI-specific concerns, such as prompt management and optimization, data preparation and embedding generation, and AI safety, testing,and monitoring.

The rest of this section walks through an example architecture for a RAG-powered chatbot, showcasing how these components work together. The subsequent chapters will dive deeper into the end...

Summary

Intelligent applications represent a new paradigm in software development, combining AI with traditional application components to deliver highly personalized, context-aware experiences. This chapter details the core components of intelligent applications, highlighting the pivotal role of LLMs as reasoning engines. LLMs serve as versatile computational tools capable of performing diverse tasks, including chat, summarization, and classification, due to theirgeneral-purpose design.

Complementing these reasoning engines are embedding models and vector databases, which function as the semantic memory of intelligent applications. These components enable the reasoning engine to retrieve pertinent context and information as needed. Additionally, the hosting of AI models demands dedicated infrastructure, as their unique hardware requirements differ significantly from traditional software needs. Using building blocks such as LLMs, embedding models, vector databases, and model hosting...

Left arrow icon

Page1 of 7

Right arrow icon
Download code iconDownload Code

Key benefits

  • Get to grips with the fundamentals of LLMs, vector databases, and Python frameworks
  • Implement effective retrieval-augmented generation strategies with MongoDB Atlas
  • Optimize AI models for performance and accuracy with model compression and deployment optimization
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

The era of generative AI is upon us, and this book serves as a roadmap to harness its full potential. With its help, you’ll learn the core components of the AI stack: large language models (LLMs), vector databases, and Python frameworks, and see how these technologies work together to create intelligent applications.The chapters will help you discover best practices for data preparation, model selection, and fine-tuning, and teach you advanced techniques such as retrieval-augmented generation (RAG) to overcome common challenges, such as hallucinations and data leakage. You’ll get a solid understanding of vector databases, implement effective vector search strategies, refine models for accuracy, and optimize performance to achieve impactful results. You’ll also identify and address AI failures to ensure your applications deliver reliable and valuable results. By evaluating and improving the output of LLMs, you’ll be able to enhance their performance and relevance.By the end of this book, you’ll be well-equipped to build sophisticated AI applications that deliver real-world value.

Who is this book for?

This book is for software engineers and developers looking to build intelligent applications using generative AI. While the book is suitable for beginners, a basic understanding of Python programming is required to make the most of it.

What you will learn

  • Understand the architecture and components of the generative AI stack
  • Explore the role of vector databases in enhancing AI applications
  • Master Python frameworks for AI development
  • Implement Vector Search in AI applications
  • Find out how to effectively evaluate LLM output
  • Overcome common failures and challenges in AI development

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date :Sep 06, 2024
Length:298 pages
Edition :1st
Language :English
ISBN-13 :9781836207245
Vendor :
MongoDB
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature iconInstant access to your Digital eBook purchase
Product feature icon Download this book inEPUB andPDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature iconDRM FREE - Read whenever, wherever and however you want
Product feature iconAI Assistant (beta) to help accelerate your learning
OR

Contact Details

Modal Close icon
Payment Processing...
tickCompleted

Billing Address

Product Details

Publication date :Sep 06, 2024
Length:298 pages
Edition :1st
Language :English
ISBN-13 :9781836207245
Vendor :
MongoDB
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99billed monthly
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconSimple pricing, no contract
€189.99billed annually
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts
€264.99billed in 18 months
Feature tick iconUnlimited access to Packt's library of 7,000+ practical books and videos
Feature tick iconConstantly refreshed with 50+ new titles a month
Feature tick iconExclusive Early access to books as they're written
Feature tick iconSolve problems while you work with advanced search and reference features
Feature tick iconOffline reading on the mobile app
Feature tick iconChoose a DRM-free eBook or Video every month to keep
Feature tick iconPLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick iconExclusive print discounts

Frequently bought together


Building AI Intensive Python Applications
Building AI Intensive Python Applications
Read more
Sep 2024298 pages
eBook
eBook
€44.99
€56.99
Principles of Data Science
Principles of Data Science
Read more
Jan 2024326 pages
Full star icon4.8 (4)
eBook
eBook
€20.99€23.99
€29.99
UX for Enterprise ChatGPT Solutions
UX for Enterprise ChatGPT Solutions
Read more
Sep 2024446 pages
Full star icon4.7 (6)
eBook
eBook
€20.99€23.99
€29.99
Stars icon
Total116.97
Building AI Intensive Python Applications
€56.99
Principles of Data Science
€29.99
UX for Enterprise ChatGPT Solutions
€29.99
Total116.97Stars icon

Table of Contents

16 Chapters
Chapter 1: Getting Started with Generative AIChevron down iconChevron up icon
Chapter 1: Getting Started with Generative AI
Technical requirements
Defining the terminology
The generative AI stack
Important features of generative AI
Summary
Chapter 2: Building Blocks of Intelligent ApplicationsChevron down iconChevron up icon
Chapter 2: Building Blocks of Intelligent Applications
Technical requirements
Defining intelligent applications
LLMs – reasoning engines for intelligent apps
Embedding models and vector databases – semantic long-term memory
Your (soon-to-be) intelligent app
Summary
Part 1: Foundations of AI: LLMs, Embedding Models, Vector Databases, and Application DesignChevron down iconChevron up icon
Part 1: Foundations of AI: LLMs, Embedding Models, Vector Databases, and Application Design
Chapter 3: Large Language ModelsChevron down iconChevron up icon
Chapter 3: Large Language Models
Technical requirements
Probabilistic framework
Machine learning for language modelling
ANNs for natural language processing
Dealing with sequential data
LLMs in practice
Summary
Chapter 4: Embedding ModelsChevron down iconChevron up icon
Chapter 4: Embedding Models
Technical requirements
What is an embedding model?
Choosing embedding models
Best practices
Summary
Chapter 5: Vector DatabasesChevron down iconChevron up icon
Chapter 5: Vector Databases
Technical requirements
What is a vector embedding?
Graph connectivity
The need for vector databases
Case studies and real-world applications
Vector search best practices
Summary
Chapter 6: AI/ML Application DesignChevron down iconChevron up icon
Chapter 6: AI/ML Application Design
Technical requirements
Data modeling
Data storage
Data flow
Freshness and retention
Security and RBAC
Best practices for AI/ML application design
Summary
Part 2: Building Your Python Application: Frameworks, Libraries, APIs, and Vector SearchChevron down iconChevron up icon
Part 2: Building Your Python Application: Frameworks, Libraries, APIs, and Vector Search
Chapter 7: Useful Frameworks, Libraries, and APIsChevron down iconChevron up icon
Chapter 7: Useful Frameworks, Libraries, and APIs
Technical requirements
Python for AI/ML
AI/ML frameworks
Key Python libraries
AI/ML APIs
Summary
Chapter 8: Implementing Vector Search in AI ApplicationsChevron down iconChevron up icon
Chapter 8: Implementing Vector Search in AI Applications
Technical requirements
Information retrieval with MongoDB Atlas Vector Search
Building RAG architecture systems
Summary
Part 3: Optimizing AI Applications: Scaling, Fine-Tuning, Troubleshooting, Monitoring, and AnalyticsChevron down iconChevron up icon
Part 3: Optimizing AI Applications: Scaling, Fine-Tuning, Troubleshooting, Monitoring, and Analytics
Chapter 9: LLM Output EvaluationChevron down iconChevron up icon
Chapter 9: LLM Output Evaluation
Technical requirements
What is LLM evaluation?
Model benchmarking
Evaluation metrics
Summary
Chapter 10: Refining the Semantic Data Model to Improve AccuracyChevron down iconChevron up icon
Chapter 10: Refining the Semantic Data Model to Improve Accuracy
Technical requirements
Embeddings
Embedding metadata
Optimizing retrieval-augmented generation
Summary
Chapter 11: Common Failures of Generative AIChevron down iconChevron up icon
Chapter 11: Common Failures of Generative AI
Technical requirements
Hallucinations
Sycophancy
Data leakage
Cost
Performance issues in generative AI applications
Summary
Chapter 12: Correcting and Optimizing Your Generative AI ApplicationChevron down iconChevron up icon
Chapter 12: Correcting and Optimizing Your Generative AI Application
Technical requirements
Baselining
Testing and red teaming
Information post-processing
Other remedies
Summary
Other Books You May EnjoyChevron down iconChevron up icon
Other Books You May Enjoy
Packt is searching for authors like you
Download a free PDF copy of this book

Recommendations for you

Left arrow icon
LLM Engineer's Handbook
LLM Engineer's Handbook
Read more
Oct 2024522 pages
Full star icon4.9 (28)
eBook
eBook
€43.99
€54.99
Getting Started with Tableau 2018.x
Getting Started with Tableau 2018.x
Read more
Sep 2018396 pages
Full star icon4 (3)
eBook
eBook
€28.99€32.99
€41.99
Python for Algorithmic Trading Cookbook
Python for Algorithmic Trading Cookbook
Read more
Aug 2024404 pages
Full star icon4.2 (20)
eBook
eBook
€31.99€35.99
€44.99
RAG-Driven Generative AI
RAG-Driven Generative AI
Read more
Sep 2024338 pages
Full star icon4.3 (18)
eBook
eBook
€28.99€32.99
€40.99
Machine Learning with PyTorch and Scikit-Learn
Machine Learning with PyTorch and Scikit-Learn
Read more
Feb 2022774 pages
Full star icon4.4 (96)
eBook
eBook
€28.99€32.99
€41.99
€59.99
Building LLM Powered  Applications
Building LLM Powered Applications
Read more
May 2024342 pages
Full star icon4.2 (22)
eBook
eBook
€26.98€29.99
€37.99
Python Machine Learning By Example
Python Machine Learning By Example
Read more
Jul 2024518 pages
Full star icon4.9 (9)
eBook
eBook
€24.99€27.99
€34.99
AI Product Manager's Handbook
AI Product Manager's Handbook
Read more
Nov 2024488 pages
eBook
eBook
€23.99€26.99
€33.99
Right arrow icon

About the 9 authors

Left arrow icon
Profile icon Rachelle Palmer
Rachelle Palmer
LinkedIn icon
Rachelle Palmer is the Product Leader for Developer Database Experience and Developer Education at MongoDB, overseeing the driver client libraries, documentation, framework integrations, and MongoDB University. She has built sample applications for MongoDB in Java, PHP, Rust, Python, Node.js, and Ruby. Rachelle joined MongoDB in 2013 and was previously the Director of the Technical Services Engineering team, creating and managing the team that provided support and CloudOps to MongoDB Atlas.
Read more
See other products by Rachelle Palmer
Profile icon Ben Perlmutter
Ben Perlmutter
LinkedIn iconGithub icon
Ben Perlmutter is a Senior Engineer on the Education AI team at MongoDB. He applies AI technologies such as LLMs, embedding models, and vector databases to improve MongoDB's educational experience. His team built the MongoDB AI chatbot, which uses RAG to help thousands of users a week learn about MongoDB. Ben formerly worked as a technical writer specializing in developer-focused documentation.
Read more
See other products by Ben Perlmutter
Profile icon Ashwin Gangadhar
Ashwin Gangadhar
LinkedIn icon
Ashwin Gangadhar is a Senior Solutions Architect at MongoDB with over a decade of experience in data-driven solutions for e-commerce, HR analytics, and finance. He holds a master's in Controls and Signal Processing and specializes in search relevancy, computer vision, and NLP. Passionate about continuous learning, Ashwin explores new technologies and innovative solutions. Born and raised in Bengaluru, India, he enjoys traveling, exploring cultures through cuisine, and playing the guitar.
Read more
See other products by Ashwin Gangadhar
Profile icon Nicholas Larew
Nicholas Larew
LinkedIn iconGithub icon
Nicholas Larew is a Senior Engineer on MongoDB's Education AI team. He works on MongoDB's AI chatbot, including the open-source framework that powers it, and MongoDB's content generation and dataset curation efforts. Before working in AI, Nicholas wrote and maintained documentation and sample applications for MongoDB's developer-facing products.
Read more
See other products by Nicholas Larew
Profile icon Sigfrido Narváez
Sigfrido Narváez
LinkedIn iconGithub icon
Sigfrido Narváez is an Executive Solution Architect at MongoDB where he works on AI projects, database migration, and app modernization. His customers span the Americas and LATAM for entertainment, gaming, financial and other verticals. Named a MongoDB Master in 2015, he speaks at conferences such as GDC, QCon, and re:Invent, sharing the sample apps he has built in Python and other languages using MongoDB Atlas and leading AI technologies.
Read more
See other products by Sigfrido Narváez
Profile icon Thomas Rueckstiess
Thomas Rueckstiess
LinkedIn icon
Thomas Rueckstiess is a Senior Staff Research Scientist and Head of the Machine Learning Research Group at MongoDB. Thomas holds a PhD in Machine Learning, specializing in neural networks and reinforcement learning, transformers, and structured data modeling. He joined MongoDB in 2012 and was previously the Lead Engineer for MongoDB Compass and Atlas Charts.
Read more
See other products by Thomas Rueckstiess
Profile icon Henry Weller
Henry Weller
LinkedIn icon
Henry Weller is the dedicated Product Manager for Atlas Vector Search, focusing on the query features and scalability of the service, as well as developing best practices for users. He helped launch Atlas Vector Search from Public Preview into General Availability in 2023 and continues to lead the delivery of core features for the service. Henry joined MongoDB in 2022 and was previously a data engineer and backend robotics software engineer.
Read more
See other products by Henry Weller
Profile icon Richmond Alake
Richmond Alake
LinkedIn iconGithub icon
Richmond Alake is an AI/ML Developer Advocate at MongoDB, creating technical learning content for developers building AI applications. His background includes ML architecture, optimizing data pipelines, and developing mobile experiences with deep learning. Richmond specializes in GenAI and computer vision, focusing on practical applications and efficient implementations across AI domains. He guides developers on best practices for AI solutions.
Read more
See other products by Richmond Alake
Profile icon Shubham Ranjan
Shubham Ranjan
LinkedIn icon
Shubham Ranjan is a Product Manager at MongoDB for Python and a core contributing member to AI initiatives at MongoDB. He is also a Python developer and has published over 700 technical articles on topics ranging from data science and ML to competitive programming. Since joining MongoDB in 2019, Shubham has held several roles, progressing from a Software Engineer to a Product Manager for multiple products.
Read more
See other products by Shubham Ranjan
Right arrow icon
Getfree access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook?Chevron down iconChevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?Chevron down iconChevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?Chevron down iconChevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support?Chevron down iconChevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks?Chevron down iconChevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook?Chevron down iconChevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.


[8]ページ先頭

©2009-2025 Movatter.jp