Skip to content

Commit

Permalink
Merge pull request #53 from Meg528/patch-26
Browse files Browse the repository at this point in the history
Update 2-what-are-vector.mdx
  • Loading branch information
sis0k0 authored Sep 18, 2024
2 parents 6a60283 + 8115442 commit 4737cea
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 4737cea

Please sign in to comment.