Cosine Similarity

How could this possibly have anything to do with our jobs?

We are all using AI every day to make ourselves more impactful at work. Even before this we had to put some vague questions into Google to hopefully find a solution to a very specific problem on Stack Overflow where some poor dev was probably getting yelled at by some other poor dev with nothing better to do.

But how does Claude actually know what you're looking for? How can it tell the meaning behind the words? I'm going to give a brief overview of how the mathematics behind all of this works, with a very small example (it gets out of hand pretty fast) to hopefully share some cool facts with the rest of everybody.

Where we're headed

  • A mathematical overview, vectors, magnitude, and the two forms of the dot product
  • A simple example, five video games turned into hand-picked vectors
  • A more realistic example, real word embeddings, scaled up to 50 dimensions