@amemhq/core 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-XEMQZNLD.js → chunk-3HJV3LLV.js} +7 -2
- package/dist/{chunk-XEMQZNLD.js.map → chunk-3HJV3LLV.js.map} +1 -1
- package/dist/cli-migrate.cjs.map +1 -1
- package/dist/cli-migrate.js +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -2
package/dist/cli-migrate.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1950,7 +1950,12 @@ async function searchMemory(query, topK = 5, agentId = "main", opts) {
|
|
|
1950
1950
|
keywords: note.keywords,
|
|
1951
1951
|
links: note.links,
|
|
1952
1952
|
timestamp: note.timestamp,
|
|
1953
|
-
|
|
1953
|
+
// Neither map covers a note that got here on BM25 alone: it was never in
|
|
1954
|
+
// the dense results, and it was not expanded into. That is a real cosine
|
|
1955
|
+
// nobody had measured, not a zero — and reporting 0 made a lexical match
|
|
1956
|
+
// look like the least relevant row in the list. Both vectors are already
|
|
1957
|
+
// in hand, so measuring it is one dot product.
|
|
1958
|
+
similarity: embSimMap.get(id) ?? bfsSimMap.get(id) ?? cosineSimilarity(queryEmbedding, note.embedding),
|
|
1954
1959
|
rrf: rrfMap.get(id) ?? 0,
|
|
1955
1960
|
via,
|
|
1956
1961
|
topics: note.topics ?? [],
|