Skip to content

fix: surface local LightRAG provenance - #754

Open
zrh805 wants to merge 1 commit into
HKUDS:devfrom
zrh805:codex/lightrag-provenance
Open

fix: surface local LightRAG provenance#754
zrh805 wants to merge 1 commit into
HKUDS:devfrom
zrh805:codex/lightrag-provenance

Conversation

@zrh805

@zrh805 zrh805 commented Aug 2, 2026

Copy link
Copy Markdown

Fixes #694

Local LightRAG queries returned the synthesized answer but discarded the structured retrieval data that LightRAG already exposes through aquery_data(). This forwards stable chunk, entity, relationship, and file-reference metadata into the existing RAG source event.

The answer continues through RAGAnything.aquery() so the current VLM-enhanced response behavior is preserved. When an older LightRAG installation lacks aquery_data() or provenance lookup fails, the answer still succeeds and DeepTutor keeps the existing query-echo fallback.

Tests:

  • uv run pytest tests/services/rag/test_lightrag_pipeline.py -q
  • uv run pytest tests/core/test_builtin_tools.py -q
  • uv run pre-commit run --files deeptutor/services/rag/pipelines/lightrag/engine.py deeptutor/services/rag/pipelines/lightrag/pipeline.py tests/services/rag/test_lightrag_pipeline.py

AI assistance: Codex assisted with implementing and testing this focused change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant