The main principle to solve this edition is Vector Search, so before entering this topic, I decided to understand what embeddings are, which is fundamental to understand and implement a Vector Search.

Embeddings are a way of representing objects like images, audio and texts as points in a vector space. The locations of those points are helpful to find similar objects.

Example

For better understanding, we will use examples of fruits represented as vectors. Each dimension of the vector represents an attribute of the fruit; we will use: sweetness and color. Each dimension value must be between 0 and 1, the green color is equal to 0, and the red color is equal to 1.

Fruit (Object)SweetnessColor
Apple0.70.9
Banana0.80.1
Watermelon0.90.2

Cartesian Plane with Position of Fruits

Fonte: https://www.ibm.com/think/topics/embedding