Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-11940

Improve Vector Search Documentation

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • sdk, vector-search

    Description

      • Single Vector Query: I think it is important to mention the `num_candidates` in the VectorQuery() as it defines how many similar vectors are returned. The SDK does not set anything by default which would then default to the limit set in SearchOptions(). This num_candidates refers to the limit for that individual vector query. It will become clearer with the Multiple vector queries example.
      • Hybrid Search: It would be good to include an example of how to use the `VectorSearchOptions`. By default, it will OR the results if nothing is specified. Also, the hybrid query syntax looks a bit scary when you see it that way. I would propose to either split the search request creation or format it a bit differently like the following to reduce the cognitive overload:

      request = search.SearchRequest.create(search.MatchAllQuery()).with_vector_search(

          VectorSearch.from_vector_query(VectorQuery("vector_field", query_vector))

      )

      • Also, might be worth explaining the scoring for the hybrid search somewhere & linking it to the SDK call. As I understand, the scores from each of the search queries with the corresponding boost multiplier is added up to get to the final score. From the engineering design doc:
      • The score is consolidated across the regular exact search and kNN search using the pre-existing mechanism for a compound query, which is - hit_score = (query_1_boost * query_1_hit_score) + (query_2_boost * query_2_hit_score)
      • It would be worth noting that we currently do not support creating vector indexes using the SDK. I believe it will come later with 7.6.1.
      • Another thing that would be nice to have is to link to the FTS query methods from the page as a reference for people to find out what a certain search like Match/Wildcard does & to know more about its syntax. I found this page helpful from the development perspective.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              richard.smedley Richard Smedley
              nithish.raghunandanan Nithish Raghunandanan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty