Search

Thursday 23 November 2023

Text embeddings explained with no jargon

Imagine you’re trying to teach a computer to understand a story. The computer doesn’t understand words or sentences like we do. It only understands numbers. So, we need a way to turn the words and sentences in the story into numbers that the computer can understand. That’s where text embeddings come in.

Let’s say the story is about a cat and a dog. We could give the word “cat” the number 1 and the word “dog” the number 2. But what about the word “pet”? It’s related to both “cat” and “dog”, so it should have a number that’s somewhere between 1 and 2, right?

That’s the basic idea behind text embeddings. We give each word a number (or a group of numbers) that represents its meaning. Words with similar meanings get numbers that are close together. This way, the computer can start to understand the relationships between different words.

And it’s not just for single words. We can also do this for whole sentences or even longer pieces of text. This helps the computer understand the story as a whole, not just the individual words.

So, text embeddings are like a translator between us and the computer. They help the computer understand our words and stories in a way it can process and learn from.