Tag: java
All the articles with the tag "java".
-
Observability for AI applications — tracing and logging LLM calls in Spring Boot
An LLM call is a black box by default: you send text, you get text back. Without observability you cannot diagnose latency, debug wrong answers, or track costs. This post wires Spring AI's Micrometer integration, distributed tracing, and structured logging into the support assistant.
-
AI agent patterns — when to use simple chains, RAG, or full agents
Not every AI feature needs an agent. This post maps the decision: when a single LLM call is enough, when a prompt chain is better, when RAG solves it, and when you actually need a multi-step agent. Includes reliability considerations and a decision framework.
-
Combining RAG and tool calling in one Spring AI agent
RAG retrieves knowledge from documents. Tools retrieve live data from systems. Most production AI assistants need both. This post shows how QuestionAnswerAdvisor and @Tool methods compose naturally in Spring AI, and how the LLM decides which to use.
-
Building an AI agent that checks order status — a step-by-step example
This post builds a complete Spring AI agent that fetches live order data from a service, assesses refund eligibility, and provides actionable answers — all in a single conversation turn. The full application wires tools, RAG, and memory together.
-
Function calling in Spring AI — let the LLM use your Java methods
Spring AI's @Tool annotation turns ordinary Java methods into tools the LLM can invoke. This post covers the full API — annotating methods, registering tools with ChatClient, controlling execution, and reading tool call results.