mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 10:00:19 +08:00
The `rag` tool reported a single source that was just an echo of its own query, while `result["sources"]` — the chunks / entities / reports each pipeline already normalises into DeepTutor's citation shape — was dropped on the floor. Grounded answers therefore carried no traceable provenance, unlike web_search / web_fetch / arxiv. Forward the retrieval's own sources, keeping `type`/`kb_name` on every entry for existing consumers, and fall back to the query echo only when an engine surfaces nothing. Note the local LightRAG pipeline still returns `sources: []` (it keeps only the synthesised answer from `engine.query`), so #694 stays open for that engine; GraphRAG and the LightRAG-server pipeline cite properly now.