AI Anatomy Class · Part 1 · AI speaks in numbers

7. Vectors: rows of numbers

Q. Can you put into numbers how similar your taste in food is to a friend's?

  1. Let's write taste as numbers: how much you like spicy food, from 0 to 10, and sweet food, also from 0 to 10.
  2. Mia: spicy 8, sweet 3. We write it in parentheses as (8, 3). Numbers bundled in order like this are called a vector.
  3. A vector can be drawn as an arrow. Across is spicy, up is sweet. The arrow from the origin to (8, 3) is Mia's taste.
  4. Noah is (2, 9) and Emma is (7, 4). Just from the arrows' directions, you can see whose tastes are alike.
  5. More slots give more detail. Add salty and sour and you get a vector of 4 numbers. The number of slots is the dimension.
  6. GPT represents each word as a very long vector: GPT-3 uses 12,288 numbers per word. You can't draw it, but the idea is the same.
  7. A vector is a row of numbers with meaning. In the next chapter, we measure how close two vectors are.

Chapter summary