Foundation of Large
Language Models
How is Math the backbone of AI?
(c) Copyrights Reserved [Link]
1
What are Vectors?
A vector is a mathematical point that represents data in a
format that AI algorithms can understand.
Vectors are arrays (or lists) of numbers, with each
number representing a specific feature or attribute of the
data.
(c) Copyrights Reserved [Link]
2
Vector
Representation
Let's say we have a 2D space where each axis
represents a taste characteristic: sweet and sour.
As we add more dimensions (e.g., bitter, salty, savory),
we get a richer understanding of the dishes.
The closer the vectors, the more similar their meanings.
(c) Copyrights Reserved [Link]
3
What are
Embeddings?
Embeddings convert words, phrases, or even images
into numerical vectors.
These vectors map discrete data into a continuous latent
space, capturing relationships.
(c) Copyrights Reserved [Link]
4
What do Embeddings
represent?
Embeddings allow mathematical operations on text,
making tasks like clustering, classification, and
regression possible.
By converting text to vectors, models can interpret,
compare, and manipulate words more effectively.
(c) Copyrights Reserved [Link]
5
Cosine similarity for
vector similarity
Cosine similarity is a measurement that quantifies the
similarity between two or more vectors.
It is the cosine of the angle between vectors, which are
typically non-zero and within an inner product space.
Source: Wikipedia
(c) Copyrights Reserved [Link]
6
Cosine similarity for
vector similarity
Cosine similarity is a measure in LLMs for evaluating the
semantic similarity between embeddings.
It is used in semantic search as it provides a robust and
efficient way to compare textual data based on its
meaning, driving significant advancements in NLP and
AI-driven applications.
(c) Copyrights Reserved [Link]
To learn more, join us on 15
January at 10AM PDT for
Simplifying Mathematics
Behind AI
Albar Wahab
Senior Data Scientist
Data Science Dojo
(c) Copyrights Reserved [Link]