evaluate-spring-ai
/evaluate-spring-ai
Sets up evaluation of Spring AI applications using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a Spring AI app, ChatClient, RAG pipeline, or advisor chain. Also use when the user mentions Spring AI evaluation, Spring Boot LLM testing, or integrating Dokimos with Spring AI projects.
- Author
- dokimos-dev ↗
- Repository
- dokimos ↗
- Licence
- MIT
- Last repository change
- 12.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Sets up evaluation of Spring AI applications using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a Spring AI app, ChatClient, RAG pipeline, or advisor chain. Also use when the user mentions Spring AI evaluation, Spring Boot LLM testing, or integrating Dokimos with Spring AI projects.
Original author description
Sets up evaluation of Spring AI applications using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a Spring AI app, ChatClient, RAG pipeline, or advisor chain. Also use when the user mentions Spring AI evaluation, Spring Boot LLM testing, or integrating Dokimos with Spring AI projects.
How it works
- Where things live
- Key utilities
- Evaluation patterns
- Dependencies
- Evaluating an agent, not just chat or RAG
- Steps
SKILL.md preview
---
name: evaluate-spring-ai
description: Sets up evaluation of Spring AI applications using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a Spring AI app, ChatClient, RAG pipeline, or advisor chain. Also use when the user mentions Spring AI evaluation, Spring Boot LLM testing, or integrating Dokimos with Spring AI projects.
---
# Evaluate Spring AI
Set up Dokimos evaluation for a Spring AI application. The user will describe their application and evaluation goals via `$ARGUMENTS`.
## Where things live
- **Spring AI support**: `dokimos-spring-ai/src/main/java/dev/dokimos/springai/SpringAiSupport.java`
- **Examples**: `dokimos-examples/src/main/java/dev/dokimos/examples/springai/`
- **Full Spring Boot example**: `dokimos-examples/src/main/java/dev/dokimos/examples/springai/tutorial/`
- **Maven dependency**: `dev.dokimos:dokimos-spring-ai`
Before writing code, read `SpringAiSupport.java` to understand the available utilities.
## Key utilities
`SpringAiSupport` provides:
- **`asJudge(ChatClient.Builder)`** — wraps a Spring AI `ChatClient.Builder` into a `JudgeLM`
- **`asJudge(ChatModel)`** — wraps a `ChatModel` directly into a `JudgeLM`
- **`toTestCase(EvaluationRequest)`** — converts Spring AI's `EvaluationRequest` to Dokimos `EvalTestCase`
- **`toEvaluationResponse(EvalResult)`** — converts Dokimos `EvalResult` back to Spring AI `EvaluationResponse`
## Evaluation patterns
### Simple ChatClient evaluation
```java
@SpringBootTest
class MyChatEvaluationTest {
@Autowired
private ChatClient.Builder chatClientBuilder;
@Test
void evaluateChatbot() {
ChatClient chatClient = chatClientBuilder.build();
Task task = example -> {
String response = chatClient.prompt()
.user(example.input())
.call()
.content();
return Map.of("output", response);
};
JudgeLM judge = SpringAiSupport.asJudge(chatClientBuilder);
ExperimentResult result = Experiment.builder()
.name("Chatbot Evaluation")
.dataset(Dataset.fromJson(Path.of("src/test/resources/datasets/qa.json")))
.task(task)
.evaluator(LLMJudgeEvaluator.builder()
.name("answer-quality")
.judge(judge)
.criteria("Is the response helpful and accurate?")
.evaluationParams(List.of(
EvalTestCaseParam.INPUT,
EvalTestCaseParam.ACTUAL_OUTPUT,
EvalTestCaseParam.EXPECTED_OUTPUT))
.threshold(0.7)
.build())
.build()
.run();
}
}
```
### RAG evaluation with advisors
```java
Task task = example -> {
String input = example.input();
ChatClient.ChatClientRequestSpec request = chatClient.prompt().user(input);
request.advisors(new QuestionAnswerAdvisor(vectorStore));
String response = request.call().content();
List<Document> docs = vectorStore.similaritySearch(input);
List<String> context = docs.stream().map(Document::getText).toList();
return Map.of("output", response, "context", context);
};
```
### Converting between Spring AI and Dokimos types
```java
EvaluationRequest request = new EvaluationRequest(userText, documents, responseContent);
EvalTestCase testCase = SpringAiSupport.toTestCase(request);
EvalResult result = evaluator.evaluate(testCase);
EvaluationResponse response = SpringAiSupport.toEvaluationResponse(result);
```
## Dependencies
```xml
<dependency>
<groupId>dev.dokimos</groupId>
<artifactId>dokimos-spring-ai</artifactId>
<version>${dokimos.version}</version>
</dependency>
```
Spring AI itself is a provided-scope dependency — the user must bring their own version.
## Evaluating an agent, not just chat or RAG
If the Spring AI app calls tools, evaluate its tool calls with the agent evaluators. An `AssistantMessage` carries the tool calls the model made; the results come back in the `ToolResponseMessage`s. `SpringAiSupport.toAgentTrace(assistantMessage, toolResponseMessages)` builds an `AgentTrace` (results matched to calls by tool-call id), and `toToolDefinitions(defs)` converts the tool definitions.
```java
AgentTrace trace = SpringAiSupport.toAgentTrace(assistantMessage, toolResponseMessages);
List<ToolDefinition> tools = SpringAiSupport.toToolDefinitions(toolDefinitions);
EvalTestCase testCase = trace.toTestCase(userMessage, tools);
var validity = ToolCallValidityEvaluator.builder().build().evaluate(testCase);
```
For the full agent evaluator set, use the `evaluate-agent` skill.
## Steps
1. Understand from `$ARGUMENTS` what the Spring AI application does
2. Determine if it's a simple ChatClient app or uses RAG advisors
3. Choose appropriate evaluators for the use case
4. Create a dataset matching the application's domain
5. Wire evaluation using `SpringAiSupport` utilities
6. For Spring Boot apps, set up tests with `@SpringBootTest`
Versions
The database has no other skills named evaluate-spring-ai.
Database snapshot: 13.11.2026 · package version 0a8522075612 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100evaluate-langchain4j
Sets up evaluation of LangChain4j applications and RAG pipelines using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a LangChain4j app, RAG pipeline, or AI service. Also use when the user mentions LangChain4j evaluation, RAG testing, retrieval… - 100evaluate-koog
Sets up evaluation of Koog AI agents using Dokimos. Use this skill when the user wants to evaluate, test, or benchmark a Koog agent, or integrate Koog with Dokimos evaluations. Also use when the user mentions Koog agents, AI agent evaluation, or agent testing with Dokimos. - 100spring-ai
Spring AI for integrating AI/ML models (OpenAI, Azure, Ollama, etc.) into Spring applications. Covers ChatClient, embeddings, RAG, vector stores, and function calling. USE WHEN: user mentions "spring ai", "ChatClient", "LLM integration Spring", "RAG Spring", "embeddings Java",… - 100spring-boot-helper
Expert knowledge of Spring Boot 4 and Spring AI 2.0 including auto-configuration, ChatClient, advisors, tool calling, agent patterns, and Spring Framework 7 features. Use when the user asks about Spring Boot, Spring AI, dependency injection, REST APIs, agent configuration, or… - 100langchain4j-spring-boot-integration
Provides integration patterns for LangChain4j with Spring Boot. Configures AI model beans, sets up chat memory with Spring context, integrates RAG pipelines with Spring Data, and handles auto-configuration, dependency injection, and Spring ecosystem integration. Use when… - 100spring-boot-testing
Write unit, integration, and slice tests for Spring Boot 3 applications. Use when writing unit tests, integration tests, or slice tests for Spring Boot 3 applications.