Skip to content

Commit

Permalink
Update 2-what-are-vector.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
Meg528 authored Jun 10, 2024
1 parent 5b68f7c commit 8115442
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/7-vector-search/2-what-are-vector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Thanks to some of the latest advances in AI, we can now use vectors to represent

Vectors can even be used to represent images, audio, and video, but we'll focus on text in this workshop.

## Why Do We Need Vectors?
## Why do we need vectors?

Computers can't understand text. They can only understand numbers. So, we need a way to convert text into numbers. That's where vectors come in.

Using vectors, we can plot text in a multi-dimensional space. It is hard to visualize a multi-dimensional space, so let's start with a 2-dimensional space.
Using vectors, we can plot text in a multi-dimensional space. It is hard to visualize a multi-dimensional space, so let's start with a two-dimensional space.

Imagine a plot with a x and y axis. Our ML model will plot various points on this plot. This could represent words, sentences, paragraphs, documents, or even images.
Imagine a plot with an x and y axis. Our ML model will plot various points on this plot. This could represent words, sentences, paragraphs, documents, or even images.

The position where the points are plotted is determined by the model you used. The models converts the data you passed it into a vector. Then, it plots the vector on the chart.
The position where the points are plotted is determined by the model you used. The model converts the data you passed it into a vector. Then, it plots the vector on the chart.

![Points on a chart](/img/7-vector-search/1-vectors.png)

Expand All @@ -40,8 +40,8 @@ Vector search also provides a cosine algorithm. Using cosine distance, the close

![Closest words](/img/7-vector-search/4-cosine.png)

## How Do We Create Vectors?
## How do we create vectors?

The big breakthrough with GenAI is that developers can now easily use models that have been pre-trained, and made available freely online. These models have been trained on huge datasets, and are able to convert text (or any sort of data, really) into vectors.
The big breakthrough with GenAI is that developers can now easily use models that have been pre-trained and made available freely online. These models have been trained on huge datasets and are able to convert text (or any sort of data, really) into vectors.

There are many ways to create vectors. In this workshop, we'll use a pre-trained model and an API that will return vectors for us.
There are many ways to create vectors. In this workshop, we'll use a pre-trained model and an API that will return vectors for us.

0 comments on commit 8115442

Please sign in to comment.