You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(search): NPU semantic search mixes three embedding spaces (384 hybrid, 512 accelerator, 768 active) and swallows dimension mismatches as empty results #18217
autobot-backend/npu_semantic_search.py works in three embedding spaces at once:
384-d: the hybrid FAISS index is hard-coded embedding_dim=384 (~:277).
512-d: the Chroma text, image, audio and multimodal collections are written by store_multimodal_embedding (:1219) through accelerated_embedding_generation, a MiniLM output projected by an untrained text_projection into a 512-d "unified space" (ai_hardware_accelerator.py). cross_modal_search (:1516) queries in 512-d.
768-d: the active knowledge-base model (nomic-embed-text, via autobot_shared/embedding_model.active_embedding_model()) produces the knowledge base's stored vectors and the NPU primary path.
A query in the wrong space fails, and the failure is swallowed: _vector_similarity_search returns [], and the text-collection path is caught and returns {}. A user sees "no matches" for an engine fault.
Found in review of the #18143/#18185 branch. A change moving query embeddings to the active 768-d model was reverted there because it would have silently emptied results against the 384/512-d indexes.
Acceptance criteria
Read-only host evidence: the dimension and row count of each live Chroma collection and of the FAISS index on the deployment. Is store_multimodal_embedding written by anything live?
Added acceptance criterion (from the #18143 review): autobot-npu-worker/npu_semantic_search_issue68_test.py is a manual, print-only integration script (live engine, main()). Its "CPU fallback" call (enable_npu_acceleration=False, ~line 117) now reports device_used=embedding_unavailable, because #18143 makes this engine refuse rather than emit a vector in another space.
Once this issue picks the single search space, convert that script into an asserting test: the expected device or refusal per path, and a dimension check of query against index. Its stale "CPU fallback" label goes.
From #18230's rework: the search engine now refuses any index whose embedding space is not recorded in knowledge/index_embedding_space.py, and only autobot_code_embeddings (codebert-base, 768) is recorded. Until this issue records the others, search_batch, cross_modal_search and search() over a populated hybrid index refuse on every host. Also: results from the KB path are labelled embedding_model="enhanced_model" (npu_semantic_search.py:588) rather than the KB index's real model id. Fix that label together with the space records.
Activity
mrveiss commentedon Oct 10, 2026
Added acceptance criterion (from the #18143 review):
autobot-npu-worker/npu_semantic_search_issue68_test.pyis a manual, print-only integration script (live engine,main()). Its "CPU fallback" call (enable_npu_acceleration=False, ~line 117) now reportsdevice_used=embedding_unavailable, because #18143 makes this engine refuse rather than emit a vector in another space.mrveiss commentedon Oct 11, 2026
From #18230's rework: the search engine now refuses any index whose embedding space is not recorded in
knowledge/index_embedding_space.py, and onlyautobot_code_embeddings(codebert-base, 768) is recorded. Until this issue records the others,search_batch,cross_modal_searchandsearch()over a populated hybrid index refuse on every host. Also: results from the KB path are labelledembedding_model="enhanced_model"(npu_semantic_search.py:588) rather than the KB index's real model id. Fix that label together with the space records.github-actions commentedon Nov 3, 2026
needs-structurecleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).