OPEN SOURCE · MULTIMODAL RAG
Cutting multimodal ingestion calls without silently changing graph semantics.
In HKUDS/RAG-Anything PR #453, I reduced model-call amplification during multimodal document ingestion and worked through maintainer review to protect source resolution, deletion, and failure recovery. The result is an opt-in efficiency path, not a hidden change to default behavior.
- ROLE
- Design, implementation, regression coverage, benchmark, maintainer iteration
- TECHNOLOGIES
- PythonLightRAGMultimodal RAGpytestRuff
The problem was amplification, not just latency
Legacy multimodal ingestion could repeatedly send related content through extraction and embedding calls. Packed extraction groups eligible modal items to reduce that amplification while leaving legacy, per-item, and skip behaviors explicit.
On the public synthetic image-and-two-table fixture, legacy used 65 embedding calls and six text-model calls; packed used 21 and four respectively. Vision-model use remained one call.
Review exposed a deeper graph-lifecycle issue
An initial reviewer reproduction found that pack IDs used for graph extraction were not consistently resolvable to registered source chunks. That affected graph retrieval and document cleanup, beyond what a call-count benchmark could reveal.
The revision registered packs before extraction, preserved resolvable source IDs through public insertion and deletion, covered failed-batch fallback with real LightRAG stores, and kept legacy extraction as the default.
An upstream change with receipts
The final PR passed 1,283 tests, Ruff 0.6.4 checks, and Python 3.10–3.12 CI. Live Qwen3-VL and Qwen embedding smoke checks covered insertion, query, public deletion, and all four modes.
The maintainer moved from requesting changes to approving the revised PR, which merged on 12 November 2026. The documentation explicitly records packed-mode retrieval and belongs_to trade-offs.
Benchmark scope
The call-count figures come from one synthetic functional fixture, not a retrieval-quality benchmark. Packed mode is opt-in; representative data should be evaluated before enabling it because it omits belongs_to relations and adds retrieval candidates.