feat(search): add search_from functionality and ToC-based navigation#27
Merged
feat(search): add search_from functionality and ToC-based navigation#27
Conversation
Contributor
zTgx
commented
Apr 8, 2026
- Introduce search_from method to SearchTree trait allowing searches to start from specific nodes instead of root
- Implement core search logic refactoring in BeamSearch and GreedySearch to support parameterized start nodes via search_impl method
- Add ToCNavigator module for hierarchical subtree location
- Update SearchStage to use ToC-based location followed by tree traversal from located subtrees
- Replace LLM-first direct TOC search with structured ToC navigation
- Remove debug println statements and replace with proper logging
- Refactor search execution to handle both single and decomposed queries
- Add SearchCue type for representing located subtrees with confidence
- Introduce search_from method to SearchTree trait allowing searches to start from specific nodes instead of root - Implement core search logic refactoring in BeamSearch and GreedySearch to support parameterized start nodes via search_impl method - Add ToCNavigator module for hierarchical subtree location - Update SearchStage to use ToC-based location followed by tree traversal from located subtrees - Replace LLM-first direct TOC search with structured ToC navigation - Remove debug println statements and replace with proper logging - Refactor search execution to handle both single and decomposed queries - Add SearchCue type for representing located subtrees with confidence
…lback logic - Rename level_0_nodes top_level_nodes for clarity - Simplify BM25 scoring phase description in docs - Split document imports for better organization - Add fallback mechanism when no branches pass threshold - Improve LLM refinement by collecting tree entries directly - Add depth control for tree traversal in LLM refinement - Remove unused TocView dependency fix(retrieval): enhance search stage with candidate restoration - Use depth-1 nodes instead of level-0 for top-level sections - Restore cue root nodes as direct candidates during traversal - Add sorting and deduplication for search candidates - Improve debugging output for search iterations
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.