{"record":{"id":"beb70a97e0f762a9","repo":"tinyhumansai/openhuman","slug":"memory-vector-search-load-embeddings-failed-e","errorCode":null,"errorMessage":"memory_vector_search: load embeddings failed: {e}","messagePattern":"memory_vector_search: load embeddings failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/vector_search.rs","lineNumber":191,"sourceCode":"            exclude_dropped: false,\n        };\n\n        let chunks = chunk_reader\n            .list_chunks(&query, None)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: list chunks failed: {e}\"))?;\n\n        if chunks.is_empty() {\n            return Ok(ToolResult::success(\"No chunks found matching filters.\"));\n        }\n\n        // Get embeddings for these chunks\n        let chunk_ids: Vec<String> = chunks.iter().map(|c| c.id.clone()).collect();\n        let model_sig = embedder.signature();\n        let embeddings: std::collections::HashMap<String, Vec<f32>> = chunk_reader\n            .chunk_embeddings(&chunk_ids, &model_sig)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: load embeddings failed: {e}\"))?\n            .into_iter()\n            .map(|embedding| (embedding.chunk_id, embedding.vector))\n            .collect();\n\n        // Score each chunk\n        let mut scored: Vec<(usize, f64, &[f32])> = Vec::new();\n\n        for (idx, chunk) in chunks.iter().enumerate() {\n            let Some(emb) = embeddings.get(&chunk.id) else {\n                continue;\n            };\n            if emb.len() != query_vec.len() {\n                continue;\n            }\n            let score = cosine_similarity(&query_vec, emb);\n            if score >= min_score {\n                scored.push((idx, score, emb.as_slice()));\n            }","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/vector_search.rs#L173-L209","documentation":"After chunks were listed successfully, loading the stored embedding vectors for those chunk ids failed. The tool needs the precomputed vectors to score against the embedded query; this fires in the vector-fetch step and typically indicates missing/stale embeddings for the listed chunks or a store read fault, with `{e}` giving the exact cause.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/vector_search.rs:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check `{e}` for whether embeddings are missing vs unreadable","Rebuild embeddings for the affected chunks (re-ingest or embedding backfill)","Verify the embedding model signature matches the one that produced the stored vectors","Retry for transient store faults"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}