CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/quarkus-langchain4j

Build Quarkus applications with LangChain4j extensions - project setup, CDI services, REST endpoints, MCP, agentic, and dev mode

91

1.71x
Quality

90%

Does it follow best practices?

Impact

96%

1.71x

Average score across 3 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-1/

{
  "context": "Tests whether the agent correctly sets up a Quarkus LangChain4j project using the BOM, correct groupId, proper CDI scopes, @RegisterAiService on an interface, Jakarta REST annotations, and application.properties configuration for the model provider.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BOM version",
      "description": "pom.xml includes quarkus-langchain4j-bom in <dependencyManagement> with version 1.8.4",
      "max_score": 10
    },
    {
      "name": "Correct groupId",
      "description": "All quarkus-langchain4j extension artifacts use groupId io.quarkiverse.langchain4j",
      "max_score": 10
    },
    {
      "name": "REST extensions",
      "description": "Both quarkus-rest AND quarkus-rest-jackson extensions are present (as dependencies or quarkus extension declarations)",
      "max_score": 10
    },
    {
      "name": "AI service is interface",
      "description": "@RegisterAiService is applied to a Java interface, not a class",
      "max_score": 15
    },
    {
      "name": "Correct import for @RegisterAiService",
      "description": "@RegisterAiService is imported from io.quarkiverse.langchain4j.RegisterAiService",
      "max_score": 5
    },
    {
      "name": "@SystemMessage annotation",
      "description": "The AI service interface method is annotated with @SystemMessage containing a customer-support persona prompt",
      "max_score": 10
    },
    {
      "name": "@UserMessage annotation",
      "description": "The AI service interface method has a parameter annotated with @UserMessage",
      "max_score": 10
    },
    {
      "name": "CDI scope on REST resource",
      "description": "The REST resource class is annotated with a CDI scope annotation (@ApplicationScoped, @RequestScoped, or @Singleton)",
      "max_score": 5
    },
    {
      "name": "Inject AI service",
      "description": "The REST resource uses @Inject to inject the AI service — does NOT instantiate it manually (e.g. no `new ...`)",
      "max_score": 5
    },
    {
      "name": "Jakarta REST annotations",
      "description": "REST resource uses jakarta.ws.rs.* annotations (e.g. @Path, @POST) — NOT javax.ws.rs.* or Spring annotations",
      "max_score": 10
    },
    {
      "name": "application.properties API key",
      "description": "application.properties sets quarkus.langchain4j.anthropic.api-key referencing an environment variable (e.g. ${ANTHROPIC_API_KEY})",
      "max_score": 10
    }
  ]
}

evals

scenario-1

criteria.json

task.md

tile.json