ragleap-graph (Java port)
version 0.4.0 · Java 21
A Java port of the ragleap-graph Neo4j graph index for JVM teams. Regex entity extraction is the default, with optional LLM extraction and entity deduplication, document upsert, relation, lineage and entity queries, and hybrid or graph-only retrieval, all over the Neo4j HTTP Query API with no Bolt driver. Not ported yet: the Postgres audit writer.
<dependency> <groupId>io.github.antonyrag</groupId> <artifactId>ragleap-graph</artifactId> <version>0.4.0</version> </dependency>
Highlights
- Entity-name normalization, regex entity extraction (the default) and composite keys, with Python-compatible string handling
- Optional LLM extraction of entities and relations through a small
LlmClientinterface andExtractionConfig(regex or llm, entity types, relation ontology, cross-chunk relations, deduplication) - Entity deduplication (
EntityDeduplicator), with a port of Python's difflib similarity GraphIndex.upsertDocumentwith the full write path (retries, old-relation cleanup, an optional audit hook), typed relation counts, the cross-chunk pass and near-duplicate entity merging when configured- Queries:
findDocumentsByEntities,documentEntities,searchRelatedEntities,findRelations,findLineageandfindEntitiesByType GraphRetriever: hybrid (vector plus graph) or graph-only retrieval with chunk and graph-path citationsPostgresAuditSink(new in 0.3.0), the port of the Python audit logger: pass it to aGraphIndexconstructor; it uses a libpq-style connection url and any PostgreSQL JDBC driver you add to your own project (the driver is not a dependency of this jar), and it never throws fromlog(). The default stays a no-op sink- Optional adapters over ragleap-rag (
RagLeapGenerationClient,RagLeapVectorSearch), one-time backfills and a schema migration runner
Not live-verified
- LLM extraction against any real model provider (no paid keys): tested with scripted model answers and a local fake OpenAI-style server only
- Any Neo4j other than 5.26.29 Community, on a single server (bookmarks are not passed along)
RagLeapVectorSearch.of(RagLeap)was not run against a live ragleap-rag facade- The audit writer in CI:
PostgresAuditSinkwas tested against a real PostgreSQL (a pgvector/pg16 test database) on the maintainer machine, and CI runs only the offline tests
Not ported yet
- No further parts of the Python package are known to be missing. The Postgres audit writer (
PostgresAuditSink) was ported in 0.3.0
Tech stack
Requires Java 21. The only required runtime dependency is jackson-databind; ragleap-rag is optional and only needed for the two adapters.
Testing
196 @Test and @ParameterizedTest methods across 43 test files, counted directly from the repo (the main branch, which may be ahead of the 0.3.0 release). The 0.3.0 release build ran 142 tests with 0 failures and 34 skipped, and a full local run with fixtures, a live Neo4j 5.26 test container and a real PostgreSQL test database ran 142 tests with 0 failures and 0 skipped. The published 0.3.0 jar was smoke-tested from Maven Central in a clean project. For 0.2.0 the release build ran 129 tests with 0 failures and 31 skipped: the parity tests need Python-generated fixtures and the live tests need a Neo4j server, so both skip in a plain build and in CI. A full local run with fixtures and a live Neo4j 5.26.29 Community ran 129 tests with 0 failures and 0 skipped. After the 0.2.0 release, the published jar was resolved from Maven Central in a clean project and exercised against a live Neo4j: health check, upsert, backfill and graph-only retrieval.