dot_product

Generic Description

Computes the vector dot product for equal-length numeric vectors. It is documented separately because similarity orientation, vector dimensions, and set semantics directly affect ranking and interpretation.

Simple example:

RETURN dot_product(vector([1.0, 2.0]), vector([3.0, 4.0])) AS value

Consumer-Level Explanation

Use it when vector magnitude is intentionally part of the score. Prefer this function when symbolic graph filters and similarity evidence should remain in one auditable Cypher pipeline.

More Detailed Explanation

dot_product keeps similarity scoring in the same Cypher pipeline as symbolic graph filters and document metadata checks. That lets a query combine labels, relationships, time filters, and embedding or set overlap scores without asking a client to reconcile separate result sets.

Advanced Example

This example applies dot_product after symbolic graph filtering, which keeps hybrid retrieval constraints and similarity scoring in one visible pipeline.

MATCH (d:Document)
WITH d, dot_product(vector(properties(d).embedding), vector([0.22, 0.18, 0.44])) AS weighted_embedding_score
RETURN d.title AS document, weighted_embedding_score
ORDER BY weighted_embedding_score DESC

Real Use Cases

Real Limitations And Tradeoffs