knowhere icon indicating copy to clipboard operation
knowhere copied to clipboard

Agentic retrieval misses relevant evidence when KG document selection has incomplete coverage

Open EricNGOntos opened this issue 5 months ago • 0 comments

Problem

When a user queries their knowledge base, the agentic retrieval engine sometimes returns empty evidence — even when the underlying keyword search (bottom discovery) has already found highly relevant chunks in certain documents. This happens because the Knowledge Graph (KG) document selection step does not always pick up those documents for full navigation.

User Impact

  • Empty results on valid queries: Users see 'no evidence found' for queries where the system clearly has matching content in the corpus.
  • Inconsistent quality: The same query might work if the matching content is in a document that KG selects, but fail if it is in a document that KG overlooks. This is confusing and erodes user trust.
  • Wasted ingestion effort: Users who have carefully uploaded documents expect comprehensive results. Missing documents in the retrieval path feels like a product defect.

Expected Behavior

When the navigation phase produces zero evidence, the system should check whether bottom discovery found keyword matches in documents that were never navigated. If so, it should use those discovery hints as a fallback — selecting relevant sections from the unnavigated documents and merging them into the evidence tree.

Additional Improvements Needed

  1. Budget awareness in prompts: The LLM navigator sometimes over-explores when the token budget is nearly exhausted, because it sees the budget state from before the current call. The budget snapshot shown to the LLM should be pre-adjusted to reflect the cost of the current call.
  2. VLM image prompting: The image description model configuration should be updated to use more capable models (e.g. qwen2.5-vl-72b-instruct) for higher quality image understanding.
  3. Model-specific prompt formatting: The prompt service should adapt its system prompt formatting based on the model provider (e.g. DeepSeek vs Qwen), since different models have different optimal prompt structures.
  4. Dead code cleanup: Legacy topic_hints parameters and associated database queries should be removed from the navigation tools to reduce unnecessary DB load.

Environment

  • Knowhere API (agentic retrieval mode)
  • Affects all users with multi-document knowledge bases

EricNGOntos avatar Jun 04 '26 15:06 EricNGOntos