1 option
Building AI Intensive Python Applications : Create Intelligent Apps with LLMs and Vector Databases / Rachelle Palmer [and eight others].
- Format:
- Book
- Author/Creator:
- Palmer, Rachelle, author.
- Language:
- English
- Subjects (All):
- Artificial intelligence.
- Natural language processing (Computer science).
- Python (Computer program language).
- Machine learning.
- Physical Description:
- 1 online resource (299 pages)
- Edition:
- First edition.
- Place of Publication:
- Birmingham, England : Packt Publishing, [2024]
- Biography/History:
- Palmer Rachelle: 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. Perlmutter Ben: 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. Gangadhar Ashwin: 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. Larew Nicholas: 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. Narvaez Sigfrido: Sigfrido Narvaez 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. Rueckstiess Thomas: 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. Weller Henry: 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. Alake Richmond: 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. Ranjan Shubham: 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.
- Summary:
- Master retrieval-augmented generation architecture and fine-tune your AI stack, along with discovering real-world use cases and best practices to create powerful AI apps Key Features 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 Book 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. 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 Who this book is 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.
- Contents:
- Cover
- FM
- Table of Contents
- Preface
- Chapter 1: Getting Started with Generative AI
- Technical requirements
- Defining the terminology
- The generative AI stack
- Python and GenAI
- OpenAI API
- MongoDB with Vector Search
- Important features of generative AI
- Why use generative AI?
- The ethics and risks of GenAI
- Summary
- Chapter 2: Building Blocks of Intelligent Applications
- Defining intelligent applications
- The building blocks of intelligent applications
- LLMs - reasoning engines for intelligent apps
- Use cases for LLM reasoning engines
- Diverse capabilities of LLMs
- Multi-modal language models
- A paradigm shift in AI development
- Embedding models and vector databases - semantic long-term memory
- Embedding models
- Vector databases
- Model hosting
- Your (soon-to-be) intelligent app
- Sample application - RAG chatbot
- Implications of intelligent applications for software engineering
- Part 1
- Foundations of AI: LLMs, Embedding Models, Vector Databases, and Application Design
- Chapter 3: Large Language Models
- Probabilistic framework
- n-gram language models
- Machine learning for language modelling
- Artificial neural networks
- Training an artificial neural network
- ANNs for natural language processing
- Tokenization
- Embedding
- Predicting probability distributions
- Dealing with sequential data
- Recurrent neural networks
- Transformer architecture
- LLMs in practice
- The evolving field of LLMs
- Prompting, fine-tuning, and RAG
- Chapter 4: Embedding Models
- What is an embedding model?
- How do embedding models differ from LLMs?
- When to use embedding models versus LLMs
- Types of embedding models
- Choosing embedding models
- Task requirements.
- Dataset characteristics
- Computational resources
- Vector representations
- Embedding model leaderboards
- Embedding models overview
- Do you always need an embedding model?
- Executing code from LangChain
- Best practices
- Chapter 5: Vector Databases
- What is a vector embedding?
- Vector similarity
- Exact versus approximate search
- Measuring search
- Graph connectivity
- Navigable small worlds
- How to search a navigable small world
- Hierarchical navigable small worlds
- The need for vector databases
- How vector search enhances AI models
- Case studies and real-world applications
- Okta - natural language access request (semantic search)
- One AI - language-based AI (RAG over business data)
- Novo Nordisk - automatic clinical study generation (advanced RAG/RPA)
- Vector search best practices
- Data modeling
- Deployment
- Chapter 6: AI/ML Application Design
- Enriching data with embeddings
- Considering search use cases
- Data storage
- Determining the type of database cluster
- Determining IOPS
- Determining RAM
- Final cluster configuration
- Performance and availability versus cost
- Data flow
- Handling static data sources
- Storing operational data enriched with vector embeddings
- Freshness and retention
- Real-time updates
- Data lifecycle
- Adopting new embedding models
- Security and RBAC
- Best practices for AI/ML application design
- Part 2
- Building Your Python Application: Frameworks, Libraries, APIs, and Vector Search
- Chapter 7: Useful Frameworks, Libraries, and APIs
- Python for AI/ML
- AI/ML frameworks
- LangChain
- LangChain semantic search with score
- Semantic search with pre-filtering
- Implementing a basic RAG solution with LangChain.
- LangChain prompt templates and chains
- Key Python libraries
- pandas
- PyMongoArrow
- PyTorch
- AI/ML APIs
- Hugging Face
- Chapter 8: Implementing Vector Search in AI Applications
- Information retrieval with MongoDB Atlas Vector Search
- Vector search tutorial in Python
- Vector Search tutorial with LangChain
- Building RAG architecture systems
- Chunking or document-splitting strategies
- Simple RAG
- Advanced RAG
- Part 3
- Optimizing AI Applications: Scaling, Fine-Tuning, Troubleshooting, Monitoring, and Analytics
- Chapter 9: LLM Output Evaluation
- What is LLM evaluation?
- Component and end-to-end evaluations
- Model benchmarking
- Evaluation datasets
- Defining a baseline
- User feedback
- Synthetic data
- Evaluation metrics
- Assertion-based metrics
- Statistical metrics
- LLM-as-a-judge evaluations
- RAG metrics
- Human review
- Evaluations as guardrails
- Chapter 10: Refining the Semantic Data Model to Improve Accuracy
- Embeddings
- Experimenting with different embedding models
- Fine-tuning embedding models
- Embedding metadata
- Formatting metadata
- Including static metadata
- Extracting metadata programmatically
- Generating metadata with LLMs
- Including metadata with query embedding and ingested content embeddings
- Optimizing retrieval-augmented generation
- Query mutation
- Extracting query metadata for pre-filtering
- Formatting ingested data
- Advanced retrieval systems
- Chapter 11: Common Failures of Generative AI
- Hallucinations
- Causes of hallucinations
- Implications of hallucinations
- Sycophancy
- Causes of sycophancy
- Implications of sycophancy
- Data leakage
- Causes of data leakage.
- Implications of data leakage
- Cost
- Types of costs
- Tokens
- Performance issues in generative AI applications
- Computational load
- Model serving strategies
- High I/O operations
- Chapter 12: Correcting and Optimizing Your Generative AI Application
- Baselining
- Training and evaluation datasets
- Few-shot prompting
- Retrieval and reranking
- Late interaction strategies
- Query rewriting
- Testing and red teaming
- Testing
- Red teaming
- Information post-processing
- Other remedies
- Appendix: Further Reading
- Index
- Other Books You May Enjoy.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Description based on print version record.
- ISBN:
- 9781836207245
- 1836207247
- OCLC:
- 1455530476
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.