Target architecture for Java Ragas using Spring Boot and Maven multi-module builds.
- Hexagonal boundaries:
api->application->domain->infra. - No framework types in
domain. - All model providers implemented behind interfaces.
- Deterministic contracts before optimization.
jragas: dependency and plugin management.ragas-domain: domain model and contracts.ragas-core: orchestration, validation, execution pipeline.ragas-metrics: metric interfaces and metric implementations.ragas-llm-adapters: provider adapters.ragas-embedding-adapters: embedding providers.ragas-integrations: external integration adapters.ragas-api: Spring Boot REST surface.ragas-cli: CLI surface.ragas-e2e-tests: parity and end-to-end contracts.
ragas-domaindepends on nothing internal.ragas-corecan depend onragas-domainonly.ragas-metricscan depend onragas-coreandragas-domain.ragas-apidepends onragas-coreand adapter modules.- adapters cannot depend on API.
- API receives evaluation request.
- Validation normalizes request into domain model.
- Orchestrator executes per-row metric evaluations.
- Metric engines call LLM/embedding interfaces.
- Aggregation returns run-level and row-level results.
- Initial behavior must mirror current Python evidence in
src/ragas. - Unknown deployment topology and DB schema remain open design items.