| title | BGE Embedding Fallback Crash | |||
|---|---|---|---|---|
| domain | rag | |||
| source | bootstrap | |||
| status | published | |||
| tags |
|
|||
| language | en | |||
| created | 2026-05-03 | |||
| domain_expert | bootstrap | |||
| verified_date | 2026-05-03 | |||
| subdomain | embedding |
When HermesHub starts, if the BGE-m3 model has not been downloaded to the local path, SkillIndexer crashes immediately.
The local path is hard-coded as ~/.cache/huggingface/..., which does not exist on other machines.
Inspect the RAG config, ingestion log, retrieval log, and cache status to confirm the exact mismatch before applying the fix.
_init_embedding_model() in skill_indexer.py loads the model with local_files_only=True, and the model path is a hard-coded machine-specific absolute path. There is no fallback mechanism and no environment-variable override.
- Remove the hard-coded absolute path and use: constructor parameter →
EMBEDDING_MODEL_PATHenvironment variable → model name (auto-download) - Wrap loading failures in try/except and degrade to no-embedding mode (
register_skillskips semantic deduplication) - Make
_generate_embedding()return an empty list, sosearch_skillsfalls back to keyword matching
Start the hub on a machine without the BGE-m3 model. It does not crash and prints "[Embedding] degraded mode — semantic deduplication and search will be unavailable".
# Expected result: retrieval logs show the intended chunks and no stale cache or fallback errors.
python3 search_knowledge.py "rag verification smoke test" --lessonsEnvironment: Linux / WSL with Python 3.10 or newer; adapt the query to the affected RAG corpus.
Any non-development Node machine (Node 1/2/3/6) without a pre-downloaded BGE-m3 model cache.