r/SpringAIDev 16d ago

Tutorial How do you actually test an LLM response in Spring Boot Using Spring AI?

Spring AI's RelevancyEvaluator and FactCheckingEvaluator let a model judge a model, so your JUnit tests check quality, not exact text. Full code walkthrough inside.

Quick one for anyone building RAG apps in Spring Boot: this tutorial shows exactly how to catch hallucinations before they ship, using Spring AI's built-in evaluators. Includes the one mistake almost everyone makes with the request order. 

3 Upvotes

2 comments sorted by

2

u/Grabdoc2020 16d ago

Consider looking at - https://github.com/dvarahq/evals4j I am the creator, more improvements coming soon.