Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

cosineSimilarity

Function
This function is defined in the embeddings module.

Signature

def cosineSimilarity(a: number[], b: number[]) -> number

Returns

Returns
number
The result of the operation.

Uses

  • sqrt

Source

View on GitHub

src/embeddings/index.ts at line 177