feat(retrieval): default to agent explore and retire map-nav - #395
Merged
Merged
Conversation
Added constants for body chunk types that can own Root-parked assets in the serving manifest and navigation modules. Updated relevant logic to utilize these constants for improved clarity and maintainability. Enhanced documentation in the CORPUS_SCHEMA to reflect the ownership rules of body chunks.
Updated the README to reflect the new Knowhere 2.0 branding. Enhanced the retrieval server by integrating corpus tools for improved functionality and backward compatibility. Introduced a character budget for evidence text across various tools, ensuring consistent output limits. Refactored agent tools to utilize shared snippet building logic, improving code maintainability and reducing duplication. Added support for a new agentic routing mechanism to facilitate exploration through the agent_explore path.
Enhanced the agent exploration logic by implementing a two-phase fix for stale tool-message collapsing, ensuring efficient message management across turns. Introduced a fallback mechanism for trajectory references, allowing the system to utilize previously read content when no current references are available. Updated documentation to clarify the requirements for `refs` when calling `{FINISH_TOOL_NAME}` and refined the handling of tool messages to prevent unnecessary resends, optimizing performance and clarity in the exploration process.
Added support for the Cursor SDK as an alternative harness for agent exploration. Introduced a new optional dependency, `cursor-sdk`, and updated the agent exploration logic to allow switching between OpenAI-compatible and Cursor SDK providers. Enhanced the `debug_agent_explore_episode` script to accept a `--harness` argument for selecting the desired harness. Updated relevant documentation and configuration to reflect these changes, ensuring clarity on the new harness integration.
…ath resolution Updated the agent exploration logic to include a budget status line in tool observations, allowing the model to self-regulate based on remaining budget. Improved section path resolution by integrating a new method for handling ambiguous paths and ensuring accurate references during retrieval. Enhanced documentation to clarify the behavior of the `read` tool regarding section paths and added notes for better guidance on recall tool usage.
Archive map-nav out of the live path, keep shared scoring for classic BM25 and corpus.recall, drop the FTS fallback and unused chunk tsvector columns, and use cursor_sdk unless use_agentic is false. Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines
+209
to
+210
| "- ``kw hit`` = expected keywords found in ``evidence_text`` " | ||
| "(proxy for recall quality, not a full answer judge).\n", |
Comment on lines
+211
to
+212
| "- Phase 0 ad-hoc queries are separate; this set is the 8 questions " | ||
| "from ``zh_档案知识库测试样例.docx``.\n", |
| ] | ||
|
|
||
| steps: list[AgentStep] = [] | ||
| stop_reason = "finished" |
| from sqlalchemy.ext.asyncio import AsyncSession | ||
|
|
||
| from shared.services.retrieval.agent_tools import REGISTRY, ToolContext, ToolSpec | ||
| from shared.services.retrieval.agent_tools import tools as _agent_tools_registered # noqa: F401 |
| so concurrent tool calls (a real Cursor SDK behavior, not just a | ||
| theoretical one — see ``harness/cursor_harness.py``) are always safe. | ||
| """ | ||
| ... |
| ToolResult, | ||
| load_corpus_schema_text, | ||
| ) | ||
| from shared.services.retrieval.agent_tools import tools as _agent_tools_registered # noqa: F401 |
| ) | ||
| from shared.services.retrieval.agent_explore.types import AgentStep, EpisodeResult | ||
| from shared.services.retrieval.agent_tools import REGISTRY, ToolBudget, load_corpus_schema_text | ||
| from shared.services.retrieval.agent_tools import tools as _agent_tools_registered # noqa: F401 |
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification