Using Vector Search for Semantic Search

Learn all about Atlas Vector Search as you build a semantic search feature. Leverage both Atlas Search and Atlas Vector Search to identify the most relevant search results.

Using Vector Search for Semantic Search

Unit Overview

In this unit, you'll learn how to build a semantic search feature with Atlas Vector Search. You'll start by learning everything you need to know about vectors and dimensions, including sparse and dense vectors. Then you'll generate vector embeddings for the movies collection. After that, you'll learn how vectors are indexed with Hierarchical Navigable Small World graphs and searched by nearest neighbor algorithms. You'll then create a vector search index and craft a query with the $vectorSearch aggregation stage. Finally, you'll learn about hybrid search which combines text and semantic search to identify the most relevant search results. You'll implement hybrid search by leveraging Atlas Search and Atlas Vector Search within MongoDB's aggregation framework.

Prerequisites

Lessons in This Unit

  • Lesson 1 – Vectors and Dimensions
  • Lesson 2 – Sparse and Dense Vectors
  • Lesson 3 – Create Embeddings for your Data
  • Lesson 4 – Indexing Algorithms
  • Lesson 5 – Configure a Vector Index
  • Lesson 6 – Create a Search Query Using Vector Search
  • Lesson 7 – Introduction to Hybrid Search
  • Lesson 8 – Implementing Hybrid Search
  • 01.
    Lesson 1: Vectors and Dimensions
    • Learn
    • Practice
  • 02.
    Lesson 2: Sparse and Dense Vectors
    • Learn
    • Practice
  • 03.
    Lesson 3: Create Embeddings for your Data
    • Learn
    • Practice
  • 04.
    Lesson 4: Indexing Algorithms
    • Learn
    • Practice
  • 05.
    Lesson 5: Configure a Vector Index
    • Learn
    • Practice
  • 06.
    Lesson 6: Create a Search Query Using Vector Search
    • Learn
    • Practice
  • 07.
    Lesson 7: Introduction to Hybrid Search
    • Learn
    • Practice
  • 08.
    Lesson 8: Implementing Hybrid Search
    • Learn
    • Practice
  • 09.
    Conclusion
    • Learn
Parker Faucher | University Curriculum Engineer

Parker Faucher | University Curriculum Engineer

Parker is a Curriculum Engineer on the Education team at MongoDB. Prior to joining MongoDB, he helped maintain a world class developer bootcamp that was offered in multiple universities. He is a self taught developer who loves being able to give back to the community that has helped him so much.

Sarah Evans | Senior Curriculum Engineer

Sarah Evans | Senior Curriculum Engineer

Sarah is a Senior Curriculum Engineer on the Curriculum team at MongoDB. Prior to MongoDB, she taught and developed curricula for developer bootcamps. Sarah has a MAT degree from Columbia University Teachers College and studied Software Engineering at Flatiron School in Chicago, IL.

Harshad Dhavale | Staff Technical Services Engineer

Harshad Dhavale | Staff Technical Services Engineer

Harshad Dhavale is a Staff Technical Services Engineer, who has been with MongoDB for over six years. He is a subject matter expert in Atlas Search and Atlas Vector Search, and has made significant contributions in these domains over his tenure. In addition to enablement, he has played a key role in numerous pivotal Atlas Search and Atlas Vector Search initiatives and projects, which have been instrumental in defining the product's trajectory. He is a trusted specialist on all things Search, and enjoys diving deep into complex Search topics.

Emily Pope | Senior Curriculum Designer

Emily Pope | Senior Curriculum Designer

Emily is a Senior Curriculum Designer at MongoDB. Prior to MongoDB, Emily worked closely with professors at MIT and Columbia to design bootcamps in full stack development and data science at Emeritus. She also worked as an instructional designer on database and computer science learning experiences at Cengage. Emily loves learning about the everchanging tech space and is passionate about making these skills accessible to a global audience.

Vick Mena | Director, Curriculum

Vick Mena | Director, Curriculum

My name is Vick and I've been in the wild for over 25 years. I grew up at IBM working on the BIOS for the IBM eServer line in Austin, TX before moving to Wall St. I've worked on all phases of software development from low-level to middleware to UI but feel most comfortable in the middle. I also drank the devops kool-aid having moved a product line to AWS while at Dow Jones & Co with the help of an amazing team. I then pivoted into the secure space and worked on software/hardware reverse engineering. I always thought I'd eventually teach and this role lets me leverage all of my experience to lead this motley crew of passionate educators.

John McCambridge | University Curriculum Engineer

John McCambridge | University Curriculum Engineer

John is a Curriculum Engineer on the University team at MongoDB. Before his work as a Curriculum Engineer, he was an instructor and teaching assistant for coding boot camps at UT (Austin), and UCLA. Additionally, he worked as a QA engineer for a startup called Coder and spent five years at Apple Inc. John is a passionate software engineer and educator who enjoys taking complex topics and making them digestible for the community.

AR
October 8, 2024 12:46 PM


EF
October 6, 2024 5:11 PM


TD
October 2, 2024 9:59 AM


LS
October 2, 2024 8:05 AM

good

BB
October 2, 2024 4:40 AM


SR
October 1, 2024 10:02 AM


FR
September 29, 2024 7:56 AM


AN
September 28, 2024 10:51 AM

Thanking for giving me this wonderful very useful for all people this videos to make sure learning is very useful for me many thinks they said

One second thank for giving this video's

VS
September 27, 2024 7:52 AM

thanks for your support

SR
September 18, 2024 9:33 AM

Go🤣

AP
September 3, 2024 4:05 PM

It is very easy to learn

DC
September 1, 2024 7:52 AM


Welcome! In this unit, we’ll learn how to use Atlas Vector Search to add semantic search to an application.

My name is Sarah. I'm a Curriculum Engineer at MongoDB, and I will guide you through this unit.

Have you ever tried looking for a movie but can’t think of the title?

Perhaps you only remember some vague details about the movie.

For instance, the movie that I'm thinking of “has aliens that come to earth in search of resources”.

This will often lead you to searching the web for phrases like “alien invasion movies” using search engines with a keyword match. Sometimes you'll get lucky and find the movie you're looking for. But you may have to search through hundreds of alien movies to find the right one.

What if there was a better way of doing this? Like describing to the search engine the parts of the movie you remember so it returns results related to that description.

With Atlas Vector Search we can do this! We can leverage AI to create a search engine that extracts the meaning of a query and returns related results. Because this search focuses on the meaning of the words, rather than matching keywords, we call this a semantic search.

In this unit, we’ll use Atlas Vector Search to create a semantic search feature for a movie catalog application.

We’ll use movie data from the movies collection in the sample_mflix database, where each document has information about a movie, such as: The title, plot, Directors, cast, Genre, Rating, and Release date.

This will allow users to easily search for movies based on descriptions.

But first, we’ll learn about vectors and dimensions.

Next, we’ll learn about the difference between sparse and dense vectors.

After that, we’ll generate vectors for our data using an embedding model.

Once that's complete, we’ll explore how vectors are indexed using Hierarchical Navigable Small World graphs and searched using a nearest neighbor algorithm.

Then, we’ll create an Atlas Search index using the vector field type.

Armed with our new index, we’ll learn how to query data using the $vectorSearch stage in the aggregation framework.

Finally, we’ll learn how to use hybrid search, which is a way to combine Atlas Search with Atlas Vector Search, to improve our search results.

After completing this unit, you'll be able to implement a semantic search feature in your application using Atlas Vector Search.

We have lots to do so let's get started!