optimize code

This commit is contained in:
team2
2026-03-01 19:33:54 +01:00
parent cfd67e1e3c
commit e1c3993c96
5 changed files with 9 additions and 10 deletions

View File

@@ -293,6 +293,7 @@ final class NdjsonHybridRetriever implements RetrieverInterface
$topK = $vectorTopKBase;
switch ($salesIntent) {
case SalesIntentLite::OBJECTION:
case SalesIntentLite::PRICING:
$threshold += 0.02;
break;
@@ -301,10 +302,6 @@ final class NdjsonHybridRetriever implements RetrieverInterface
$topK = (int)round($vectorTopKBase * 1.4);
break;
case SalesIntentLite::OBJECTION:
$threshold -= 0.02;
break;
case SalesIntentLite::IMPLEMENTATION:
$topK = (int)round($vectorTopKBase * 1.3);
break;
@@ -315,7 +312,7 @@ final class NdjsonHybridRetriever implements RetrieverInterface
case SalesIntentLite::DISCOVERY:
default:
$threshold -= 0.03;
$threshold += 0;
break;
}

View File

@@ -12,7 +12,7 @@ final readonly class TagVectorSearchClient
/**
* Minimum similarity score required for a tag to be considered.
*/
private const MIN_SCORE = 0.4;
private const MIN_SCORE = 0.72;
/**
* Hard limit to prevent excessive requests.