Skip to content

feat: map-nav checklist retrieval as default agentic path - #253

Merged
EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/mapnav-checklist-retrieval
Aug 11, 2026
Merged

EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/mapnav-checklist-retrieval

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Replace legacy agentic/workflow retrieval with vendored checklist map-nav (PLANNER + HARVEST + CONTROL) as the default when use_agentic is unset/true; use_agentic=false keeps classic 3-channel top-K.
  • Include Postgres FTS-bounded classic BM25 prefilter from perf: bound classic BM25 candidates with Postgres FTS #252 so classic path stays current with mainline perf work.
  • Production config is code-authored via nav_config.build_nav_config() (deepseek-v4-flash, thinking on, trim packing, BM25 illumination).

Test plan

  • Focused unit tests: nav bridge/snapshot/trace + BM25 FTS channel tests (20 passed locally)
  • PR CI (Lint / Typecheck / Test / CodeQL)
  • Contract retrieval tests on CI postgres
  • Confirm perf: bound classic BM25 candidates with Postgres FTS #252 disposition after this lands (this branch already contains that commit; avoid double-merge)

Notes

  • Not on main/prod until this PR merges.
  • Open WIP cleanup (projection summary fallback / dead llm_adapter / env authority) remains local stash and is not in this PR yet.

Made with Cursor

EricNGOntos and others added 3 commits August 11, 2026 14:40
- 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
Comment thread packages/shared-python/shared/services/retrieval/nav/nav_agent.py Fixed
EricNGOntos and others added 2 commits August 11, 2026 15:31
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>
@EricNGOntos
EricNGOntos merged commit f763008 into main Aug 11, 2026
5 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/mapnav-checklist-retrieval branch August 11, 2026 07:34
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.

2 participants