Applying  Generative AI on Enterprise Use Cases

Applying Generative AI on Enterprise Use Cases

Background

I have been part of the IT industry for nearly 30 years. Over these decades, I have observed and embraced several guiding principles—wisdom passed down by mentors and industry veterans—that have consistently proven invaluable. Among them, two or three overarching principles have stood out:

First this world famous Physicist and Nobel Laureate , Richard Feynman, said this:

"Richard Feynman" image from

Secondly, I ask myself one fundamental question every day: Am I effectively applying my skills and knowledge to solve the challenges faced by customers—many of whom may not have a technical background—at various levels? This principle serves as a guiding force because, ultimately, it is the customers who sustain the IT industry through their investment and trust.

Moreover, this philosophy was reinforced early in my career when I had the privilege of witnessing a true legend in the field—an esteemed alumnus of the Indian Institute of Technology (IIT), Biswajit Das—consistently uphold the same standard for his customers, many of whom were also mine. He did his masters in Neural Networks from IIT KGP in 1990 I guess. As they say Hard Work never goes unpaid! I have seen him (Mr. Das) handling customers from Aluminum Manufacturing , Tea Producers to later India's Genome Project involving PhD level Chemistry, Biology and of Course Computer Science! His unwavering commitment to customer-centric problem-solving left a lasting impression, shaping my own approach to technology and innovation and remaining rooted to understand end Customers!.

Lets talk about the Book itself.

Introduction

The Information Technology industry is much like a vast ocean, constantly shifting with wave after wave of transformation. The latest surge in this never-ending tide is Generative AI. We are witnessing an unprecedented proliferation of AI-driven content—videos being created, books authored on tech topics related to Gen AI, articles written, and keynotes delivered—all revolving around this revolutionary technology. Like many others, I immersed myself in reading and learning, striving to grasp its nuances and implications. Over the past few months, I have come to realize that, much like previous technological waves, the true measure of Generative AI’s impact will be determined by its ability to address real-world enterprise challenges, streamline existing use cases, and solve pressing industry problems.

I consider myself fortunate to have had the opportunity to work across more than ten critical business verticals, including Manufacturing, Retail, Healthcare, Telecom, Mining, E-Commerce, and others. My very first professional experience was with a Turf Club in my hometown of Kolkata, a role that provided me with fascinating insights into the world of horse racing—the Horses who are magnificent Animals, trainers, jockeys, races, entertainment aspects, as well as its intricate inventory, purchasing, accounting and financial operations. This experience, along with my broader industry exposure, inspired me to explore how Generative AI could be applied to challenges I once tackled using traditional ETL methods nearly three decades ago. As I delved into these solutions, I felt compelled not only to solve them but also to present my learnings in a structured and engaging manner. This journey led me to write a book titled Mastering Spring Boot 3 & Spring AI: Building GenAI-Powered Retrieval-Augmented Applications with Open AI API and Angular Dashboards, where I share my insights, experiences, and practical applications of Generative AI in enterprise solutions.

This series will explore the application of Generative AI tools and technologies, including Python, LangChain, Spring AI, OpenAI API, and Large Language Models (LLMs), to address enterprise use cases—primarily focused on Retrieval-Augmented Generation (RAG). The objective is to solve complex challenges in multiple mission-critical systems across various industry verticals. To begin, we will examine the use of Generative AI in the domain of horse racing.

If one can read / understand Angular (16) code and Spring AI / Spring Boot 3 Code, the Book is essentially free because the sample chapters that gives a nice tour of what is presented throughout the book is free. The associated code is in Github as well.

Book Site : https://leanpub.com/genai-spring-ai-rest-crud-mysql8-angular

Code is here : https://github.com/binitdatta/royal-kolkata-turf-genai-app-suite

Legal Disclaimer

This book presents case studies, solutions, and analyses related to an enterprise loosely inspired by real-world business scenarios. While the name Royal Kolkata Turf Club (RKTC) is referenced, the data, business processes, and specific implementations discussed are entirely fictional and have been modified for educational and illustrative purposes.

Any similarity to actual businesses, organizations, individuals, or proprietary systems is purely coincidental. The book does not contain real customer data, confidential business information, or proprietary methods from any actual enterprise. Furthermore, it does not represent the views, policies, or operations of any specific organization.

The content is provided as is, without any express or implied warranties. The author and publisher disclaim any liability for misuse, misinterpretation, or unintended consequences resulting from the application of the solutions presented in this book.

All trademarks, logos, and brand names mentioned (if any) belong to their respective owners. Their inclusion in this book is for informational and illustrative purposes only and does not imply any affiliation, endorsement, or sponsorship.

By reading this book, you acknowledge that the case studies and solutions presented are for learning and discussion purposes only and should not be applied to real-world business scenarios without proper validation and consultation.

About the Book

The rapid advancements in Generative AI (Gen AI) have transformed the way applications are designed, built, and deployed. As AI-driven systems become an integral part of enterprise solutions, it is imperative for developers to understand how to effectively integrate Gen AI capabilities into modern software architectures. This book serves as a practical guide to building a Gen AI-driven suite of applications, demonstrating how to harness the power of Spring AI, Angular 16, and Spring Boot 3 to create intelligent and interactive applications.

This book provides a comprehensive hands-on approach to developing a full-fledged Gen AI-powered application suite, consisting of:

  • An Angular 16 UI – A dynamic frontend that enables users to interact with the system through intuitive interfaces, including text-based queries and graphical visualizations.
  • A Gen AI REST API backend using Spring AI – A powerful AI-driven API that processes natural language inputs and generates intelligent responses, solving typical chatbot use cases and providing insightful answers in the form of charts and graphs.
  • A Spring Boot 3 REST API – A microservice performing CRUD operations on a MySQL 8.x backend database, ensuring seamless data management and persistence.

What You Will Learn

This book is structured to provide a real-world, production-grade implementation of a Gen AI-powered software ecosystem, covering the following key aspects:

  • Building an AI-augmented chatbot using Spring AI to process and respond to user queries intelligently.
  • Designing a RESTful Gen AI API that enables AI-driven insights while integrating with enterprise applications.
  • Developing an Angular 16 frontend that presents both textual and graphical (chart-based) responses to user queries.
  • Implementing CRUD-based microservices in Spring Boot 3 that interact with a MySQL 8.x database to support application data needs.
  • Leveraging AI for graphical visualizations, transforming textual inputs into meaningful charts and dashboards.
  • Best practices for integrating Gen AI into modern software architectures while ensuring scalability, performance, and maintainability.

Why This Book?

As Gen AI continues to evolve, developers must adapt their architectural approach to build AI-driven applications that go beyond static interactions. This book is written with practicality in mind, ensuring that each concept is backed by real-world scenarios and hands-on coding examples. Whether you are a software architect, backend engineer, or full-stack developer, this book will equip you with the knowledge needed to seamlessly integrate Generative AI into your applications.

Let's embark on a journey to build intelligent, AI-driven applications that merge cutting-edge AI capabilities with robust software engineering principles.

A Tour of the Application

This is a big book with close to 500 or more pages. However, not all specially people who already Spring Boot, can read Java Code are familiar with how Angular works, may not need to read the entire book to understand / benefit from the effort. This chapter will show how to clone the associated Git repository, run the three applications and if at that point, you prefer self-study, please feel free to skip the rest of the book. The Tools installation still is mandatory but I suspect many of you may already have the tools installed. So here we go.

Create a new directory / folder in your hard drive and run the following:

git clone https://github.com/binitdatta/royal-kolkata-turf-genai-app-suite.git        

?Open this REST API Application in your IDE


Cloned Repository Folder

In my IntelliJ IDE, this is the app:

Backend REST API Opened in IDE

Creating the Backend Database

Connect to your local MySQL 8.x database using a good Client i.e. MySQL Workbench, JetBrains DBGrid or something else.

Open this file in your Spring Boot REST API Project : db_ddl_dump.sql under the SQL directory.

Run the following two statements

create database rktc_genai

use rktc_genai
        

Now run one after another Create Table Statements from the file.

Once all the tables are created, open the ddl.sql file under the same SQL directory and move to the section

https://github.com/binitdatta/royal-kolkata-turf-genai-app-suite/blob/main/spring-boot-3-royal-kolkata-turf-genai-rest-api/SQL/db_ddl_dump.sql

Execute all the INSERT statements to create the seed data. As I said, we will explain the database schema in the next chapter but this is all for the database for now.

NOTE: I asked ChatGPT through English Prompt describing the business domain and it could design the Database Schema for me. Then I asked it to generate the seed data where it faced challenges maintaining for foreign key relationships but then I helped it order those properly. Overall, the time it took was a small fraction of if I created the seed data by hand myself.

Build the Backend CRUD REST API


Run the following command :

./gradlew clean build         


Build Successful

Now let’s run the application by :

java -jar build/libs/spring-boot-3-royal-kolkata-turf-genai-rest-api-0.0.1-SNAPSHOT.jar        


REST API Running

Sanity Test with Postman

Open The GenAI Chatbot REST API


In the IDE

Open a new terminal in the IDE

Run the following command to build :

mvn clean install        




Run :

java -jar target/spring-boot-3-royal-kolkata-turf-genai-bot-0.0.1-SNAPSHOT.jar        



Run the Angular UI

Open VS Code and the following Folder from your cloned repo folder:


Open a new Terminal within VS Code and Run the command :

npm start        

Now lets visit the application

Open a new Browser Window

Navigate to https://localhost:4400

Home Page


Note: I utilized a professionally designed Bootstrap theme, which I purchased, as I do not consider myself an expert in Cascading Stylesheets. However, for learning purposes, it is freely available. If you are interested, you can explore their extensive collection here: BootstrapMade, which offers an impressive range of themes.

Home Page (Continued): I have incorporated small Bootstrap cards to highlight the key contributors to Generative AI.


There are a few driving principles of Gen AI that we would like all Professionals to have a strong foundation to begin with. Lets see what they are.

Gen AI Timeline

NOTE : I used ChatGPT's DALLe to generate the Image

Neural Networks

Click on the Menu Neural Networks : One page summarization to grasp the foundation of Gen AI.

Natural Language Processing

Click on the NLP Menu : One page summarization of another foundational concept of Gen AI


Self Attention

The last piece of the puzzle . Click on the Self Attention Menu

Architecture

Click on RKTC Charts ? Architecture to understand the architecture of the system.


Tabular Dashboards

Click on the Royal Kolkata Turd Dashboards to see the menus

Horse By Wins Tabular Dashboard

Category Wise Handicap

There are more for you to explore.

Horse Grid

Click on RKTC Charts ? Show Horses

Edit Horse

Click on the Edit Button of any Horse


You can change and Click Update Horse

Add Horse

Click on RKTC Charts ? Add Horses

Fill the Values and Click on Add Horse.

Exploring The Chatbot

Click on RKTC Charts ? Chat


Please Click Send

It shows Chatbot is Thinking as it processes your request


Click on the Second Button

Results

Click on the Third Button

Click Send

It overrides the previous chart drawn, and shows the results

If your screen is tool cluttered, you can click the Refresh button


Click on Refresh again

Click on the Last Button

If you click on the Membership Pie Chart button,

Special Note(Gen AI):

I am developing a System Message Prompt to instruct OpenAI to generate a pure JSON response from backend API calls made via the OpenAI Function (leveraging Spring AI, though standard Python—interestingly named after a British radio show—can accomplish this just as easily).

Once my Angular UI receives the structured JSON response, rendering charts becomes effortless. With the flexibility of modern charting libraries, this process is essentially child’s play. I am currently using HighCharts, but you are welcome to use any library that best suits your needs.

Special Note:

I am deeply grateful for the formative years of my career, a time when professionals like myself—who designed systems and wrote extensive amounts of code—had the invaluable opportunity to engage directly with end customers. From C-suite executives to frontline desk clerks, we learned business domains firsthand, gaining insights that no technical documentation or secondary research could ever fully replicate.

While I continue to acquire new technology skills quite frequently, my domain knowledge across multiple industry verticals remains unaffected, unchanged, and still highly relevant. Spring Boot would appear in 2011/2012 and become V 1 then 2 and now 3 but US GAAP (Generally Accepted Accounting Principles) remains the same for Fortune 20 - 2000 companies across verticals. Investing in the Domain is as Warren Buffet says Value Investment or Pure Gold! Understanding customers firsthand is akin to an archer who knows the bullseye—it sharpens precision, enhances problem-solving, and ensures that technological solutions are truly aligned with business needs.

Book Link : https://leanpub.com/genai-spring-ai-rest-crud-mysql8-angular

Conclusion:

As mentioned earlier, both the book and the code are available free of cost, provided you can read and understand the code on your own.

This marks the beginning of my "Applying Generative AI RAG to Solve Enterprise Business Vertical Use Cases" series. Up next, I will be exploring applications in the following domains:

  • E-Commerce ? (Work in Progress)
  • Coal Mining
  • Healthcare (Insurance & Facility Management)
  • Banking
  • Telecom
  • Education
  • Manufacturing

Thank you for your time and attention! I look forward to sharing more insights in the upcoming installments.

Warm regards, Binit Datta


Pavan Baruri

Technology Leader | Product Engineering | Digital Experiences | Innovation

1 周

The book seems to offer a great mix of concepts and hands-on practice. I’m looking forward to your E-Commerce installment, Binit! Congratulations!!

回复

Congratulations Binit on writing this book. Good to see you referenced our flagship project - RCTC

Shaumitra Ghosh

[Sr Solution Architect | Enterprise Architect | Strategy | MultiCloud | SmartCity]

3 周

Congratulations Binit Da for the ??

要查看或添加评论,请登录

Binit Datta的更多文章

社区洞察

其他会员也浏览了