From the course: Building Apps with AI Tools: ChatGPT, Semantic Kernel, and Langchain

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Semantic search and embeddings

Semantic search and embeddings

- [Instructor] So, how does a vector DB chatbot work? The one we built in the last video? Let's dive into two key concepts: embeddings and semantic search. Embeddings are a standardized numerical representation of information. Embeddings are made up of a list of numbers commonly called an embedding vector. Text embeddings work by turning a word, sentence, or even paragraph into a vector representation. For example, let's imagine that we're turning the word dog into an embedding vector. That's length three. Let's say if that the word is an animal, the zeroth index is a one. If it is brown, the first index is a one. And if it likes swimming, the second index is a one. So dog maps to 1, 1, 1 but actually many things map to 1, 1, 1. A duck, horse, and many other things may also map to 1, 1, 1. So, our handcrafted embedding isn't great. So what makes a good embedding? Well, there are three things. The first is that…

Contents