Skip to main content

Vector Search

  • Vector search enables you to retrieve content based on semantic similarity rather than exact keyword matches.
    Instead of comparing text directly, RavenDB compares Embeddings, which are numeric vectors that represent meaning and context, allowing you to:

    • Find text by meaning rather than wording
    • Retrieve related content even when exact terms do not appear
    • Match images by visual similarity
  • Vector search can be done using:
    Dynamic queries - suitable for ad-hoc or infrequent searches.
    Querying static-indexes that index vector fields - suitable for optimized and repeated searches.

  • The embeddings used for vector search can be created in several ways:
    on the fly, via background tasks, or from external sources.
    Learn more in the Vector search - Overview section.

  • Vector search queries also empower other AI features in RavenDB such as GenAI and AI Agents.
    These features can use vector search to retrieve relevant documents in response to LLM requests.

Use cases

Vector search is suitable whenever you need to find similar items based on meaning or proximity, rather than exact matches.
Common scenarios include:

  • Knowledge and document search
    Find relevant documentation, policies, legal texts, or enterprise reports using natural language queries.
  • Product and content recommendations
    Suggest similar products, articles, videos, or media based on descriptive queries and user preferences.
  • Customer support automation
    Route questions to the best help articles, retrieve guides, and power chatbot responses with relevant information.
  • Business intelligence and analysis
    Profile customers and uncover market trends by comparing behavioral and relationship-based similarities.
  • Media and content analysis
    Discover similar images, moderate content, and monitor social media for brand mentions and sentiment.

Technical documentation

Refer to the technical documentation to learn how to execute dynamic vector queries, create static vector indexes,
and understand how RavenDB automatically generates embeddings to power semantic searches across your data.

Vector search - Overview

Learn about vector search in RavenDB.

Vector search using a dynamic query

Learn how to run a vector search using a dynamic query.

Learn more: In-depth articles

External

Semantic Search with RavenDB, Python, and FastAPI

Automate embedding generation and easily query vectorized data to find results by meaning rather than keywords, by Paweł Lachowski.

External

AI image search with RavenDB

Build AI-powered image search with text and image queries using CLIP embeddings, by Paweł Lachowski.

In this article