feat(archivar): 200-Wort-Raumbeschreibungen für FAISS Phase-1
room-map.json v3: - Neues 'description'-Feld (~200 Wörter) für alle 4 Nicht-Catch-All-Räume - BAT-Team: Trading-Plattform, Docker, Next.js, Prisma, Wyckoff - Rocketchat-Plugin: DDP/WebSocket, Archivar, Gateway, Buttons - LAN-Dokumentation: Homelab, Proxmox, Subnetze, VLAN, pfSense - Protonbridge-Plugin: IMAP/SMTP-Proxy, Himalaya, Bridge room_map.py: - RoomEntry.description als optionales Feld (default '') - _from_dict, save, add_or_update_room, Legacy-Migration aktualisiert room_index.py: - _room_to_text(): description prioritär, theme als Fallback - Keywords weiterhin doppelt gewichtet im Embedding-Text room-map.schema.json: - description als optional string (minLength 50) - version minimum auf 3 FAISS-Neubau via is_stale() nach Version-Bump automatisch
This commit is contained in:
@@ -559,15 +559,19 @@ class RoomIndexManager:
|
||||
|
||||
@staticmethod
|
||||
def _room_to_text(entry: RoomEntry) -> str:
|
||||
"""Bildet einen Embedding-Text aus Theme + allen Keywords.
|
||||
"""Bildet einen Embedding-Text aus Description + Keywords oder Theme + Keywords.
|
||||
|
||||
Der kombinierte Text wird von der Embedding-API vektorisiert.
|
||||
Wenn eine Description vorhanden ist, wird diese mit höherer Priorität verwendet.
|
||||
Keywords werden mit höherem Gewicht dupliziert, damit sie im
|
||||
Embedding-Raum stärker repräsentiert sind.
|
||||
"""
|
||||
parts: List[str] = []
|
||||
|
||||
if entry.theme:
|
||||
# Verwende Description wenn vorhanden, sonst Theme
|
||||
if entry.description:
|
||||
parts.append(entry.description)
|
||||
elif entry.theme:
|
||||
parts.append(entry.theme)
|
||||
|
||||
# Keywords doppelt für stärkere Gewichtung im Embedding
|
||||
|
||||
Reference in New Issue
Block a user