Month: October 2024

The Java printf() output method is used to generate a formatted string. Data from the arguments is written and formatted placeholders. In this tutorial we will explore the functionality of the printf() method. The Java language was heavily inspired by the C programming language. As such, the printf() method is very similar in functionality to […]Continue reading

What are Structured Outputs? Using Structured Outputs is an important aspect when interacting with LLMs programmatically. LLMs, by their nature, generate unstructured output. The unstructured output does not work well with programming languages which need structure to understand the data. Through prompting techniques, you can direct the LLM to create a structured output. The format […]Continue reading

A hidden feature of Spring AI is the support of String Templates, aka StringTemplates. StringTemplate is a lightweight Java template engine. It is simple, and easy to use. StringTemplate is a stable project, established in 2007 and now on its 4 major release. Here is an example from the homepage of the Stringtemplate website. On […]Continue reading

Spring AI is the latest project from the Spring Team. Working with Large Language Models (LLMs) has traditionally been the domain of languages such as Python and Javascript. Spring AI is changing this and is enabling integration with generative AI with Java and Spring. In this post, we will take an initial look at using […]Continue reading

JSON Logging in Spring Boot simplifies setup, especially for applications in distributed environments like Kubernetes. Consolidated logging requires searchable logs, often formatted in JSON. Logstash is a popular choice. A basic Logback configuration supports JSON logging, aiding development with profile flexibility. Testing can be done by generating log messages easily.