Subsection 1.1 Personality Embeddings: What are you like?
To understand embeddings, we will start by thinking about how we might represent a personβs personality as a set of numbers.
On a scale of 0 to 100, how introverted/extraverted are you (where 0 is the most introverted, and 100 is the most extraverted)? Have you ever taken a personality test like MBTI -- or even better, the Big Five Personality Traits test? If you havenβt, these are tests that ask you a list of questions, then score you on a number of axes, introversion/extraversion being one of them.

Consider a person with an introversion/extraversion score of 38/100. That score can be plotted as follows:

The same score can be rescaled to the range -1 to 1:

A single trait provides only a limited description of a person. Adding a second trait introduces another dimension:

The two dimensions can be represented as a sequence (vector) of two numbers: the first number represents the score for the first dimension, and the second number represents the score for the second dimension. This vector partially represents the personality of the example person and is called an embedding.
Comparing it with the vectors of two other people provides a way to identify the more similar personality:

Looking at the vectors, we can see that Person #1 has a personality vector that is more similar to the Jayβs vector than does Person #2. Although Person #1βs vector isnβt as long as Jayβs, it is at least pointing in a similar direction.
We can use various mathematical methods to calculate the similarity between these vectors. One such method is cosine_similarity. It measures the cosine of the angle between two vectors, with values ranging from -1 (completely opposite) to 1 (identical). Any positive score indicates that the vectors are pointing in similar directions.

cosine similarity shows that Person #1βs vector is quite similar to the Jay vector (0.87). Person #2βs vector is less similar to Jayβs (-0.20).Two dimensions still provide a limited description of personality. To get a more detailed characterisation, we can include all five dimensions of the Big Five:

Five-dimensional vectors cannot be drawn as arrows on a two-dimensional graph without a projection. But the concept of cosine similarity works with any number of dimensions:

Although we have focused on personality traits, we can use the same approach to represent other concepts. We can define a number of traits that describe the concept, and then represent it as a vector of numbers. For example, we could define traits for a car such as speed, fuel efficiency, and comfort, and represent a specific car as a vector of numbers corresponding to those traits.