Kategorie-Problem bei Typ String bezüglich Daten aus dem KB-System

This commit is contained in:
2026-07-29 07:59:59 +02:00
parent 12fcfe1b10
commit 6b38642ba1
10 changed files with 472 additions and 31 deletions
+5
View File
@@ -72,6 +72,7 @@ func main() {
k, err := knowledge.Load(ctx, cfg.KnowledgeDir, cfg.DataDir, o, cfg.RAGEnabled, cfg.KnowledgeAllowedSources, knowledge.ScoringConfig{
SemanticWeight: cfg.KnowledgeSemanticWeight, TitleWeight: cfg.KnowledgeTitleWeight, LexicalWeight: cfg.KnowledgeLexicalWeight, KeywordWeight: cfg.KnowledgeKeywordWeight, CategoryWeight: cfg.KnowledgeCategoryWeight,
EmbeddingProfile: embeddingProfile, EmbeddingIdentity: cfg.OllamaEmbeddingModel, ChunkWords: cfg.KnowledgeChunkWords, ChunkOverlap: cfg.KnowledgeChunkOverlapWords, MaxChunksPerDoc: cfg.KnowledgeMaxChunksPerDoc, MaxQueryChunks: cfg.KnowledgeMaxQueryChunks,
CategoryMode: cfg.KnowledgeCategoryMode, CategoryMapFile: cfg.KnowledgeCategoryMapFile, IgnoreGlobs: cfg.KnowledgeIgnoreGlobs,
})
if err != nil {
slog.Error("knowledge store initialization failed",
@@ -87,6 +88,10 @@ func main() {
slog.Error("learning store initialization failed", "error", err)
os.Exit(1)
}
stats := k.LoadStats()
if stats.IgnoredFiles > 0 || stats.UnmappedCategoryFiles > 0 {
slog.Warn("knowledge loaded with compatibility rules", "ignored_files", stats.IgnoredFiles, "unmapped_category_files", stats.UnmappedCategoryFiles, "unmapped_categories", stats.UnmappedCategories, "category_mode", cfg.KnowledgeCategoryMode)
}
m := metrics.New()
m.SetKnowledgeDocs(k.Count())
if cfg.GLPIKBEnabled {