This commit is contained in:
team 1
2026-05-07 19:04:04 +02:00
parent 98577d4d25
commit 61f6841a5a
7 changed files with 419 additions and 214 deletions

View File

@@ -962,11 +962,6 @@ final class AgentRunnerConfig
*/
public function getNoLlmMainDeviceRequestRoleKeywords(): array
{
$terms = $this->genreStringList('product_roles.no_llm_fallback_terms.main_device_request_keywords');
if ($terms !== []) {
return $terms;
}
return $this->getConfiguredStringListOrVocabularyView(
'no_llm_fallback.product_roles.main_device_request_keywords',
'no_llm_fallback.product_roles.vocabulary_views.main_device_request_keywords'
@@ -978,11 +973,6 @@ final class AgentRunnerConfig
*/
public function getNoLlmAccessoryProductRoleKeywords(): array
{
$terms = $this->genreStringList('product_roles.no_llm_fallback_terms.accessory_product_keywords');
if ($terms !== []) {
return $terms;
}
return $this->getConfiguredStringListOrVocabularyView(
'no_llm_fallback.product_roles.accessory_product_keywords',
'no_llm_fallback.product_roles.vocabulary_views.accessory_product_keywords'
@@ -1196,6 +1186,90 @@ final class AgentRunnerConfig
?: $this->getRequiredStringList('shop_runtime.query_cleanup.stopword_cleanup.terms');
}
public function isShopQueryPositiveTokenFilterEnabled(): bool
{
return $this->genreBool('shop_query_runtime.positive_token_filter.enabled')
?? $this->getOptionalBool('shop_runtime.query_cleanup.positive_token_filter.enabled', false);
}
public function getShopQueryPositiveTokenFilterMinTokens(): int
{
return $this->genreInt('shop_query_runtime.positive_token_filter.min_query_tokens_after_filter')
?? $this->getOptionalInt('shop_runtime.query_cleanup.positive_token_filter.min_query_tokens_after_filter', 2);
}
public function shouldShopQueryPositiveTokenFilterIncludeCurrentInputPreservationTerms(): bool
{
return $this->genreBool('shop_query_runtime.positive_token_filter.include_current_input_preservation_terms')
?? $this->getOptionalBool('shop_runtime.query_cleanup.positive_token_filter.include_current_input_preservation_terms', true);
}
public function shouldShopQueryPositiveTokenFilterIncludeSemanticShopSearchTokens(): bool
{
return $this->genreBool('shop_query_runtime.positive_token_filter.include_semantic_shop_search_tokens')
?? $this->getOptionalBool('shop_runtime.query_cleanup.positive_token_filter.include_semantic_shop_search_tokens', true);
}
public function shouldShopQueryPositiveTokenFilterIncludeProductRoleTerms(): bool
{
return $this->genreBool('shop_query_runtime.positive_token_filter.include_product_role_terms')
?? $this->getOptionalBool('shop_runtime.query_cleanup.positive_token_filter.include_product_role_terms', true);
}
/**
* @return string[]
*/
public function getShopQueryPositiveTokenFilterAllowedTerms(): array
{
return $this->genreStringList('shop_query_runtime.positive_token_filter.allowed_terms')
?: $this->getOptionalStringList('shop_runtime.query_cleanup.positive_token_filter.allowed_terms');
}
/**
* @return string[]
*/
public function getShopQueryPositiveTokenFilterBlockedTerms(): array
{
return $this->genreStringList('shop_query_runtime.positive_token_filter.blocked_terms')
?: $this->getOptionalStringList('shop_runtime.query_cleanup.positive_token_filter.blocked_terms');
}
/**
* @return string[]
*/
public function getShopQueryPositiveTokenFilterCodePatterns(): array
{
return $this->genreStringList('shop_query_runtime.positive_token_filter.code_patterns')
?: $this->getOptionalStringList('shop_runtime.query_cleanup.positive_token_filter.code_patterns');
}
/**
* @return string[]
*/
public function getShopQueryPositiveTokenFilterSemanticShopSearchTokens(): array
{
return $this->genreStringList('shop_query_runtime.semantic_shop_search_tokens.terms');
}
/**
* @return string[]
*/
public function getShopQueryPositiveTokenFilterProductRoleTerms(): array
{
return array_values(array_unique(array_merge(
$this->genreStringList('product_roles.primary_product_terms.terms'),
$this->genreStringList('product_roles.accessory_product_terms.terms'),
$this->genreStringList('product_roles.shop_views.device_query_terms'),
$this->genreStringList('product_roles.shop_views.accessory_query_terms'),
$this->genreStringList('product_roles.shop_views.device_product_terms'),
$this->genreStringList('product_roles.shop_views.accessory_product_terms'),
$this->genreStringList('product_roles.shop_views.device_focus_terms'),
$this->genreStringList('product_roles.shop_views.accessory_focus_terms'),
$this->genreStringList('product_roles.no_llm_fallback_terms.main_device_request_keywords'),
$this->genreStringList('product_roles.no_llm_fallback_terms.accessory_product_keywords')
)));
}
public function isDirectShopResultGuardEnabled(): bool
{
return $this->getRequiredBool('shop_runtime.result_identity.enabled');
@@ -1434,24 +1508,6 @@ final class AgentRunnerConfig
);
}
/**
* @return string[]
*/
public function getShopQueryContextAnchorEnrichmentQueryTerms(): array
{
return $this->genreStringList('context_resolution.history_anchor_enrichment.query_terms')
?: $this->getOptionalStringList('shop_runtime.context_resolution.history_anchor_enrichment.query_terms');
}
/**
* @return string[]
*/
public function getShopQueryContextAnchorEnrichmentQueryNoiseTerms(): array
{
return $this->genreStringList('context_resolution.history_anchor_enrichment.query_noise_terms')
?: $this->getOptionalStringList('shop_runtime.context_resolution.history_anchor_enrichment.query_noise_terms');
}
/**
* @return string[]
*/