Solutionunvalidated

Move cosine similarity computation from Cypher to JS — Fetch node.embedding as a raw array in the RETURN clause. Tension: A simple loop over JS numbers is ~100x faster than Cypher reduce(). Outcome: then compute similarity in a JS for-loop after results return.

c79075a7-842e-4a10-83ab-1d0ec86ff91f

Move cosine similarity computation from Cypher to JS — Fetch node.embedding as a raw array in the RETURN clause. Tension: A simple loop over JS numbers is ~100x faster than Cypher reduce(). Outcome: then compute similarity in a JS for-loop after results return.