optimize retrieve logic
This commit is contained in:
@@ -70,7 +70,7 @@ final readonly class AgentRunner
|
||||
- Maximal 6 Keywords, besser weniger.
|
||||
- Entferne Füllwörter, Höflichkeitsformen und irrelevante Wörter.
|
||||
- Erhalte Produktnamen, Marken, Modellnummern und zusammengesetzte Begriffe exakt, wenn sie relevant sind.
|
||||
- Zahlen, die zu einem Produktnamen oder Modell gehören, müssen erhalten bleiben.
|
||||
- Zahlen, die zu einem Produktnamen oder Modell gehören (zb Indikator 300 oder Testomat 808), müssen erhalten bleiben.
|
||||
- Trenne die Begriffe nur durch Leerzeichen.
|
||||
|
||||
Ausgabeformat:
|
||||
@@ -114,7 +114,7 @@ final readonly class AgentRunner
|
||||
$knowledgeChunks = $this->retriever->retrieve($prompt);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// 4) Optional commerce/shop search
|
||||
// 4) commerce/shop search
|
||||
// ---------------------------------------------------------
|
||||
|
||||
$commerceMeta = $this->commerceIntentLite->detect($prompt);
|
||||
|
||||
@@ -29,7 +29,7 @@ final class NdjsonHybridRetriever implements RetrieverInterface
|
||||
|
||||
private const THRESHOLD_FLOOR = 0.83;
|
||||
private const THRESHOLD_CEIL = 0.92;
|
||||
private const EMPTY_RRF_FALLBACK_TOPN = 5;
|
||||
private const EMPTY_RRF_FALLBACK_TOPN = 1;
|
||||
|
||||
public function __construct(
|
||||
private readonly NdjsonChunkLookup $lookup,
|
||||
|
||||
@@ -121,6 +121,7 @@ final class QueryEnricher
|
||||
'Wasserhärte' => "Resthärte",
|
||||
'Gerät' => 'Modell',
|
||||
'Indikator' => 'Chemie',
|
||||
'Indikatoren' => 'Indikator',
|
||||
'Wasserhärte-Grenzwert'=>'Resthärte',
|
||||
'Resthärte-Grenzwert'=>'Wasserhärte'
|
||||
];
|
||||
|
||||
@@ -84,7 +84,7 @@ final class ShopwareCriteriaBuilder
|
||||
}
|
||||
|
||||
if ($query->searchText !== '') {
|
||||
$criteria['term'] = $query->searchText;
|
||||
$criteria['search'] = $query->searchText;
|
||||
}
|
||||
|
||||
$filters = [
|
||||
|
||||
@@ -31,7 +31,7 @@ final readonly class StoreApiClient
|
||||
*/
|
||||
public function searchProducts(array $criteria): array
|
||||
{
|
||||
$url = rtrim($this->baseUrl, '/') . '/store-api/product';
|
||||
$url = rtrim($this->baseUrl, '/') . '/store-api/search';
|
||||
|
||||
$response = $this->httpClient->request('POST', $url, [
|
||||
'headers' => [
|
||||
|
||||
Reference in New Issue
Block a user