new system rebuild command
harden IngestService
This commit is contained in:
@@ -13,7 +13,8 @@ final class KnowledgeIngestService
|
||||
private DocumentLoader $loader,
|
||||
private SimpleChunker $chunker,
|
||||
private DocumentVersionRepository $versionRepo,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,9 +40,8 @@ final class KnowledgeIngestService
|
||||
|
||||
foreach ($chunks as $chunkText) {
|
||||
|
||||
// Titel optional weiterhin prefixen (wenn du das behalten willst)
|
||||
if ($title !== '' && !str_starts_with($chunkText, $title)) {
|
||||
$chunkText = $title . "\n\n" . $chunkText;
|
||||
$chunkText = "# Produkt Titel: " . $title . "\n\n --- " . $chunkText;
|
||||
}
|
||||
|
||||
$chunkText = trim($chunkText);
|
||||
|
||||
@@ -14,7 +14,7 @@ use App\Vector\VectorSearchClient;
|
||||
|
||||
final class NdjsonHybridRetriever implements RetrieverInterface
|
||||
{
|
||||
private const VECTOR_SCORE_THRESHOLD = 0.4;
|
||||
private const VECTOR_SCORE_THRESHOLD = 0.75;
|
||||
|
||||
private const HARD_MAX_CHUNKS = 200;
|
||||
private const HARD_MAX_VECTORK = 200;
|
||||
@@ -23,7 +23,7 @@ final class NdjsonHybridRetriever implements RetrieverInterface
|
||||
* Tags dürfen nur ein kleiner Bonus sein (kein Gate/Filter).
|
||||
* Enterprise Default: klein halten, sonst dominieren Tags wieder.
|
||||
*/
|
||||
private const TAG_SCORE_BONUS = 0.08;
|
||||
private const TAG_SCORE_BONUS = 0.25;
|
||||
|
||||
public function __construct(
|
||||
private readonly NdjsonChunkLookup $lookup,
|
||||
|
||||
Reference in New Issue
Block a user