This commit is contained in:
team 1
2026-04-24 18:54:25 +02:00
parent 372a6797fa
commit c439fb99d6
12 changed files with 1126 additions and 336 deletions

View File

@@ -14,9 +14,7 @@ final readonly class QueryEnricher
* The enriched semantic query should help vector retrieval,
* but must not become bloated enough to dilute the original user intent.
*/
private const MAX_EXPANSIONS = 4;
public function __construct(
public function __construct(
private QueryEnricherConfig $config
) {
}
@@ -95,7 +93,7 @@ final readonly class QueryEnricher
$matches[] = $mappedValue;
$seenNormalizedExpansions[$normalizedMappedValue] = true;
if (count($matches) >= self::MAX_EXPANSIONS) {
if (count($matches) >= $this->config->getMaxExpansions()) {
break;
}
}