Tag: springboot
All the articles with the tag "springboot".
-
Testing AI features — how do you test something non-deterministic?
LLM outputs vary on every call. You cannot assert exact strings. But you can test structure, facts, boundaries, and behaviour — with the right strategies. This post covers unit tests with mocked models, integration tests with real calls, and evaluation harnesses for answer quality.
-
Controlling AI costs in production — token budgets, caching, and model selection
LLM API costs scale directly with token volume. A busy support assistant can easily spend hundreds of dollars per day if left unmanaged. This post covers the practical techniques that meaningfully reduce costs without sacrificing answer quality.
-
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.
-
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.