Find the latest version on Maven Central.
Maven:
<dependency>
<groupId>com.judgmentlabs</groupId>
<artifactId>judgeval-java</artifactId>
<version>LATEST_VERSION</version>
</dependency>Gradle:
implementation 'com.judgmentlabs:judgeval-java:LATEST_VERSION'Judgeval client = Judgeval.builder()
.apiKey(System.getenv("JUDGMENT_API_KEY"))
.organizationId(System.getenv("JUDGMENT_ORG_ID"))
.build();
Tracer tracer = client.tracer()
.create()
.projectName("my-project")
.build();
tracer.span("operation", () -> {
// your code here
});BaseScorer scorer = client.scorers()
.builtIn()
.answerCorrectness()
.threshold(0.8)
.build();
Example example = Example.builder()
.property("input", "What is 2+2?")
.property("actual_output", "4")
.property("expected_output", "4")
.build();
tracer.asyncEvaluate(scorer, example);Apache 2.0