Digital Library

Generative AI-Driven Application Development with Java Leveraging Large Language Models in Modern Java Applications (Satej Kumar Sahu)(Z-Library)

Satej Kumar Sahu

Generative AI-Driven Application Development with Java Leveraging Large Language Models in Modern Java Applications (Satej Kumar Sahu)(Z-Library)

Author Satej Kumar Sahu

java

This is the first hands-on guide that takes you from a simple “Hello, LLM” to production-ready microservices, all within the JVM. You’ll integrate hosted models such as OpenAI’s GPT-4o, run alternatives with Ollama or Jlama, and embed them in Spring Boot or Quarkus apps for cloud or on-pre deployment. You’ll learn how prompt-engineering patterns, Retrieval-Augmented Generation (RAG), vector stores such as Pinecone and Milvus, and agentic workflows come together to solve real business problems. Robust test suites, CI/CD pipelines, and security guardrails ensure your AI features reach production safely, while detailed observability playbooks help you catch hallucinations before your users do. You’ll also explore DJL, the future of machine learning in Java. This book delivers runnable examples, clean architectural diagrams, and a GitHub repo you can clone on day one. Whether you’re modernizing a legacy platform or launching a green-field service, you’ll have a roadmap for adding state-of-the-art generative AI without abandoning the language—and ecosystem—you rely on. What You Will Learn Establish generative AI and LLM foundations Integrate hosted or local models using Spring Boot, Quarkus, LangChain4j, Spring AI, OpenAI, Ollama, and Jlama Craft effective prompts and implement RAG with Pinecone or Milvus for context-rich answers Build secure, observable, scalable AI microservices for cloud or on-prem deployment Test outputs, add guardrails, and monitor performance of LLMs and applications Explore advanced patterns, such as agentic workflows, multimodal LLMs, and practical image-processing use cases Who This Book Is For Java developers, architects, DevOps engineers, and technical leads who need to add AI features to new or existing enterprise systems. Data scientists and educators will also appreciate the code-first, Java-centric approach.

Format PDF
Size 10.9 MB
11
Views
0
Downloads
0.00
Total Donations
(First 20 pages)

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Page 1
Generative AI-Driven Application Development with Java Leveraging Large Language Models in Modern Java Applications — Satej Kumar Sahu
Page 2
Generative AI-Driven Application Development with Java Leveraging Large Language Models in Modern Java Applications Satej Kumar Sahu
Page 3
Generative AI-Driven Application Development with Java: Leveraging Large Language Models in Modern Java Applications ISBN-13 (pbk): 979-8-8688-1608-6 ISBN-13 (electronic): 979-8-8688-1609-3 https://doi.org/10.1007/979-8-8688-1609-3 Copyright © 2025 by Satej Kumar Sahu This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Melissa Duffy Desk Editor: Laura Berendson Editorial Project Manager: Gryffin Winkler Cover image designed by Gláuber Sampaio on Unsplash Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a Delaware LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on https://github.com/Apress/Generative-AI-Driven-Application-Development-with-Java. For more detailed information, please visit https://www.apress.com/gp/services/source-code. If disposing of this product, please recycle the paper Satej Kumar Sahu Berhampur, Odisha, India
Page 4
To my beloved parents, Kusum and Kiran, for your unwavering love, your endless encouragement, and the values you’ve instilled in me. And to my sister, Lipsa, for always standing by me with faith and support— this journey wouldn’t have been possible without you. With all my love and gratitude.
Page 5
(This page has no text content)
Page 6
(This page has no text content)
Page 7
(This page has no text content)
Page 8
(This page has no text content)
Page 9
(This page has no text content)
Page 10
(This page has no text content)
Page 11
(This page has no text content)
Page 12
(This page has no text content)
Page 13
(This page has no text content)
Page 14
(This page has no text content)
Page 15
(This page has no text content)
Page 16
(This page has no text content)
Page 17
xvii About the Author Satej Kumar Sahu is a principal engineer at Zalando SE with 15 years of hands-on experience designing large-scale, data-intensive systems for global brands including Boeing, Adidas, and Honeywell. He is passionate about technology, people, and nature. A specialist in software architecture, big-data pipelines, and applied machine learning, he has shepherded multiple projects from whiteboard sketches to production deployments serving millions of users. Satej has been working with large language models since their earliest open-source releases, piloting retrieval-augmented generation and agentic patterns long before they became industry buzzwords. He is the author of two previous programming books— Building Secure PHP Applications and PHP 8 Basics—and is a frequent speaker at developer conferences and meet-ups around the world. When he isn’t translating cutting-edge AI research into practical code, you’ll find him mentoring engineering teams, contributing to open-source projects, or tinkering with the newest transformer models in his home lab. He believes that through technology and conscientious decision-making, each of us has the power to make this world a better place.
Page 18
xix About the Technical Reviewer Jerzy Plocha is an accountable, results-driven cloud computing architect and team manager with strong analytical skills, a passion for well-designed code and scalable architectures, and a proven track record in managing teams and developing actionable metrics that drive business success. As a reviewer, he has provided technical guidance on cloud-architecture patterns and security best practices.   
Page 19
xxi I would like to thank my parents for always believing in and having patience with me while I pursued my interest in technology and for giving me the freedom to explore and try different things. Also, thanks to my sister Lipsa for always being beside me whenever I needed her. I would like to thank all my teachers for being with me during my journey, Runish for the foundational mentoring support at the start of my career, Mindfire Solutions for my first career opportunity, and all with whom I have had an opportunity to interact and learn from. Last but not least, I would like to thank Melissa for the awesome opportunity to write my second book and the wonderful team at Apress for all their support without whom this book would not have been possible. Acknowledgments
Page 20
xxiii Introduction In recent years, generative AI (Gen AI) and large language models (LLMs) have reshaped the boundaries of what software can do. From chatbots that sound eerily human to code-generation tools that augment developer productivity, the rise of transformer-based architectures has opened up a new paradigm in application design. But while much of this innovation has played out in Python-centric ecosystems, Java developers— especially those working on enterprise-scale systems—have often found themselves on the sidelines, grappling with integration gaps, unclear tooling, or limited examples. This book aims to change that. Generative AI-Driven Application Development with Java is a hands-on, code-first guide built explicitly for Java practitioners. Whether you’re a backend engineer fluent in Spring Boot or a performance-minded developer building reactive systems in Quarkus, this book provides a clear, structured roadmap for integrating LLMs into modern Java applications. You’ll start from first principles, understanding what makes Gen AI “generative,” how LLMs like GPT-4o and Mistral work, and why models are only one part of a much larger ecosystem. From there, you’ll dive into building real-world applications such as chat assistants, retrieval-augmented systems, tool-using agents, and even multimodal apps that read and write images. You’ll explore hosted APIs from OpenAI and Azure and also self-host your own models using tools like Ollama and Jlama—all without leaving the JVM. But this book goes beyond the “Hello, World” demos. With each chapter, you’ll learn to wire up production-grade systems: prompt engineering patterns, memory management, evaluation harnesses, API guardrails, and observability pipelines. You’ll explore the new breed of Java-native AI tooling—from LangChain4j and Spring AI to DJL and ONNX—while keeping scalability, security, and maintainability front and center. This book is not just for Java developers looking to “add a chatbot.” It’s for engineers, architects, and DevOps professionals who need to bring AI into their core platforms— responsibly, reliably, and at scale.
The above is a preview of the first 20 pages. Register to read the complete e-book.

Support Author

0.00
Total Amount (¥)
0
Donation Count
Please enter an amount Minimum ¥1

You will be redirected to Alipay to complete payment, then return here.

Recommended for You

Loading recommended books...
Failed to load, please try again later
Back to List