Skip to main content

AI & Machine Learning

Tutorials and deep-dive implementations covering artificial intelligence and machine learning concepts in Java and other languages.

Spring AI 1.x to 2.0: The Migration Guide (What Breaks, and What Breaks Silently)

A complete Spring AI 1.x to 2.0 migration guide, verified against Spring AI 2.0.0 on Spring Boot 4.1. Boot 4 is mandatory and Jackson moves to 3. internalToolExecutionEnabled and toolNames are removed outright, not renamed. Chat memory becomes stricter: 2.0 removes the remaining default-ID and builder-based configuration paths, while explicit per-request conversation IDs — introduced during the 1.x line — become the only safe migration target. Plus the changes that produce no compile error at all.

Implementing Vector Embeddings and Semantic Search in Pure Java

A complete implementation of a semantic search engine in pure Java — no external libraries. Covers TF-IDF vectorisation, cosine similarity, and document ranking by meaning. Explains the mathematics behind vector embeddings, how they power RAG and AI search systems, and provides a working query engine with annotated code and sample output. The same architecture used by Pinecone, Weaviate, and Elasticsearch — built from scratch.