From 7cce1cdc04136dc546f12b1386811e7d6026aa01 Mon Sep 17 00:00:00 2001 From: estromenko Date: Mon, 3 Nov 2025 19:47:51 +0300 Subject: [PATCH] Reduce threshold for vacancy duplicates --- vacancies/main/vector_store.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vacancies/main/vector_store.py b/vacancies/main/vector_store.py index 1d97149..7b7c419 100644 --- a/vacancies/main/vector_store.py +++ b/vacancies/main/vector_store.py @@ -5,8 +5,8 @@ from qdrant_client import QdrantClient from qdrant_client.models import Filter from vacancies.main.models import VacancyFeatures from vacancies.conf.settings import QDRANT_URL -from vacancies.main.models import CustomerCV, RecommendedVacancy -from qdrant_client.models import Filter, HasIdCondition +from vacancies.main.models import RecommendedVacancy +from qdrant_client.models import HasIdCondition qdrant_client = QdrantClient(url=QDRANT_URL) @@ -93,7 +93,7 @@ def add_vectors(collection_name: str, _id: int, features: dict, payload: dict): scored.append({"id": vid, "score": total}) scored.sort(key=lambda x: x["score"], reverse=True) - if scored and scored[0]["score"] > 98: # threshold + if scored and scored[0]["score"] > 90: # threshold return qdrant_client.upsert(