optimize retrieve logic
This commit is contained in:
BIN
public/assets/img/logo.png
Normal file
BIN
public/assets/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
@@ -19,19 +19,19 @@ body {
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1,.h1 {
|
||||||
font-size: 1.49rem;
|
font-size: 1.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2,.h2 {
|
||||||
font-size: 1.31rem;
|
font-size: 1.35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3,.h3 {
|
||||||
font-size: 1.13rem;
|
font-size: 1.35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4, h5, h6 {
|
h4, h5, h6,.h4,.h5,.h6 {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,3 +415,51 @@ span.think {
|
|||||||
max-width: 50px;
|
max-width: 50px;
|
||||||
max-height: 50px;
|
max-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*####################################*/
|
||||||
|
.example-1,
|
||||||
|
.example-2 {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-1 .inner,
|
||||||
|
.example-2 .inner {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.example-2 .inner {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
.example-2::before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(255, 255, 255, 0) 0%,
|
||||||
|
rgba(102, 102, 102, 0.75) 50%,
|
||||||
|
rgba(255, 255, 255, 0) 100%
|
||||||
|
);
|
||||||
|
height: 300px;
|
||||||
|
width: 100px;
|
||||||
|
transform: translate(0);
|
||||||
|
position: absolute;
|
||||||
|
animation: rotate 5s linear forwards infinite;
|
||||||
|
z-index: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform-origin: top center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotate {
|
||||||
|
from {
|
||||||
|
transform: rotate(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,7 +18,12 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1>RetrieX KI-Agent</h1>
|
<div>
|
||||||
|
<div class="d-flex">
|
||||||
|
<img src="/assets/img/logo.png" style="max-width: 100px;">
|
||||||
|
</div>
|
||||||
|
<div class="text-info fw-bold">KI-Agent</div>
|
||||||
|
</div>
|
||||||
<div class="small">powered by mitho®</div>
|
<div class="small">powered by mitho®</div>
|
||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
<button id="clear" class="btn btn-trans">Diesen Chat löschen</button>
|
<button id="clear" class="btn btn-trans">Diesen Chat löschen</button>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ final readonly class AgentRunner
|
|||||||
- Maximal 6 Keywords, besser weniger.
|
- Maximal 6 Keywords, besser weniger.
|
||||||
- Entferne Füllwörter, Höflichkeitsformen und irrelevante Wörter.
|
- Entferne Füllwörter, Höflichkeitsformen und irrelevante Wörter.
|
||||||
- Erhalte Produktnamen, Marken, Modellnummern und zusammengesetzte Begriffe exakt, wenn sie relevant sind.
|
- 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.
|
- Trenne die Begriffe nur durch Leerzeichen.
|
||||||
|
|
||||||
Ausgabeformat:
|
Ausgabeformat:
|
||||||
@@ -114,7 +114,7 @@ final readonly class AgentRunner
|
|||||||
$knowledgeChunks = $this->retriever->retrieve($prompt);
|
$knowledgeChunks = $this->retriever->retrieve($prompt);
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
// 4) Optional commerce/shop search
|
// 4) commerce/shop search
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
|
||||||
$commerceMeta = $this->commerceIntentLite->detect($prompt);
|
$commerceMeta = $this->commerceIntentLite->detect($prompt);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ final class NdjsonHybridRetriever implements RetrieverInterface
|
|||||||
|
|
||||||
private const THRESHOLD_FLOOR = 0.83;
|
private const THRESHOLD_FLOOR = 0.83;
|
||||||
private const THRESHOLD_CEIL = 0.92;
|
private const THRESHOLD_CEIL = 0.92;
|
||||||
private const EMPTY_RRF_FALLBACK_TOPN = 5;
|
private const EMPTY_RRF_FALLBACK_TOPN = 1;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly NdjsonChunkLookup $lookup,
|
private readonly NdjsonChunkLookup $lookup,
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ final class QueryEnricher
|
|||||||
'Wasserhärte' => "Resthärte",
|
'Wasserhärte' => "Resthärte",
|
||||||
'Gerät' => 'Modell',
|
'Gerät' => 'Modell',
|
||||||
'Indikator' => 'Chemie',
|
'Indikator' => 'Chemie',
|
||||||
|
'Indikatoren' => 'Indikator',
|
||||||
'Wasserhärte-Grenzwert'=>'Resthärte',
|
'Wasserhärte-Grenzwert'=>'Resthärte',
|
||||||
'Resthärte-Grenzwert'=>'Wasserhärte'
|
'Resthärte-Grenzwert'=>'Wasserhärte'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ final class ShopwareCriteriaBuilder
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($query->searchText !== '') {
|
if ($query->searchText !== '') {
|
||||||
$criteria['term'] = $query->searchText;
|
$criteria['search'] = $query->searchText;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filters = [
|
$filters = [
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ final readonly class StoreApiClient
|
|||||||
*/
|
*/
|
||||||
public function searchProducts(array $criteria): array
|
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, [
|
$response = $this->httpClient->request('POST', $url, [
|
||||||
'headers' => [
|
'headers' => [
|
||||||
|
|||||||
@@ -18,14 +18,17 @@
|
|||||||
{# ============================= #}
|
{# ============================= #}
|
||||||
{# Top Navigation #}
|
{# Top Navigation #}
|
||||||
{# ============================= #}
|
{# ============================= #}
|
||||||
|
{% if app.user %}
|
||||||
<nav class="navbar navbar-dark bg-black border-bottom border-secondary px-3">
|
<nav class="navbar navbar-dark bg-black border-bottom border-secondary px-3">
|
||||||
<div class="navbar-brand fw-semibold text-info">
|
<div class="navbar-brand fw-semibold text-info">
|
||||||
RetrieX RAG-System
|
<div>
|
||||||
|
<img src="/assets/img/logo.png" style="max-width: 120px;">
|
||||||
|
</div>
|
||||||
|
<div class="fs-6">RAG-System</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="small">powered by mitho®</div>
|
<div class="small">powered by mitho®</div>
|
||||||
<div class="ms-auto d-flex align-items-center gap-3">
|
<div class="ms-auto d-flex align-items-center gap-3">
|
||||||
{% if app.user %}
|
|
||||||
<span class="small text-light">
|
<span class="small text-light">
|
||||||
{{ app.user.userIdentifier }}
|
{{ app.user.userIdentifier }}
|
||||||
</span>
|
</span>
|
||||||
@@ -34,10 +37,10 @@
|
|||||||
href="{{ path('admin_logout') }}">
|
href="{{ path('admin_logout') }}">
|
||||||
Logout
|
Logout
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
{% endif %}
|
||||||
{# ============================= #}
|
{# ============================= #}
|
||||||
{# Layout Container #}
|
{# Layout Container #}
|
||||||
{# ============================= #}
|
{# ============================= #}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@
|
|||||||
des aktiven Modells aus. Pro Modell kann nur eine Version aktiv sein.
|
des aktiven Modells aus. Pro Modell kann nur eine Version aktiv sein.
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<h2 class="h4 mb-4" id="agentLiveTest">KI-Agent Live-Test</h2>
|
<h3 class="h3 mb-4" id="agentLiveTest">KI-Live-Test</h3>
|
||||||
|
|
||||||
<div class="card bg-black border-secondary">
|
<div class="card bg-black border-secondary">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
|
|||||||
@@ -10,10 +10,13 @@
|
|||||||
<div class="card bg-black border-secondary text-info">
|
<div class="card bg-black border-secondary text-info">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<h1 class="h3 mb-2 text-center text-info">
|
<header class="text-center ">
|
||||||
|
<h1 class="mb-2 text-info">
|
||||||
Heyl Neomeris
|
Heyl Neomeris
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="h6 mb-2 mt-1 text-center text-info">KI/RAG System-Login</h2>
|
<img src="/assets/img/logo.png" style="max-width: 100px;">
|
||||||
|
<h2 class="h6 mb-2 mt-1 text-info">KI/RAG System-Login</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
{% if error %}
|
{% if error %}
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
|
|||||||
Reference in New Issue
Block a user