Semantic Explorer

Erstellt: 2025-12-20 | Aktualisiert: 2025-12-29

Exploration und Suche in der Dokumentations-Pipeline. Zeigt hierarchische Dokumente, deren Seiten und die extrahierten Text-Chunks mit Taxonomie-Klassifizierung, Keywords und Entities.

URL/semantic-explorer
Datenbankki_content (documents, chunks)
Controller/src/Controller/SemanticExplorerController.php
Views/src/View/semantic-explorer/
Pipeline/var/www/scripts/pipeline/

Datenmodell

TabelleBeschreibungFelder
documents Quelldokumente id, filename, title, source, page_count, status, created_at
chunks Extrahierte Text-Chunks id, document_id, chunk_index, content, token_count, embedding_model, qdrant_id

Web-UI Komponenten

SeiteURLBeschreibung
Dashboard/semantic-explorerStatistiken, Top-Kategorien, neueste Chunks
Entitäten/semantic-explorer/entitaetenAlle extrahierten Entitäten
Relationen/semantic-explorer/relationenBeziehungen zwischen Entitäten
Taxonomie/semantic-explorer/taxonomieTaxonomie-Hierarchie
Ontologie/semantic-explorer/ontologieOntologie-Klassen
Chunks/semantic-explorer/chunksAlle Chunks mit Filter
Graph/semantic-explorer/graphWissens-Graph Visualisierung

Detail-Ansichten

API-Endpoints

MethodEndpointBeschreibung
GET/api/v1/explorer/statsStatistiken (Documents, Chunks, Entities)
GET/api/v1/explorer/entitiesAlle Entitäten
GET/api/v1/explorer/relationsAlle Relationen
GET/api/v1/explorer/taxonomyTaxonomie-Hierarchie
GET/api/v1/explorer/ontologyOntologie-Klassen
GET/api/v1/explorer/documentsAlle Dokumente

Chunk-Analyse

Die Pipeline extrahiert aus jedem Chunk:

HybridSearch

Die Suche kombiniert semantische Vektorsuche (Qdrant) mit Keyword-Matching (MariaDB).

API-Aufruf

# Einfache Suche
curl -X POST https://dev.campus.systemische-tools.de/api/v1/explorer/search \
  -H "Content-Type: application/json" \
  -d '{"query": "Systemische Therapie", "limit": 10}'

Response-Format

{
  "success": true,
  "data": {
    "query": "Systemische Therapie",
    "results": [
      {
        "id": 42,
        "content": "...",
        "document_title": "Handbuch",
        "score": 0.87
      }
    ],
    "count": 5
  }
}

Statistiken abrufen

curl https://dev.campus.systemische-tools.de/api/v1/explorer/stats

Response

{
  "success": true,
  "data": {
    "documents": 12,
    "chunks": {
      "total": 234,
      "tokens": 125000
    },
    "entities": 450,
    "relations": 320
  }
}

Pipeline-Integration

Die Chunks werden von der Analyse-Pipeline generiert:

  1. /var/www/scripts/pipeline/pipeline.py - Haupt-Pipeline
  2. /var/www/scripts/pipeline/step_chunk.py - Chunk-Erstellung
  3. /var/www/scripts/pipeline/step_embed.py - Embedding-Generierung
  4. /var/www/scripts/pipeline/step_semantic.py - Semantik-Analyse

Siehe: RAG-Prozess