From 4e5428bed099fbc732892dd129e4895c58049270 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 3 May 2026 14:51:41 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20cosine-similarity=20=E2=86=92=20vector-c?= =?UTF-8?q?osine-similarity=20naming=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit context-object-render was calling cosince-similarity (undefined) instead of the actual function name vector-cosine-similarity defined in core-skills. This would crash at runtime when semantic retrieval was triggered. --- lisp/core-context.lisp | 2 +- org/core-context.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/core-context.lisp b/lisp/core-context.lisp index 57dda31..1419b83 100644 --- a/lisp/core-context.lisp +++ b/lisp/core-context.lisp @@ -74,7 +74,7 @@ or nil if the heading is not found." (obj-vector (memory-object-vector obj)) (threshold (or semantic-threshold (ignore-errors (read-from-string (uiop:getenv "CONTEXT_SEMANTIC_THRESHOLD"))) 0.75)) (similarity (if (and foveal-vector obj-vector (not is-foveal)) - (cosine-similarity foveal-vector obj-vector) + (vector-cosine-similarity foveal-vector obj-vector) 0.0)) (is-semantically-relevant (>= similarity threshold)) (should-render (or (<= depth 2) is-foveal is-semantically-relevant)) diff --git a/org/core-context.org b/org/core-context.org index 3d8cbf0..29ad31d 100644 --- a/org/core-context.org +++ b/org/core-context.org @@ -168,7 +168,7 @@ This function is the heart of the context assembly. Its performance directly aff (obj-vector (memory-object-vector obj)) (threshold (or semantic-threshold (ignore-errors (read-from-string (uiop:getenv "CONTEXT_SEMANTIC_THRESHOLD"))) 0.75)) (similarity (if (and foveal-vector obj-vector (not is-foveal)) - (cosine-similarity foveal-vector obj-vector) + (vector-cosine-similarity foveal-vector obj-vector) 0.0)) (is-semantically-relevant (>= similarity threshold)) (should-render (or (<= depth 2) is-foveal is-semantically-relevant))