mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-06 19:48:19 +08:00
Record the embedding model and dimension used to index each knowledge base in kb_config.json. On subsequent loads, compare the stored fingerprint against the currently configured embedding model and flag mismatched KBs with needs_reindex=True and embedding_mismatch=True. When a mismatched KB is searched, a warning is included in the search result so callers know search quality may be degraded and re-indexing is recommended. This prevents silent search quality degradation when users switch embedding models (e.g., from text-embedding-3-large to nomic-embed-text) without re-indexing their existing knowledge bases.