Seeing strange results with vector search when que...
# community-help
j
Seeing strange results with vector search when querying by embeddings when sorting by
createdAt:desc,_vector_distance:asc
the first result is always this one, and is completely wrong
Copy code
Rightfoot
Backend Engineer - Platform <----- completely irrelevant to the query
San Francisco, USA
9 hours ago
11-50 employees
Skills: backend services, Java, Series-A startup, quick learner, Spring framework, Kafka, RESTful APIs, Infrastructure as Code, Fintech Show Less <----- completely irrelevant to the query
query
Copy code
{
  "indexName": "listings",
  "query": "Frontend Engineer React Python GraphQL JavaScript",
  "queryBy": "embedding",
  "vectorQuery": "embedding:([], k:10000, distance_threshold:1.0)",
  "sortBy": "createdAt:desc,_vector_distance:asc",
  "includeFields": [
    "*"
  ],
  "page": 1,
  "perPage": 10,
  "filterBy": [
    {
      "jobCategory": "Software Development"
    },
    {
      "status": "active"
    }
  ]
}
Is there a way to prioritize certain parts strings when doing vector search? I know they are being embedded correctly
I am using
all-MiniLM-L12-v2
model, not sure if anyone has better experience with other models
j
Setting
createdAt:desc
as the first field in sort by results in a hard sort on created_at and only if created_at is tied, then the vector distance is used for tie breaking
So an unrelevant result is being placed first, because it is created recently
Is there a way to prioritize certain parts strings when doing vector search?
Not it's not possible to do this. The model completely determines ranking
1