By Frank Greco

March 2024

Upcoming events by this speaker:

May 13-14, 2024 Online live streaming:
Introduction to Generative AI for Java Developers

Generative AI and Enterprise Java Developers (First Part)

In the rapidly changing field of software development, it’s crucial for developers to stay ahead of the curve for success.  Certainly, seasoned Java developers keep track of each regular release to grasp the use of the advanced capabilities in this continuously evolving programming language.

The advent of Generative AI has now added a new layer of complexity for Java engineers.  They must understand how to assimilate this critical innovation into their development workflows where it makes sense. This integration introduces a powerful and transformative dimension to the overall software development process.

Why Generative AI Matters in Java Development


Before integrating Generative AI into your software development process, Java developers need to understand the foundations of generative AI. There are foundation concepts such as Artificial Intelligence, Machine Learning, Deep Learning, Predictive AI, and Generative AI that all Java software engineers must understand first.

Artificial Intelligence (AI), simply put, is the simulation of human intelligence in machines that are programmed to think and learn like humans. AI uses algorithms and specialized hardware to enable machines to perform tasks that typically require human intelligence. These tasks include problem-solving, learning, perception, language understanding, and decision-making.  AI is not a new technology; it has a history that goes back many decades, at least to the 1940s and 1950s.  With the advent of cloud computing with instantly available computing resources, now make AI capabilities easily accessible to all developers.

Machine Learning (ML) is one subset of AI.  It is a broader concept that involves the development of algorithms and statistical models that enable a system to perform a specific task without being programmed using conventional techniques.  The machine ingests large quantities of data and determines patterns from this data.  This is similar to mathematical algorithms that determine formalized functions from a given dataset, a technique that I’m sure many of us learned during our university education.

A popular subset of ML is Deep learning. This type of machine learning uses a combination of data structure and algorithm called a neural network.  A neural network is a cascading set of probabilistic weights determined by reading large quantities of historical data patterns.  This data can be based on text, images, sound, or other types. The more layers in the neural network, the greater the accuracy (and complexity) of the machine learning model. Each additional layer that processes the input data increases the model’s ability to recognize patterns in the data. Along with the availability of significant cloud computing resources, deep learning attempts to simulate the human brain’s architecture to process data and make decisions.  Of course, by using more layers to obtain more accuracy, additional computational resources are required. 

ML is a broad concept encompassing various techniques for task-specific learning.  Deep learning, on the other hand, is a more sophisticated and specific type of machine learning that involves neural networks with multiple layers to learn data patterns.  In the general trade press, it’s important to note that the term “machine learning” is more commonly used, even though the more accurate term is “deep learning.”

Within Deep Learning, there are two primary and important subsets: Predictive AI and Generative AI.

Predictive AI focuses on making predictions or forecasts based on historical data. It aims to identify patterns in the data and use them to predict future outcomes.  Predictive AI models are trained on labeled datasets, where the algorithm learns the relationships between input features and the corresponding target variable.  Predictive AI is particularly useful when there is a need to anticipate specific outcomes based on available data.  Weather prediction, image classification, autonomous vehicles, anticipating hardware/software failures, detecting email anomalies, etc, are examples of predictive AI.  For many use cases, Predictive AI is an excellent technique to use.  There are several excellent Java toolkits for Predictive AI, such as JSR 381 Visual Recognition, Amazon’s DLJ, and Deep Netts.

Another very important subset of Deep Learning is Generative AI or “GenAI”.  This is the type of AI that the world is currently excited about. GenAI focuses on creating new data samples that resemble the input data it was trained on. Instead of predicting from existing data, GenAI generates novel, synthetic data based on learned patterns.  Generative AI is currently extremely popular for its ability to create human-like text, images, and sound.  Generative AI typically deals with a type of natural language processing (NLP) that uses an architecture called “Transformers,” which was developed at Google in 2017.  These systems use Large Language Models (LLMs) that are trained on large quantities of text to extract patterns.  While there are popular LLMs available from large companies such as OpenAI, Google, and Microsoft, there currently are many open source models that you can run directly on your laptop.  The growing popularity of these open-source LLMs is a significant trend to monitor.

In summary, predictive AI is centered around making predictions based on existing patterns, while generative AI is focused on creating new, realistic data. Both approaches have their own set of applications and are valuable in different contexts within the field of artificial intelligence.  There are even use cases that combine both types of deep learning.  We will focus here on generative AI, which is currently a very popular topic in the industry.