Update Klassifizierung - Teil 1
This commit is contained in:
+579
-143
@@ -1,188 +1,624 @@
|
||||
# Safe defaults: nothing is written until DRY_RUN=false.
|
||||
DRY_RUN=true
|
||||
LOG_LEVEL=info
|
||||
HTTP_ADDR=:8080
|
||||
DATA_DIR=./data
|
||||
###############################################################################
|
||||
# GLPI AI STACK - GEMEINSAME .ENV
|
||||
#
|
||||
# Diese Datei hat zwei Aufgaben:
|
||||
#
|
||||
# 1. Docker Compose verwendet sie zur Variablenersetzung:
|
||||
# ${KB_DATA_PATH:-./knowledge}
|
||||
# ${AGENT_PORT:-7080}
|
||||
# usw.
|
||||
#
|
||||
# 2. Der GLPI AI Agent lädt sie über:
|
||||
# env_file:
|
||||
# - .env
|
||||
#
|
||||
# Hinweise:
|
||||
# - Boolean: true | false
|
||||
# - Zeitangaben: 30s, 5m, 2h, 72h
|
||||
# - Scores: 0.0 bis 1.0
|
||||
# 0.70 = 70 %
|
||||
# - Listen: komma-separiert, möglichst ohne Leerzeichen
|
||||
#
|
||||
# relative Host-Pfade wie ./knowledge2 beziehen sich auf das Compose-Projekt.
|
||||
# Pfade innerhalb des Agent-Containers sollten absolut angegeben werden.
|
||||
###############################################################################
|
||||
|
||||
# Dashboard auth (required unless WEB_ALLOW_ANONYMOUS=true)
|
||||
WEB_USERNAME=admin
|
||||
WEB_PASSWORD=CHANGE_ME_NOW
|
||||
WEB_ALLOW_ANONYMOUS=false
|
||||
|
||||
# Optional GLPI webhook authentication.
|
||||
# Configure GLPI to send the same secret as X-Webhook-Secret if your webhook supports custom headers.
|
||||
WEBHOOK_SECRET=CHANGE_ME_WEBHOOK_SECRET
|
||||
|
||||
# GLPI 11 High-Level API / OAuth2 password grant
|
||||
GLPI_URL=https://glpi.example.org
|
||||
GLPI_API_VERSION=v2.3
|
||||
GLPI_CLIENT_ID=CHANGE_ME
|
||||
GLPI_CLIENT_SECRET=CHANGE_ME
|
||||
GLPI_USERNAME=svc-ai-agent
|
||||
GLPI_PASSWORD=CHANGE_ME
|
||||
# Required before AUTO_REPLY=true; numeric GLPI user id of svc-ai-agent.
|
||||
GLPI_AGENT_USER_ID=0
|
||||
# Keep false in production. Only useful for local test GLPI instances over plain HTTP.
|
||||
GLPI_ALLOW_INSECURE_HTTP=false
|
||||
# Fail-closed processing whitelist. GLPI status 1 is "New"; add more IDs only deliberately.
|
||||
GLPI_ALLOWED_STATUS_IDS=1
|
||||
GLPI_POLL_INTERVAL=30s
|
||||
GLPI_POLL_LIMIT=50
|
||||
# Optional server-side optimization; the agent still enforces GLPI_ALLOWED_STATUS_IDS itself.
|
||||
# Verify filter syntax against /api.php/doc on your instance when changing it.
|
||||
GLPI_TICKET_FILTER=status.id==1
|
||||
GLPI_TIMEOUT=20s
|
||||
|
||||
# Ollama
|
||||
OLLAMA_URL=http://localhost:11434
|
||||
###############################################################################
|
||||
# 01. DOCKER COMPOSE - PORTS
|
||||
###############################################################################
|
||||
# WebUI / API / Diagnose-Cockpit des GLPI AI Agents.
|
||||
# Aufruf normalerweise:
|
||||
# http://<docker-host>:7080
|
||||
AGENT_PORT=7080
|
||||
# Knowledge-Base-Suchoberfläche.
|
||||
KB_SEARCH_PORT=7081
|
||||
# Knowledge-Base-Administration.
|
||||
KB_EDITOR_PORT=7082
|
||||
###############################################################################
|
||||
# 02. DOCKER COMPOSE - GEMEINSAME DATENVERZEICHNISSE
|
||||
###############################################################################
|
||||
# Zentrale Knowledge Base auf dem Docker-Host.
|
||||
#
|
||||
# Dieses Verzeichnis wird gemeinsam verwendet von:
|
||||
# - Agent read-only
|
||||
# - KB Editor read-write
|
||||
# - KB Search read-only
|
||||
#
|
||||
# Wichtig:
|
||||
# In der compose.yml sollten ALLE drei Dienste KB_DATA_PATH verwenden.
|
||||
KB_DATA_PATH=./knowledge
|
||||
# Backups des Knowledge-Base-Editors.
|
||||
KB_BACKUP_PATH=./backups
|
||||
# Staging-Bereich für neue bzw. KI-unterstützt erzeugte KB-Artikel.
|
||||
KB_STAGING_PATH=./staging
|
||||
###############################################################################
|
||||
# 03. KNOWLEDGE-BASE WEBANWENDUNGEN
|
||||
###############################################################################
|
||||
# ---------------------------------------------------------------------------
|
||||
# KB EDITOR
|
||||
# ---------------------------------------------------------------------------
|
||||
EDITOR_TITLE=KB Administration
|
||||
EDITOR_SUBTITLE=Wissensbasis verwalten
|
||||
# Optionaler Basic-Auth-Zugang des Editors.
|
||||
#
|
||||
# Leer bedeutet je nach Anwendungskonfiguration keine Basic-Auth-Anmeldung.
|
||||
# Für produktiven Betrieb sollten Benutzername und Passwort gesetzt werden.
|
||||
EDITOR_AUTH_USER=
|
||||
EDITOR_AUTH_PASSWORD=<SECRET>
|
||||
# ---------------------------------------------------------------------------
|
||||
# KB SEARCH
|
||||
# ---------------------------------------------------------------------------
|
||||
SEARCH_TITLE=Stadt Hilden - KB-Datenbank
|
||||
SEARCH_SUBTITLE=Interne Lösungsdatenbank
|
||||
SEARCH_AUTH_USER=
|
||||
SEARCH_AUTH_PASSWORD=<SECRET>
|
||||
# Intervall, in dem die Suchanwendung die KB-Dateien erneut einliest.
|
||||
#
|
||||
# Beispiele:
|
||||
# 30s
|
||||
# 60s
|
||||
# 5m
|
||||
AUTO_RELOAD_INTERVAL=60s
|
||||
###############################################################################
|
||||
# 04. KNOWLEDGE-BASE WEBANWENDUNGEN - OLLAMA
|
||||
###############################################################################
|
||||
# KI-Fallback der KB-Anwendungen.
|
||||
#
|
||||
# HINWEIS:
|
||||
# Diese Einstellung betrifft kb-editor / kb-search.
|
||||
# Der GLPI AI Agent besitzt unabhängig davon seine eigene Ollama-Konfiguration.
|
||||
AI_FALLBACK_ENABLED=true
|
||||
# Ollama-Adresse für kb-editor / kb-search innerhalb des Compose-Netzwerks.
|
||||
#
|
||||
# Nicht mit OLLAMA_URL des Agents verwechseln.
|
||||
OLLAMA_BASE_URL=http://ollama:11434
|
||||
# Chat-Modell.
|
||||
#
|
||||
# Diese Variable wird aktuell sowohl von den KB-Anwendungen als auch vom
|
||||
# Agenten verwendet. Dadurch verwenden alle Anwendungen dasselbe Modell.
|
||||
OLLAMA_MODEL=qwen3:8b
|
||||
OLLAMA_EMBEDDING_MODEL=embeddinggemma
|
||||
# Gemeinsamer Timeout.
|
||||
OLLAMA_TIMEOUT=10m
|
||||
OLLAMA_NUM_PREDICT=768
|
||||
# Retry malformed/truncated structured JSON responses this many times.
|
||||
OLLAMA_JSON_RETRIES=1
|
||||
OLLAMA_KEEP_ALIVE=10m
|
||||
OLLAMA_THINK=false
|
||||
# Maximale parallele Ollama-Aufrufe.
|
||||
#
|
||||
# Bei einer einzelnen GPU bzw. begrenzten Ressourcen ist 1 ein guter
|
||||
# Ausgangswert.
|
||||
OLLAMA_MAX_CONCURRENT=1
|
||||
|
||||
# RAG / Knowledge
|
||||
KNOWLEDGE_DIR=./knowledge
|
||||
RAG_ENABLED=true
|
||||
# Maximum number of dynamically selected KB candidates sent to Ollama.
|
||||
KNOWLEDGE_TOP_K=6
|
||||
# Keep more candidates in the audit/dashboard than are sent to Ollama. Must be >= KNOWLEDGE_TOP_K.
|
||||
KNOWLEDGE_AUDIT_TOP_K=10
|
||||
# Only candidates within this absolute score gap of the best retrieval hit are sent to Ollama.
|
||||
# Example: best=0.78 and gap=0.20 => candidates below 0.58 are excluded (retrieval floor still applies).
|
||||
KNOWLEDGE_CANDIDATE_MAX_GAP=0.20
|
||||
# Final evidence threshold after the model has selected a KB candidate. This is not the raw retrieval score.
|
||||
KNOWLEDGE_MIN_SCORE=0.70
|
||||
# Broad-recall floor for the deterministic retrieval/ranking stage. Candidates below this never reach auto-reply.
|
||||
KNOWLEDGE_RETRIEVAL_FLOOR=0.30
|
||||
# Final evidence combines deterministic retrieval + the model's selected-KB confidence + exact ITIL-category alignment.
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_RETRIEVAL=0.45
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_AI=0.35
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_CATEGORY=0.20
|
||||
# Hybrid ranking weights. Missing metadata is not penalized; available weights are re-normalized.
|
||||
KNOWLEDGE_WEIGHT_SEMANTIC=0.45
|
||||
KNOWLEDGE_WEIGHT_TITLE=0.20
|
||||
KNOWLEDGE_WEIGHT_LEXICAL=0.20
|
||||
KNOWLEDGE_WEIGHT_KEYWORDS=0.075
|
||||
KNOWLEDGE_WEIGHT_CATEGORY=0.075
|
||||
# Soll ein vom KB-System erzeugter Staging-Artikel automatisch mit
|
||||
# auto_reply=true erzeugt werden?
|
||||
#
|
||||
# Sicherer Ausgangswert:
|
||||
# false
|
||||
OLLAMA_STAGING_AUTO_REPLY=false
|
||||
# min_score für erzeugte Staging-Artikel.
|
||||
OLLAMA_STAGING_MIN_SCORE=0.70
|
||||
###############################################################################
|
||||
# 05. GLPI AI AGENT - ALLGEMEINER BETRIEB
|
||||
###############################################################################
|
||||
# true:
|
||||
# Der Agent analysiert vollständig, schreibt aber keine Änderungen nach GLPI.
|
||||
#
|
||||
# false:
|
||||
# Durch die Policy freigegebene Aktionen werden tatsächlich ausgeführt.
|
||||
#
|
||||
# Für Tests / Einführung:
|
||||
# true
|
||||
DRY_RUN=true
|
||||
# Mögliche Werte:
|
||||
# debug
|
||||
# info
|
||||
# warn
|
||||
# error
|
||||
LOG_LEVEL=info
|
||||
# HTTP-Listener INNERHALB des Agent-Containers.
|
||||
#
|
||||
# AGENT_PORT oben bestimmt dagegen den veröffentlichten Host-Port.
|
||||
HTTP_ADDR=:7080
|
||||
# Persistentes Verzeichnis IM Container.
|
||||
#
|
||||
# Compose mountet:
|
||||
# agent-data:/app/data
|
||||
#
|
||||
# Enthält unter anderem:
|
||||
# - Knowledge-Index
|
||||
# - Audit/Run-Daten
|
||||
# - Category Learning
|
||||
# - Managed Knowledge
|
||||
# - GLPI-KB-Cache
|
||||
DATA_DIR=/app/data
|
||||
###############################################################################
|
||||
# 06. AGENT WEBUI / API / DIAGNOSE
|
||||
###############################################################################
|
||||
# Benutzer für Agent-Dashboard, Knowledge-Verwaltung und Diagnose-Cockpit.
|
||||
WEB_USERNAME=admin
|
||||
WEB_PASSWORD=<SECRET>
|
||||
# false:
|
||||
# Anmeldung erforderlich.
|
||||
#
|
||||
# true:
|
||||
# Weboberfläche ohne Authentifizierung erreichbar.
|
||||
#
|
||||
# In Produktion normalerweise false.
|
||||
WEB_ALLOW_ANONYMOUS=false
|
||||
# TrustedNet-Kennzeichnung vor automatisch ausgewählten Antworten.
|
||||
#
|
||||
# true:
|
||||
# TrustedNet-KI-Badge wird vor Anrede und Antwort eingefügt.
|
||||
#
|
||||
# false:
|
||||
# keine KI-Kennzeichnung.
|
||||
AI_CONTENT_LABEL_ENABLED=true
|
||||
###############################################################################
|
||||
# 07. OPTIONALER GLPI-WEBHOOK
|
||||
###############################################################################
|
||||
# Optionales Shared Secret für eingehende GLPI-Webhooks.
|
||||
#
|
||||
# Der Absender muss dasselbe Secret z. B. über:
|
||||
# X-Webhook-Secret
|
||||
# übertragen.
|
||||
#
|
||||
# Leer lassen, falls kein Webhook verwendet wird.
|
||||
WEBHOOK_SECRET=<SECRET>
|
||||
###############################################################################
|
||||
# 08. GLPI 11 / HIGH-LEVEL API / OAUTH2
|
||||
###############################################################################
|
||||
GLPI_URL=https://glpi.example.com
|
||||
# Verwendete GLPI High-Level API.
|
||||
GLPI_API_VERSION=v2.3
|
||||
# OAuth2 Service Account.
|
||||
GLPI_CLIENT_ID=<SECRET>
|
||||
GLPI_CLIENT_SECRET=<SECRET>
|
||||
GLPI_USERNAME=ai
|
||||
GLPI_PASSWORD=<SECRET>
|
||||
# Numerische GLPI-Benutzer-ID des Service-Accounts.
|
||||
#
|
||||
# Wird unter anderem benötigt, um Agent-Followups von menschlichen
|
||||
# Followups unterscheiden zu können.
|
||||
GLPI_AGENT_USER_ID=999
|
||||
# Nur für lokale Testsysteme ohne TLS.
|
||||
#
|
||||
# Produktion:
|
||||
# false
|
||||
GLPI_ALLOW_INSECURE_HTTP=false
|
||||
###############################################################################
|
||||
# 09. GLPI TICKET-POLLING
|
||||
###############################################################################
|
||||
# Fail-closed Whitelist erlaubter GLPI-Ticketstatus.
|
||||
#
|
||||
# Beispiel:
|
||||
# 1
|
||||
# 1,2
|
||||
#
|
||||
# Status 1 entspricht typischerweise "Neu".
|
||||
GLPI_ALLOWED_STATUS_IDS=1
|
||||
# Polling-Intervall.
|
||||
GLPI_POLL_INTERVAL=30s
|
||||
# Maximale Anzahl Tickets pro Poll.
|
||||
GLPI_POLL_LIMIT=50
|
||||
# Optionale serverseitige Vorfilterung.
|
||||
#
|
||||
# Die Agent-Policy prüft GLPI_ALLOWED_STATUS_IDS anschließend trotzdem selbst.
|
||||
#
|
||||
# Änderungen der Syntax immer gegen /api.php/doc der eigenen GLPI-Instanz
|
||||
# prüfen.
|
||||
GLPI_TICKET_FILTER=status.id==1
|
||||
# HTTP-Timeout für GLPI-Aufrufe.
|
||||
GLPI_TIMEOUT=20s
|
||||
###############################################################################
|
||||
# 10. GLPI AI AGENT - OLLAMA
|
||||
###############################################################################
|
||||
# Ollama-Adresse aus Sicht des Agent-Containers.
|
||||
OLLAMA_URL=http://ollama:11434
|
||||
# OLLAMA_MODEL ist bereits oben im gemeinsamen Compose-/Ollama-Bereich gesetzt:
|
||||
# OLLAMA_MODEL=qwen3:8b
|
||||
# Embedding-Modell für RAG.
|
||||
OLLAMA_EMBEDDING_MODEL=embeddinggemma
|
||||
# Modellspezifisches Retrieval-Prompting.
|
||||
#
|
||||
# Mögliche Werte:
|
||||
#
|
||||
# auto
|
||||
# Modell automatisch erkennen und passende Retrieval-Prompts verwenden.
|
||||
# Für embeddinggemma empfohlen.
|
||||
#
|
||||
# plain
|
||||
# keine modellspezifischen Retrieval-Prompts.
|
||||
KNOWLEDGE_EMBEDDING_PROFILE=auto
|
||||
# Long KB bodies are embedded as overlapping chunks; the best matching chunk is used.
|
||||
KNOWLEDGE_CHUNK_WORDS=160
|
||||
KNOWLEDGE_CHUNK_OVERLAP_WORDS=30
|
||||
KNOWLEDGE_MAX_CHUNKS_PER_DOC=24
|
||||
KNOWLEDGE_MAX_QUERY_CHUNKS=64
|
||||
# Persistent local index: incremental loads the last snapshot immediately and scans for changes in the background.
|
||||
KNOWLEDGE_INDEX_MODE=incremental
|
||||
# Number of texts sent per Ollama /api/embed request.
|
||||
KNOWLEDGE_EMBED_BATCH_SIZE=64
|
||||
# 0 disables recurring scans; an initial background delta scan still runs after startup in incremental mode.
|
||||
KNOWLEDGE_INDEX_SCAN_INTERVAL=5m
|
||||
CATEGORY_PROMPT_LIMIT=80
|
||||
# Fail-closed source policy. Only documents carrying one of these source labels are indexed/searched.
|
||||
KNOWLEDGE_ALLOWED_SOURCES=internal-kb,glpi-kb
|
||||
# Must be a subset of KNOWLEDGE_ALLOWED_SOURCES. Set to "none" to disable source-based auto-replies.
|
||||
KNOWLEDGE_AUTO_REPLY_SOURCES=internal-kb
|
||||
# Enables authenticated CRUD in the dashboard. Managed articles are written below DATA_DIR/knowledge-managed;
|
||||
# the static KNOWLEDGE_DIR stays read-only.
|
||||
KNOWLEDGE_WEB_EDIT_ENABLED=false
|
||||
|
||||
# Compatibility for shared KB JSON files whose `categories` contain external string labels.
|
||||
# unscoped: load the document, keep external labels, disable auto-reply while labels are unmapped.
|
||||
# skip: ignore the whole document if any external category cannot be mapped.
|
||||
# strict: fail startup on any unmapped external category.
|
||||
# OLLAMA_TIMEOUT und OLLAMA_MAX_CONCURRENT sind bereits oben gesetzt.
|
||||
# Maximale Anzahl generierter Tokens für strukturierte Antworten.
|
||||
OLLAMA_NUM_PREDICT=768
|
||||
# Wiederholungen bei fehlerhaftem / abgeschnittenem JSON.
|
||||
OLLAMA_JSON_RETRIES=1
|
||||
# Ollama-Modell nach Benutzung im Speicher halten.
|
||||
#
|
||||
# Beispiele:
|
||||
# 5m
|
||||
# 10m
|
||||
# 30m
|
||||
OLLAMA_KEEP_ALIVE=10m
|
||||
# Thinking bei unterstützten Modellen deaktivieren.
|
||||
#
|
||||
# Für strukturierte Klassifikations-/Policy-Aufgaben empfohlen.
|
||||
OLLAMA_THINK=false
|
||||
###############################################################################
|
||||
# 11. KNOWLEDGE BASE / RAG - BASIS
|
||||
###############################################################################
|
||||
# Knowledge-Verzeichnis IM Agent-Container.
|
||||
#
|
||||
# Compose sollte hierhin KB_DATA_PATH mounten:
|
||||
# ${KB_DATA_PATH:-./knowledge}:/app/knowledge:ro
|
||||
KNOWLEDGE_DIR=/app/knowledge
|
||||
# Gesamtes Retrieval-System aktivieren.
|
||||
RAG_ENABLED=true
|
||||
###############################################################################
|
||||
# 12. EXTERNE KNOWLEDGE-KATEGORIEN
|
||||
###############################################################################
|
||||
# Verhalten bei String-/Fremdkategorien, z. B.:
|
||||
#
|
||||
# "AI-Staging"
|
||||
# "Outlook"
|
||||
# "E-Mail"
|
||||
# "Signatur"
|
||||
#
|
||||
# Mögliche Werte:
|
||||
#
|
||||
# unscoped
|
||||
# Artikel bleibt nutzbar.
|
||||
# Fremdkategorien können als Retrieval-Metadaten dienen.
|
||||
#
|
||||
# skip
|
||||
# Artikel mit unbekannten Kategorien überspringen.
|
||||
#
|
||||
# strict
|
||||
# unbekannte Kategorie als Fehler behandeln.
|
||||
#
|
||||
# Für eine gemeinsam mit anderen Anwendungen verwendete KB:
|
||||
# unscoped
|
||||
KNOWLEDGE_CATEGORY_MODE=unscoped
|
||||
# Optional JSON mapping file. Recommended location in Docker: /app/data/knowledge-category-map.json
|
||||
# When KNOWLEDGE_WEB_EDIT_ENABLED=true, this file can also be maintained in the
|
||||
# authenticated web UI at /category-mappings. A missing file is treated as an
|
||||
# empty mapping and is created on the first save.
|
||||
KNOWLEDGE_CATEGORY_MAP_FILE=
|
||||
# Optional comma-separated filename globs, e.g. KB-SEC-ATTCK-*.json,legacy-*.json
|
||||
# Optionales Mapping von Fremdkategorien auf GLPI-ITIL-Kategorie-IDs.
|
||||
#
|
||||
# Beispiel knowledge-category-map.json:
|
||||
#
|
||||
# {
|
||||
# "Outlook": 12,
|
||||
# "E-Mail": 12,
|
||||
# "Active Directory": 2,
|
||||
# "Security": [20,21]
|
||||
# }
|
||||
KNOWLEDGE_CATEGORY_MAP_FILE=/app/data/knowledge-category-map.json
|
||||
# Optional bestimmte KB-Dateien ignorieren.
|
||||
#
|
||||
# Beispiele:
|
||||
# KB-SEC-ATTCK-*.json
|
||||
# legacy-*.json,external-only-*.json
|
||||
#
|
||||
# Leer:
|
||||
# keine zusätzlichen Ignore-Regeln.
|
||||
KNOWLEDGE_IGNORE_GLOBS=
|
||||
|
||||
# GLPI Knowledge Base (read-only connector). The service account's GLPI rights
|
||||
# determine which articles are visible. "auto" discovers the KnowbaseItem
|
||||
# collection route from /api.php/doc.json at runtime.
|
||||
GLPI_KB_ENABLED=false
|
||||
###############################################################################
|
||||
# 13. PERSISTENTER KNOWLEDGE-INDEX
|
||||
###############################################################################
|
||||
# Mögliche Werte:
|
||||
#
|
||||
# incremental
|
||||
# Persistent gespeicherten Index sofort verwenden.
|
||||
# Neue/geänderte Dateien anschließend inkrementell nachziehen.
|
||||
# Für Produktion empfohlen.
|
||||
#
|
||||
# rebuild
|
||||
# vollständigen Index neu erzeugen.
|
||||
#
|
||||
# readonly
|
||||
# nur bestehenden Index verwenden, keine Änderungen übernehmen.
|
||||
KNOWLEDGE_INDEX_MODE=incremental
|
||||
# Anzahl Texte pro Embedding-Batch.
|
||||
KNOWLEDGE_EMBED_BATCH_SIZE=64
|
||||
# Intervall für neue/geänderte/gelöschte Dateien.
|
||||
#
|
||||
# Beispiele:
|
||||
# 30s
|
||||
# 1m
|
||||
# 5m
|
||||
#
|
||||
# 0:
|
||||
# keinen automatischen Hintergrundscan durchführen.
|
||||
KNOWLEDGE_INDEX_SCAN_INTERVAL=5m
|
||||
###############################################################################
|
||||
# 14. RETRIEVAL / DYNAMISCHE KANDIDATENAUSWAHL
|
||||
###############################################################################
|
||||
# Unterhalb dieses Retrieval-Scores wird eine KB nicht als geeigneter
|
||||
# Kandidat betrachtet.
|
||||
#
|
||||
# Der Wert ist KEINE Wahrscheinlichkeit.
|
||||
KNOWLEDGE_RETRIEVAL_FLOOR=0.30
|
||||
# Maximale Differenz zum besten Treffer.
|
||||
#
|
||||
# Beispiel:
|
||||
#
|
||||
# bester Treffer 0.82
|
||||
# MAX_GAP 0.20
|
||||
# dynamischer Cutoff 0.62
|
||||
#
|
||||
# Ein Kandidat mit 0.55 würde dann nicht an die KI gesendet.
|
||||
KNOWLEDGE_CANDIDATE_MAX_GAP=0.20
|
||||
# Maximale Anzahl Knowledge-Kandidaten, die tatsächlich an Ollama gehen.
|
||||
KNOWLEDGE_TOP_K=6
|
||||
# Anzahl Kandidaten für Audit / Diagnose.
|
||||
#
|
||||
# Kann größer als KNOWLEDGE_TOP_K sein.
|
||||
KNOWLEDGE_AUDIT_TOP_K=10
|
||||
###############################################################################
|
||||
# 15. HYBRID-RETRIEVAL - RANKING-GEWICHTE
|
||||
###############################################################################
|
||||
# Die Werte beschreiben die Gewichtung beim KB-Ranking.
|
||||
#
|
||||
# Summe aktuell:
|
||||
# 1.0
|
||||
#
|
||||
# Fehlende Metadaten sollen nicht automatisch negativ bewertet werden.
|
||||
# Embedding-/Chunk-Semantik.
|
||||
KNOWLEDGE_WEIGHT_SEMANTIC=0.45
|
||||
# Ticket-Betreff gegenüber KB-Titel.
|
||||
KNOWLEDGE_WEIGHT_TITLE=0.20
|
||||
# Lexikalische / sprachliche Übereinstimmung.
|
||||
KNOWLEDGE_WEIGHT_LEXICAL=0.20
|
||||
# KB-Keywords.
|
||||
KNOWLEDGE_WEIGHT_KEYWORDS=0.075
|
||||
# Kategorie-/Lernsignal.
|
||||
KNOWLEDGE_WEIGHT_CATEGORY=0.075
|
||||
###############################################################################
|
||||
# 16. FINALE EVIDENZ FÜR AUTO-REPLY
|
||||
###############################################################################
|
||||
# Mindestwert der FINALEN Evidenz.
|
||||
#
|
||||
# WICHTIG:
|
||||
# Das ist nicht der reine Retrieval-Score.
|
||||
#
|
||||
# Die finale Evidenz kombiniert:
|
||||
# - Retrieval
|
||||
# - AI Confidence
|
||||
# - Kategorieübereinstimmung
|
||||
KNOWLEDGE_MIN_SCORE=0.70
|
||||
# Gewicht Retrieval.
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_RETRIEVAL=0.45
|
||||
# Gewicht KI-Auswahl / KI-Confidence.
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_AI=0.35
|
||||
# Gewicht Kategorieübereinstimmung.
|
||||
KNOWLEDGE_EVIDENCE_WEIGHT_CATEGORY=0.20
|
||||
###############################################################################
|
||||
# 17. KNOWLEDGE-CHUNKING
|
||||
###############################################################################
|
||||
# Ungefähre Anzahl Wörter pro Dokument-Chunk.
|
||||
KNOWLEDGE_CHUNK_WORDS=160
|
||||
# Überlappung benachbarter Chunks.
|
||||
KNOWLEDGE_CHUNK_OVERLAP_WORDS=30
|
||||
# Maximale Anzahl Chunks pro KB-Dokument.
|
||||
KNOWLEDGE_MAX_CHUNKS_PER_DOC=24
|
||||
# Maximale Anzahl Query-Chunks bei sehr langen Tickets.
|
||||
KNOWLEDGE_MAX_QUERY_CHUNKS=64
|
||||
# Maximale Anzahl Kategorien im Kategorie-Prompt.
|
||||
CATEGORY_PROMPT_LIMIT=80
|
||||
###############################################################################
|
||||
# 18. KNOWLEDGE-QUELLEN / TRUST POLICY
|
||||
###############################################################################
|
||||
# Quellen für normale Knowledge-Suche und mögliche Antwortkandidaten.
|
||||
# Indexiert wird die Vereinigung mit KNOWLEDGE_CATEGORY_SOURCES.
|
||||
#
|
||||
# Beispiele:
|
||||
# internal-kb
|
||||
# glpi-kb
|
||||
# runbook
|
||||
# vendor-docs
|
||||
KNOWLEDGE_ALLOWED_SOURCES=internal-kb,glpi-kb,vendor-docs,vendor-docs-ms,vendor-docs-linux,vendor-docs-sec
|
||||
# Quellen, die ausschließlich die Kategorieentscheidung unterstützen.
|
||||
# Ohne explizite Angabe wird aus Kompatibilitätsgründen KNOWLEDGE_ALLOWED_SOURCES verwendet.
|
||||
# Mit "none" wird Knowledge-Einfluss auf die Kategorisierung deaktiviert.
|
||||
KNOWLEDGE_CATEGORY_SOURCES=internal-category
|
||||
# Nur diese Quellen dürfen grundsätzlich automatische Antworten liefern.
|
||||
#
|
||||
# Muss eine Teilmenge von KNOWLEDGE_ALLOWED_SOURCES sein.
|
||||
#
|
||||
# Beispiel zum kompletten Abschalten:
|
||||
# KNOWLEDGE_AUTO_REPLY_SOURCES=none
|
||||
KNOWLEDGE_AUTO_REPLY_SOURCES=internal-kb,glpi-kb,vendor-docs,vendor-docs-ms,vendor-docs-linux,vendor-docs-sec
|
||||
# Webbasierte Bearbeitung von Agent-eigenen Knowledge-Artikeln.
|
||||
#
|
||||
# Diese werden unter:
|
||||
# DATA_DIR/knowledge-managed
|
||||
# gespeichert.
|
||||
#
|
||||
# Das statische KNOWLEDGE_DIR bleibt read-only.
|
||||
KNOWLEDGE_WEB_EDIT_ENABLED=true
|
||||
###############################################################################
|
||||
# 19. GLPI KNOWLEDGE BASE CONNECTOR
|
||||
###############################################################################
|
||||
# GLPI-interne Knowledge Base synchronisieren.
|
||||
GLPI_KB_ENABLED=true
|
||||
# auto:
|
||||
# Agent ermittelt die KnowbaseItem-Route aus /api.php/doc.json.
|
||||
GLPI_KB_PATH=auto
|
||||
# Optional GLPI high-level API filter, validated by your installed GLPI.
|
||||
# Optionaler serverseitiger GLPI-Filter.
|
||||
#
|
||||
# Leer:
|
||||
# alle für den Service Account sichtbaren Artikel, begrenzt durch LIMIT.
|
||||
GLPI_KB_FILTER=
|
||||
# Maximale Anzahl GLPI-KB-Artikel.
|
||||
GLPI_KB_LIMIT=500
|
||||
# Synchronisationsintervall.
|
||||
GLPI_KB_SYNC_INTERVAL=10m
|
||||
# source-Wert importierter GLPI-KB-Artikel.
|
||||
GLPI_KB_SOURCE=glpi-kb
|
||||
# Safe default: synchronized GLPI articles are research/RAG context only.
|
||||
GLPI_KB_AUTO_REPLY=false
|
||||
# Required when GLPI_KB_AUTO_REPLY=true. These are GLPI *Knowledge Base*
|
||||
# category IDs, not ITIL category IDs. Auto-reply is additionally disabled if
|
||||
# GLPI cannot map the KB category to an ITIL category.
|
||||
GLPI_KB_AUTO_REPLY_CATEGORY_IDS=
|
||||
|
||||
# Human-confirmed category learning. Feedback is stored in DATA_DIR/category-learning.json.
|
||||
# true:
|
||||
# GLPI-KB-Artikel können grundsätzlich Auto-Replies auslösen.
|
||||
#
|
||||
# Zusätzlich gelten weiterhin alle anderen Policy-Gates.
|
||||
GLPI_KB_AUTO_REPLY=true
|
||||
# Whitelist der GLPI KNOWLEDGE-BASE-Kategorie-IDs.
|
||||
#
|
||||
# WICHTIG:
|
||||
# Dies sind NICHT die ITIL-/Ticketkategorie-IDs.
|
||||
#
|
||||
# Mehrere Werte:
|
||||
# 1,2,7
|
||||
GLPI_KB_AUTO_REPLY_CATEGORY_IDS=1
|
||||
###############################################################################
|
||||
# 20. HUMAN-IN-THE-LOOP / KATEGORIE-LERNEN
|
||||
###############################################################################
|
||||
# Menschlich bestätigte/korrigierte Entscheidungen als Lernbeispiele verwenden.
|
||||
#
|
||||
# Der Agent lernt NICHT automatisch aus seinen eigenen unbestätigten
|
||||
# Entscheidungen.
|
||||
LEARNING_ENABLED=true
|
||||
# Maximale Anzahl gespeicherter Beispiele.
|
||||
LEARNING_MAX_EXAMPLES=500
|
||||
# Maximale Beispiele pro Kategorie im Prompt.
|
||||
LEARNING_EXAMPLES_PER_CATEGORY=5
|
||||
|
||||
# Communication policy for end-user replies. Auto-reply KB documents must carry matching metadata.
|
||||
###############################################################################
|
||||
# 21. KOMMUNIKATIONSPOLICY
|
||||
###############################################################################
|
||||
# Erwartete Sprache von Auto-Reply-KBs.
|
||||
COMMUNICATION_LANGUAGE=de-DE
|
||||
# Erwarteter Kommunikationsstil.
|
||||
COMMUNICATION_STYLE=formal
|
||||
# Wird vor die Knowledge-Antwort gesetzt.
|
||||
COMMUNICATION_SALUTATION=Guten Tag,
|
||||
# Abschluss.
|
||||
COMMUNICATION_CLOSING=Mit freundlichen Grüßen
|
||||
COMMUNICATION_SIGNATURE=IT-Service
|
||||
# Kennzeichnet automatisch vom Agenten ausgewaehlte Antworten mit dem TrustedNet-KI-Badge.
|
||||
AI_CONTENT_LABEL_ENABLED=true
|
||||
|
||||
|
||||
# Read-only operational context. These sources never receive write access.
|
||||
###############################################################################
|
||||
# 22. OPERATIONAL CONTEXT - GLOBAL
|
||||
###############################################################################
|
||||
# Globaler Schalter für zusätzliche Betriebsinformationen:
|
||||
# - Changes
|
||||
# - Major Incidents
|
||||
# - Requester-Geräte
|
||||
# - Uptime Kuma
|
||||
CONTEXT_ENABLED=true
|
||||
# Timeout für Kontextabfragen.
|
||||
CONTEXT_TIMEOUT=12s
|
||||
# Minimum deterministic token-overlap score for an incident/outage to be treated as relevant to a ticket.
|
||||
# Mindestscore, ab dem Incident/Outage als für das Ticket relevant gilt.
|
||||
CONTEXT_RELEVANCE_MIN_SCORE=0.20
|
||||
# Safe defaults: missing context or a relevant central incident suppresses automatic end-user replies.
|
||||
# true:
|
||||
# Fehler einer aktivierten Kontextquelle blockieren Auto-Reply.
|
||||
#
|
||||
# Fail-closed und für Produktion empfohlen.
|
||||
CONTEXT_BLOCK_AUTO_REPLY_ON_ERRORS=true
|
||||
# true:
|
||||
# relevante zentrale Störung blockiert individuelle Standardantwort.
|
||||
CONTEXT_BLOCK_AUTO_REPLY_ON_INCIDENT=true
|
||||
|
||||
# GLPI Change Calendar. The route is checked against /api.php/doc.json at startup.
|
||||
###############################################################################
|
||||
# 23. GLPI CHANGE CALENDAR
|
||||
###############################################################################
|
||||
CHANGE_CALENDAR_ENABLED=true
|
||||
# API-Route.
|
||||
GLPI_CHANGE_PATH=/Assistance/Change
|
||||
# Optionaler serverseitiger GLPI-Filter.
|
||||
GLPI_CHANGE_FILTER=
|
||||
# Maximale Anzahl geladener Changes.
|
||||
GLPI_CHANGE_LIMIT=100
|
||||
CHANGE_LOOKBACK=48h
|
||||
# Betrachteter Zeitraum in der Vergangenheit.
|
||||
CHANGE_LOOKBACK=72h
|
||||
# Betrachteter Zeitraum in der Zukunft.
|
||||
CHANGE_LOOKAHEAD=24h
|
||||
|
||||
# Active Major Incidents are modeled as GLPI Tickets selected by YOUR explicit filter.
|
||||
# Enable only after validating the filter against your GLPI /api.php/doc / getting-started docs.
|
||||
###############################################################################
|
||||
# 24. MAJOR INCIDENTS
|
||||
###############################################################################
|
||||
# Major Incidents über GLPI-Tickets ermitteln.
|
||||
#
|
||||
# Erst aktivieren, wenn GLPI_MAJOR_INCIDENT_FILTER getestet wurde.
|
||||
MAJOR_INCIDENTS_ENABLED=false
|
||||
# Expliziter Filter für Tickets, die als Major Incident gelten.
|
||||
GLPI_MAJOR_INCIDENT_FILTER=
|
||||
GLPI_MAJOR_INCIDENT_LIMIT=20
|
||||
|
||||
# Requester -> device context. Direct ticket-linked items are always reused; this optional lookup
|
||||
# additionally searches assigned assets for each requester extracted from the ticket response.
|
||||
###############################################################################
|
||||
# 25. REQUESTER -> GERÄT / ASSET CONTEXT
|
||||
###############################################################################
|
||||
# Zusätzlich zu direkt verknüpften Ticket-Assets Geräte des Requesters suchen.
|
||||
USER_DEVICE_CONTEXT_ENABLED=true
|
||||
# Asset-Routen.
|
||||
GLPI_USER_DEVICE_PATHS=/Assets/Computer
|
||||
# {{user_id}} wird vom Agenten ersetzt.
|
||||
GLPI_USER_DEVICE_FILTER_TEMPLATE=user.id=={{user_id}}
|
||||
# Maximale Anzahl Geräte je Suche.
|
||||
GLPI_USER_DEVICE_LIMIT=20
|
||||
|
||||
# Uptime Kuma (read-only). Recommended for internal systems: authenticated Prometheus /metrics.
|
||||
###############################################################################
|
||||
# 26. UPTIME KUMA
|
||||
###############################################################################
|
||||
# Globaler Schalter für Uptime-Kuma-Kontext.
|
||||
UPTIME_KUMA_ENABLED=false
|
||||
UPTIME_KUMA_URL=https://uptime.example.org
|
||||
# metrics | status_page
|
||||
UPTIME_KUMA_URL=https://uptime.example.com
|
||||
# Mögliche Werte:
|
||||
#
|
||||
# metrics
|
||||
# authentifizierte Prometheus-Metrics.
|
||||
#
|
||||
# status_page
|
||||
# öffentliche/publizierte Statusseiten.
|
||||
UPTIME_KUMA_MODE=metrics
|
||||
# Required in metrics mode. Uptime Kuma uses the API key as the HTTP Basic Auth password.
|
||||
UPTIME_KUMA_API_KEY=CHANGE_ME
|
||||
# Required only in status_page mode; comma-separated published Status Page slugs.
|
||||
# Nur in metrics erforderlich.
|
||||
UPTIME_KUMA_API_KEY=<SECRET>
|
||||
# Nur in status_page erforderlich.
|
||||
#
|
||||
# Mehrere Slugs:
|
||||
# it-services,network,applications
|
||||
UPTIME_KUMA_STATUS_PAGES=it-services
|
||||
UPTIME_KUMA_TIMEOUT=10s
|
||||
# Maximale Anzahl gleichzeitig berücksichtigter Probleme.
|
||||
UPTIME_KUMA_MAX_ISSUES=20
|
||||
# Maintenance ebenfalls als Kontext berücksichtigen.
|
||||
UPTIME_KUMA_INCLUDE_MAINTENANCE=true
|
||||
|
||||
# Policy gates
|
||||
###############################################################################
|
||||
# 27. POLICY-GATES
|
||||
###############################################################################
|
||||
# Automatische Kategorisierung zulassen.
|
||||
AUTO_CATEGORY=true
|
||||
AUTO_REPLY=false
|
||||
CATEGORY_CONFIDENCE=0.90
|
||||
REPLY_CONFIDENCE=0.97
|
||||
|
||||
# Automatische Antworten grundsätzlich zulassen.
|
||||
#
|
||||
# DRY_RUN=true verhindert trotzdem das tatsächliche Schreiben nach GLPI.
|
||||
AUTO_REPLY=true
|
||||
# Mindestconfidence der KI für Kategorieänderungen.
|
||||
CATEGORY_CONFIDENCE=0.70
|
||||
# Mindestconfidence der KI für Antwortauswahl.
|
||||
#
|
||||
# Dies allein reicht NICHT für Auto-Reply.
|
||||
# Zusätzlich gelten unter anderem:
|
||||
#
|
||||
# - Knowledge-Evidenz
|
||||
# - Retrieval-Regeln
|
||||
# - Source Policy
|
||||
# - KB auto_reply
|
||||
# - Kommunikationspolicy
|
||||
# - Followup-Prüfung
|
||||
# - Kontext-/Incident-Regeln
|
||||
# - zweite Followup-Prüfung unmittelbar vor dem Schreiben
|
||||
REPLY_CONFIDENCE=0.70
|
||||
###############################################################################
|
||||
# 28. WORKER / QUEUE
|
||||
###############################################################################
|
||||
# Maximale Anzahl wartender Jobs.
|
||||
QUEUE_SIZE=256
|
||||
WORKERS=2
|
||||
# Parallele Ticket-Worker.
|
||||
#
|
||||
# Darf größer als OLLAMA_MAX_CONCURRENT sein.
|
||||
# Ollama wird separat begrenzt.
|
||||
WORKERS=2
|
||||
Reference in New Issue
Block a user