Skip to main content

Selecting the right search type

Overview

Selecting the right search type is key for effective search tasks. Let's explore how to select the right search type for your needs.

Rules of thumb

Vector search is the most robust and versatile search type. As such, it is well-suited for situations where the the meaning, or the vector representation, is of the highest importance.

In cross-modal, object-based or multi-lingual searches, vector search may be the only viable option.

Start with vector search for:

  • Non-text, or cross-modal searches: Essential for searching across different types of media, like finding images using text descriptions or vice versa.
  • Object-based searches: For finding similar objects to an extracted text chunk, image, or video, vector search is likely the only viable solution.
  • Multi-lingual contexts: The go-to choice for handling searches in multiple languages, where traditional keyword-based search may fall short.
  • Complex query understanding: Vector search excels in interpreting and responding to complex queries that require understanding context or nuances in language.

Keyword search is useful when there is an expectation or requirement to match the exact search terms. This can be the case for specific domains such as legal, medical or technical areas where the exact terminology is important.

Keyword search is also useful when the user is unlikely to make mistakes in inputs and is inputting a predictable set of terms, such as through a sanitized form or a drop-down menu.

In summary, start with keyword search for:

Exact term matching: Ideal in domains like legal, medical, or technical fields where specific terminology is crucial. Predictable user inputs: Works well when users are expected to input a defined set of terms, like through forms or drop-down menus. Simple and direct queries: Effective for straightforward search needs where the complexity of natural language processing is not required. Fast and specific results: Suitable for quick retrieval of information based on specific keywords or phrases.

Hybrid search is a great choice for "messy" situations.

Because hybrid search combines results sets from both vector and keyword searches, it is able to provide a good balance between the robustness of vector search and the exactitude of keyword search.

As a result, hybrid search is a generally good choice for most search needs that do not fall into the specific use cases of vector or keyword search.

In summary, consider hybrid search for:

  • Broad topic ranges: Effective in scenarios where the target corpus covers a wide array of subjects, requiring a versatile search approach.
  • Versatile search scenarios: Useful for real-life scenarios that often require a combination of results from both vector and keyword searches.
  • Unpredictable user inputs: Ideal for many real-life scenarios where the user has free reign over the query. Some user queries may be aimed at direct matches while others' queries may be more about the overall meaning.