Skip to content

RDoc-3343 Vector search: Querying multiple vector fields #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Danielle9897
Copy link
Member

@Danielle9897 Danielle9897 requested a review from Lwiel May 22, 2025 16:34
{CODE-TAB:csharp:RawQuery_async vs_28_async@AiIntegration\VectorSearch\VectorSearchUsingDynamicQuery.cs /}
{CODE-TAB-BLOCK:sql:RQL}
from "Companies"
where
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An important aspect here is that vector.search() will only return a set amount of results (by default - IIRC, is 16.
We evaluate each clause independently, so you may have this:

vector.search(embedding.text(Name), $searchTerm1, 0.78)
  and
  vector.search(embedding.text(Address.Country), $searchTerm2, 0.82)

Where the first clause gives [1,2,3...16] results and the second gives [18,... 34]` results. And there won't be a match between them.

However, if we will continue deeper in the first clause, we'll get to 18 which would be a match.

The problem is that we must run the HNSW on each vector independently, and the size matters a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants