feat: map-nav checklist retrieval as default agentic path - #253
Merged
Merged
Conversation
- Reorganized the retrieval flowchart to enhance clarity and structure. - Introduced new retrieval modes: classic top-K and map-nav, with clear descriptions for each. - Updated the `use_agentic` parameter to default to map-nav, simplifying user experience. - Removed legacy agentic components and related tests to streamline the codebase. - Adjusted documentation to reflect changes in retrieval modes and internal structures.
Classic path/content channels loaded the full scoped corpus into Python before BM25. Prefetch via simple FTS (server-side OR tsquery), apply section exclusions before the candidate LIMIT, and fall back to a full scan when FTS matches nothing so recall does not regress. Combines the approaches from #244 and #251; closes #195. Co-authored-by: Ray Tien <ray.tien0907@gmail.com> Co-authored-by: nuemaan <anonnumaan@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Bring in Postgres FTS-bounded classic BM25 candidates (PR #252, CI green). Resolve .env.example for map-nav defaults plus FTS candidate limit note. Co-authored-by: Cursor <cursoragent@cursor.com>
Comment on lines
+233
to
+234
| 'Batch: {"action_id":"C1","ids":["C1","C3"],' | ||
| '"confidence":{"C1":0.7,"C3":0.9},"reason":"..."}', |
Comment on lines
+195
to
+198
| " - collect=C*: add each selected section to evidence. A parent section " | ||
| "hydrates its full subtree; a leaf adds only that section. " | ||
| "For every selected collect id, provide confidence in [0,1] " | ||
| "(object map keyed by action id, or a single scalar for one id).", |
|
|
||
| def content(self, section_id: str) -> str: | ||
| """Full text for this node's subtree, as one evidence unit.""" | ||
| ... |
|
|
||
| def relations(self, section_id: str) -> Tuple[Set[str], Set[str]]: | ||
| """(ancestor_ids, descendant_ids); section_id itself excluded from both.""" | ||
| ... |
| result = json.loads(fence_match.group(1).strip()) | ||
| if isinstance(result, list): | ||
| return [str(item) for item in result if str(item) in valid_ids] | ||
| except (ValueError, json.JSONDecodeError): |
| result = json.loads(text) | ||
| if isinstance(result, list): | ||
| return [str(item) for item in result if str(item) in valid_ids] | ||
| except (ValueError, json.JSONDecodeError): |
|
|
||
|
|
||
| # Back-compat name used by older tests; prefer _mark_collected_branch. | ||
| _update_collect_coverage = _mark_collected_branch |
|
|
||
| # Back-compat aliases for tests / callers. | ||
| _evidence_owner_section_id = evidence_owner_section_id | ||
| _unit_score_for_evidence_chunk = unit_score_for_evidence_chunk |
Exclude vendored nav/ from pyright, tighten mapnav plan typing, and force demo contract retrieval onto classic so CI does not hit a live LLM. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep map-nav default retrieval docs; retain BM25 FTS candidate limit note. Co-authored-by: Cursor <cursoragent@cursor.com>
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
PLANNER + HARVEST + CONTROL) as the default whenuse_agenticis unset/true;use_agentic=falsekeeps classic 3-channel top-K.nav_config.build_nav_config()(deepseek-v4-flash, thinking on, trim packing, BM25 illumination).Test plan
Notes
main/prod until this PR merges.Made with Cursor