Generative AI with Spring

@Service
public class SpringAI {

private final ChatClient chatClient;

public SpringAI(ChatClient.Builder builder) {
this.chatClient = builder.build();
}

public String tellMeAJoke()
return chatClient.prompt().user("Tell me a joke").call().content());
}

}

Tool Calling

Model Context Protocol (MCP)

Retrieval Augmented Generation

Spring AI supported patterns

ChallengesPatterns
Align responses to goalsSystem prompt
No structured outputOutput converters
Not trained on your dataPrompt Stuffing
Limited Context SizeRAG
Stateless APIsChat memory
Not aware of your APIsFunction calling
HallucinationsEvaluators

Integration with common technologies

Ready to get started?

TRY OUR QUICKSTART GUIDE

More resources

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all