This repository has been archived on 2026-08-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Cyrene/backend/ai-core/internal
AskaEth 02852347d9 feat: n-gram文本相似度作为embedding降级方案
SimpleEmbedder重写为基于字符bigram+trigram的FNV哈希向量:
- 相似中文短语共享n-gram → 余弦相似度有意义
- 不需要任何外部API,纯本地计算
- 作为EMBEDDING_API_URL不可用时的自动降级

keywordSearch升级为滑动窗口分词匹配:
- 2-4字窗口切分查询词,分别匹配记忆内容/摘要/标签
- 按匹配分数降序排列,分数越高越相关
- 替代原来的完整字符串包含匹配,中文召回率大幅提升

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-06 20:46:40 +08:00
..