ragleap-graph · release notes
2026-09-12 · ragleap-graph-v0.8.0
ragleap-graph v0.8.0
[0.8.0]
Added
- Cross-chunk relation extraction (#154).
ExtractionConfig.cross_chunk_relations (default False) enables an opt-in second pass in upsert_document(): after all chunks are processed, one additional LLMRelationExtractor.extract() call runs over the full accumulated document text using every entity found across all chunks (not just the current chunk's local entities), recovering relations whose subject and object were established in different chunks - e.g. an entity introduced in chunk 1 referenced only by pronoun ("It", "the company") in a later chunk. Requires extract_relations=True.
LLMRelationExtractor.extract() gained an optional resolve_references parameter (default False, so ordinary per-chunk extraction is unchanged) that adds an explicit instruction asking the model to resolve pronouns/vague references to a known entity name. Only the new cross-chunk pass sets this to True.
- Cross-chunk relations feed the same
relation_counter used by the existing per-chunk pass, so no new Neo4j write path was needed - the existing RelationWeight aggregation, RELATES_AS MERGE, and max_pairs cutoff all apply unmodified.
Known limitation (documented, not hidden)
- Cross-chunk relation extraction quality is highly dependent on the LLM provider's reasoning capability. Live-verified working correctly with Gemini (
gemini-3.5-flash), which correctly resolved a pronoun reference across chunks to produce the right relation. Small local models were found, via live testing, to fail this specific task in a worse way than simply missing the relation: qwen2.5:0.5b produced a plausible-looking but factually wrong relation (incorrectly connecting two unrelated entities) rather than returning nothing. Anyone enabling cross_chunk_relations=True with a small local model should weigh this before trusting its output uncritically.
Verified
- Full offline suite: 88 passed, 15 skipped (previous baseline 87/15, one new test added) - zero regressions to existing per-chunk extraction behavior (
resolve_references defaults to False and the cross-chunk pass is gated entirely behind the new opt-in config flag).
- 1 new live end-to-end test (
test_cross_chunk_relation_recovers_relation_per_chunk_extraction_misses), gated on both live Neo4j credentials and a GEMINI_API_KEY (not Ollama, per the known-limitation note above): confirms cross_chunk_relations=True recovers a relation that per-chunk extraction alone cannot, and confirms cross_chunk_relations=False (the default) correctly does not recover it - proving the flag actually changes behavior rather than the test document being trivially easy regardless.
- Test document deliberately uses a pronoun ("It") rather than a repeated noun phrase ("the company") after an earlier version was found, via live diagnostic, to have the generic phrase extracted as its own separate entity - a real, documented pitfall for anyone writing similar test documents in the future.
Release notes mirrored from GitHub Releases.