Tag: spring-ai
All the articles with the tag "spring-ai".
-
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.
-
What is an AI agent? Moving beyond single LLM calls
A single LLM call answers a question. An AI agent reasons, decides which tools to use, calls them, observes results, and loops until the task is complete. This post explains the concept clearly and when you actually need an agent vs a simpler approach.