Leanpub Header

Skip to main content

Programming GenAI

This GenAI bundle is perfect for ML engineers, AI product developers, and architects designing next-generation intelligent applications.

Bought separately

$89.97

Minimum price

$69.99

$74.99

You pay

$74.99

Author earns

$59.99
$
You can also buy this bundle with 3 book credits. Get book credits with a Reader Membership or an Organization Membership for your team.
These books have a total suggested price of $89.97. Get them now for only $69.99!
About

About

About the Bundle

This bundle is very specially designed for AI developers and data engineers who are aiming to build, deploy, and scale Generative AI systems end to end. In this bundle, you get to start with Python AI Programming to solidify fundamentals, later then you progress to build production-grade GenAI agents using OpenAI and vLLM, and finally you make use of Apache Spark for privacy-preserving, large-scale AI data pipelines.

Books

About the Books

Python AI Programming

Navigating fundamentals of ML, deep learning, NLP, and reinforcement learning in practice

This book aspires young graduates and programmers to become AI engineers and enter the world of artificial intelligence by combining powerful Python programming with artificial intelligence. Beginning with the fundamentals of Python programming, the book gradually progresses to machine learning, where readers learn to implement Python in developing predictive models.

The book provides a clear and accessible explanation of machine learning, incorporating practical examples and exercises that strengthen understanding. We go deep into deep learning, another vital component of AI. Readers gain a thorough understanding of how Python's frameworks and libraries can be used to create sophisticated neural networks and algorithms, which are required for tasks such as image and speech recognition. Natural Language Processing is also covered in the book, with fundamental concepts and techniques for interpreting and generating human-like language covered.

The book's focus on computer vision and reinforcement learning is distinctive, presenting these cutting-edge AI fields in an approachable manner. Readers will learn how to use Python's intuitive programming paradigm to create systems that interpret visual data and make intelligent decisions based on environmental interactions. The book focuses on ethical AI development and responsible programming, emphasizing the importance of developing AI that is fair, transparent, and accountable.

Each chapter is designed to improve learning by including practical examples, case studies, and exercises that provide hands-on experience. This book is an excellent starting point for anyone interested in becoming an AI engineer, providing the necessary foundational knowledge and skills to delve into the fascinating world of artificial intelligence.

Key Learnings

  • Explore Python basics and AI integration for real-world application and career advancement.
  • Experience the power of Python in AI with practical machine learning techniques.
  • Practice Python's deep learning tools for innovative AI solution development.
  • Dive into NLP with Python to revolutionize data interpretation and communication strategies.
  • Simple yet practical understanding of reinforcement learning for strategic AI decision making.
  • Uncover ethical AI development and frameworks, and concepts of responsible and trustworthy AI.
  • Harness Python's capabilities for creating AI applications with a focus on fairness and bias.

Table of Content

  1. Introduction to Artificial Intelligence
  2. Python for AI
  3. Data as Fuel for AI
  4. Machine Learning Foundation
  5. Essentials of Deep Learning
  6. NLP and Computer Vision
  7. Hands-on Reinforcement Learning
  8. Ethics to AI

Private AI with Spark

Design, package, and operate private AI locally using Apache Spark, batch pipelines, and vLLM acceleration

For those who want to build controlled, reproducible AI systems entirely within your own infrastructure, this book is the most practical and implementation-focused trainer. Instead of relying on external APIs or cloud-hosted intelligence services, this book clearly demonstrates how Apache Spark can orchestrate data preparation, model training, batch inference, reporting, and LLM acceleration in a disciplined and transparent way.

As the book opens, it swiftly defines private AI, making it clear that external AI calls are not allowed, full ownership of datasets and model assets is imperative, and repeatable runs with traceable outputs are essential. I will use a realistic sample to show you how to build an end-to-end workflow that ingests raw data, normalizes it into a stable schema, trains a baseline classifier, extracts keywords, generates summaries, and produces structured reports. There's no doubt that each step is implemented with clarity and attention to maintainability. You can be sure that logging, manifests, and monitoring are embedded from the start. We implement classic machine learning techniques, vLLM, performance measurement, batch processing patternsquarantine handling, and structured metrics to make private AI more usable and compete with cloud-based AI.

Beyond experimentation, the book transitions seamlessly into packaging and routine execution. It will teach you to bundle multiple stages into a single command workflow, schedule daily or weekly runs, generate compact run reports, and adapt the architecture to new datasets without redesigning the system. It does not promise instant transformation or one-click AI solutions. Instead, it provides a structured path to building a sustainable private AI backbone using Spark as the orchestration layer.

Key Learnings
  • No external AI calls and full control over data, models, and repeatable runs.
  • Stable canonical schema with downstream ML and reusable reporting.
  • Infuse Classic ML with Spark without introducing LLM complexity.
  • Carry out extractive summaries without hallucination risk.
  • Complete traceability through manifests, prompt versions, and run logs.
  • Implement data and batch flow, along with fast inference using vLLM.
  • Extract inspectable data and surface out the hidden errors using quarantine tables.
  • Measure and store performance for every run with stakeholder reporting.
  • Design single-command pipeline with clear configs to build repeatable AI.
Table of Content
  1. Up and Running with Private AI
  2. Data Workflows using Spark DataFrames
  3. Powerful NLP without LLM
  4. Batch Inference and Practical Outputs
  5. Smart Summaries
  6. Boosting with vLLM Integration
  7. Packaging Private AI

Build GenAI Agents with OpenAI + vLLM

Develop portable AI agents in Python with structured outputs, tool calling, OpenAI Agents SDK, vLLM, model switching, CLI, API, and Docker deployment

AI agents are getting easier to build, but the surrounding ecosystem of models, SDKs, and frameworks is changing quickly. A lot of agent apps get tricky to maintain since they depend too much on a certain provider, library, or deployment setup. This book looks at a practical alternative, which is to make AI agents whose main logic doesn't change while models, SDKs, and runtimes can be changed around it. It's not about using complicated frameworks. Rather, this book shows you simple architectural patterns that let you set up an agent application so that tools, schemas, prompts, and business logic can stay separate from the runtime layer.

For starters, it'll be a simple loop with agents, and we'll gradually build on that with tools that make things deterministic, outputs in a structured JSON format, and schema validation. It'll teach skills, like switching between models through configuration, running the same agent with hosted models or local inference using vLLM, and isolating SDK-specific integrations behind small adapter layers. Later, we will focus on packaging and deployment, in which we will convert the agent into a command-line tool, expose it through a minimal HTTP API, and package the application using Docker. Ultimately, the book puts the project together as a reusable starter template that can be used as a basis for future agent-based applications.

Instead of talking about shortcuts or automation, this book focuses on practical development patterns for building maintainable AI agents. Basically, this book is perfect for Python developers, software engineers, and AI practitioners who want a step-by-step process for designing agents that can adapt as the surrounding ecosystem changes.

Key Learnings
  • Build GenAI agents using simple agent loop that accepts prompts, calls tools, and returns structured AI responses.
  • Use structured JSON outputs and Pydantic schemas to make AI agent responses reliable and safe for automation.
  • Design AI tools as deterministic Python functions so agents can call calculators, summarizers, and utilities predictably.
  • Create portable AI agents by separating business logic from LLM and model APIs.
  • Implement a model gateway pattern to switch between OpenAI models, local LLMs, or other providers via configuration.
  • Run the same agent with OpenAI models or local LLM inference using vLLM.
  • Prevent SDK lock-in by isolating AI SDK integrations behind runtime adapters.
  • Use LLM regression prompts and schema validation for better stability of AI Agents during switching the models.
  • Package AI agent as CLI tool and HTTP API for real applications and integrations.
  • Deploy AI agents with Docker containers and environment variable.
Table of Content
  1. Shipping GenAI Agent in Minutes
  2. Building Agent Workflows
  3. Reliable and Structured Agent Output
  4. Switching Models without Rewriting Agent
  5. Running vLLM
  6. Designing Stable Business Logic across Multiple SDKs
  7. Agent Packaging and Deployment

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub