feat(kb): DocIndexerService.search() merges autobot_docs into RAGService (#4953)#4957
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 17, 2026
Merged
feat(kb): DocIndexerService.search() merges autobot_docs into RAGService (#4953)#4957mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
…ervice results (#4953) - Add DocIndexerService.search() — embeds query via Ollama, queries autobot_docs ChromaDB collection, returns SearchResult objects (score = 1 - cosine_distance) - Extend RAGService.advanced_search() to call doc_indexer.search() and merge results by hybrid_score when categories=None or "autobot_docs" is requested - Doc results flow through _filter_stale_chunks like all other results - 5 new tests cover: not-initialised, empty collection, happy path, n_results capping, and query exception handling
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
DocIndexerService.search(query, n_results)— embeds query with Ollamanomic-embed-text, queries theautobot_docsChromaDB collection, returnsSearchResultobjects (score = 1 − cosine distance)RAGService.advanced_search()to calldoc_svc.search()and merge results byhybrid_scorewhencategories=Noneor"autobot_docs"is in the requested categoriesmax_resultsafter merging and flow through_filter_stale_chunksidentically to main-KB resultssource_pathis set frommetadata["file_path"]so the stale-chunk filter resolves correctly against the DocIndexer hash cacheTest plan
test_doc_indexer.py::TestDocIndexerSearch: not-initialised guard, empty-collection guard, happy-path SearchResult fields, n_results capping, query-exception fallbacktest_doc_indexer.pypasspy_compileclean on both modified filesCloses #4953