{"id":48680833,"url":"https://github.com/explore-de/rage4j","last_synced_at":"2026-05-29T21:00:54.153Z","repository":{"id":271578739,"uuid":"905151621","full_name":"explore-de/rage4j","owner":"explore-de","description":"Evaluate your LLM based Java Apps","archived":false,"fork":false,"pushed_at":"2026-05-09T16:42:42.000Z","size":4545,"stargazers_count":12,"open_issues_count":20,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-09T18:31:22.941Z","etag":null,"topics":["ai","evaluation","java","junit","langchain4j","llm","testing"],"latest_commit_sha":null,"homepage":"https://explore-de.github.io/rage4j/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/explore-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-18T09:07:39.000Z","updated_at":"2026-05-05T11:55:43.000Z","dependencies_parsed_at":"2025-01-08T16:48:11.650Z","dependency_job_id":"c3af3176-c1fb-4851-b90d-7d3569c9ba06","html_url":"https://github.com/explore-de/rage4j","commit_stats":null,"previous_names":["explore-de/rage4j"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/explore-de/rage4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explore-de%2Frage4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explore-de%2Frage4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explore-de%2Frage4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explore-de%2Frage4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explore-de","download_url":"https://codeload.github.com/explore-de/rage4j/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explore-de%2Frage4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","evaluation","java","junit","langchain4j","llm","testing"],"created_at":"2026-04-11T01:00:36.068Z","updated_at":"2026-05-29T21:00:54.147Z","avatar_url":"https://github.com/explore-de.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["LLM框架"],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=explore-de_rage4j\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=explore-de_rage4j)\n[![Docusaurus Build And Deploy](https://github.com/explore-de/rage4j/actions/workflows/docusaurus.yml/badge.svg)](https://github.com/explore-de/rage4j/actions/workflows/docusaurus.yml)\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"docusaurus/static/img/rage4j.png\" alt=\"rage4j\" width=\"450\" height=\"450\"\u003e\n\u003c/div\u003e\n\n# Rage4J\n\nRAG Evaluation library for Java.\n\n## Overview\n\nRage4J provides tools to evaluate and measure the quality of language model outputs using various metrics like correctness, relevance, faithfulness, and semantic similarity. It integrates with LangChain4j and supports fluent test assertions for RAG pipelines.\n\n**Modules:**\n- **rage4j** - Core evaluation library with evaluators and model classes\n- **rage4j-assert** - Fluent assertion library for RAG evaluation in tests\n- **rage4j-persist** - Persistence module for saving evaluation results (JSONL format)\n- **rage4j-persist-junit5** - JUnit 5 extension for automatic persistence lifecycle\n\n## Installation\n\nAdd the dependency to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.rage4j\u003c/groupId\u003e\n    \u003cartifactId\u003erage4j\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.1-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor fluent test assertions:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.rage4j\u003c/groupId\u003e\n    \u003cartifactId\u003erage4j-assert\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.1-SNAPSHOT\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\n### Core Evaluation\n\n```java\nSample sample = Sample.builder()\n    .withQuestion(\"What is the capital of France?\")\n    .withAnswer(\"Paris is the capital of France.\")\n    .withGroundTruth(\"Paris\")\n    .build();\n\nEvaluator evaluator = new AnswerCorrectnessEvaluator(chatModel);\nEvaluation result = evaluator.evaluate(sample);\nSystem.out.println(result.getName() + \": \" + result.getValue());\n```\n\n### Fluent Assertions\n\n```java\nRageAssert rageAssert = new OpenAiLLMBuilder().fromApiKey(apiKey);\n\nrageAssert.given()\n    .question(\"What is the capital of France?\")\n    .groundTruth(\"Paris\")\n    .context(\"Paris is the capital of France.\")\n    .when()\n    .answer(\"Paris is the capital of France.\")\n    .then()\n    .assertFaithfulness(0.7)\n    .then()\n    .assertAnswerCorrectness(0.8);\n```\n\n## Documentation\n\nVisit our documentation on Github Pages: \u003ca href=\"https://explore-de.github.io/rage4j/\" target=\"_blank\"\u003eVisit Docs\u003c/a\u003e\n\n## Requirements\n\n- Java 21\n- Maven (wrapper included: `./mvnw`)\n\nFor development, use the code formatter (`./mvnw formatter:format`) and install the EditorConfig extension (IntelliJ has built-in support).\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ris5266\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/86254687?v=4?s=100\" width=\"100px;\" alt=\"richard\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003erichard\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-ris5266\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://social.mymiggi.de/@miggi\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/70092362?v=4?s=100\" width=\"100px;\" alt=\"Michael Hainz\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMichael Hainz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-MiggiV2\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/vladislavkn\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/51641565?v=4?s=100\" width=\"100px;\" alt=\"Vladislav Knyshov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVladislav Knyshov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-vladislavkn\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://explore.de\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/545499?v=4?s=100\" width=\"100px;\" alt=\"Markus Herhoffer\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMarkus Herhoffer\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#projectManagement-d135-1r43\" title=\"Project Management\"\u003e📆\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/babyygemperor\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/25747019?v=4?s=100\" width=\"100px;\" alt=\"Aamin Gem\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAamin Gem\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-babyygemperor\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/vvilip\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/115623345?v=4?s=100\" width=\"100px;\" alt=\"DrBilip\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDrBilip\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-vvilip\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Andy1734\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/94300201?v=4?s=100\" width=\"100px;\" alt=\"Andreas Dinauer\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndreas Dinauer\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-Andy1734\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/kmscheuer\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3342781?v=4?s=100\" width=\"100px;\" alt=\"Klaus-Martin Fink\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKlaus-Martin Fink\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-kmscheuer\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/andresCh01\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/196327563?v=4?s=100\" width=\"100px;\" alt=\"andresCh01\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eandresCh01\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-andresCh01\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Ainges\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/81434615?v=4?s=100\" width=\"100px;\" alt=\"Hubertus Seitz\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHubertus Seitz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-Ainges\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplore-de%2Frage4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplore-de%2Frage4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplore-de%2Frage4j/lists"}