NSCT Agent a60cf21a2c feat(stage6): source independence & citation graph — detect syndication, shared origins, text similarity
- SourceIndependenceModel: per-source independence_score (0.0-1.0), syndication_group_id, primary_source_id, content_hash, shared_urls
- CitationGraphEdgeModel: directed edges (SYNDICATED, QUOTES, LINKS_TO, REPOST, SIMILAR_CONTENT) with confidence + evidence
- Content-Hash (SHA-256): instant syndication detection for identical content
- difflib Vorfilterung: >60% → LLM, >80% → high confidence, 100% → immediate syndication
- LLM-Pairwise-Analysis: two-text-comparison for suspicious pairs only (bounded concurrency)
- independence_score: 1.0 base, -0.4 for syndicated, -0.1 per high-similarity pair
- Pydantic schemas: SourceIndependenceScore, CitationGraphEdge, SyntacticSimilarityResult, LlmSyndicationAnalysis, SourceIndependenceAnalysisResult
- LLM response parser: handles JSON, markdown code blocks, partial/invalid JSON
- 43 tests: content hash, similarity thresholds, LLM parsing, analyzer integration, edge cases, prompt templates
2026-08-23 18:47:24 +00:00

============================================================

NSCT — Neutral Search Crawler Tool

============================================================

NSCT ist ein vollständig lokal betreibbares, containerisiertes Recherche- und Analyse-System. Es durchsucht Webquellen, extrahiert Inhalte, vergleicht Behauptungen (Claims) aus verschiedenen Quellen und erzeugt einen neutralen, quellengestützten Bericht.

NSCT steht für: Neutral Search Crawler Tool.

Architektur-Übersicht

┌─────────────┐    ┌──────────────┐    ┌───────────────┐
│  User / CLI  │───▶│  NSCT API    │───▶│  FastAPI /    │
│              │    │  (FastAPI)   │    │  uvicorn      │
└─────────────┘    └──────────────┘    └───────────────┘
                           │
              ┌────────────┼─────────────┐
              ▼            ▼             ▼
        ┌───────────┐ ┌─────────┐  ┌──────────┐
        │ LLM       │ │ Vision  │  │  Audio   │
        │ Provider  │ │ Model   │  │  Model   │
        └───────────┘ └─────────┘  └──────────┘
              │            │             │
              ▼            ▼             ▼
        ┌─────────────────────────────────────┐
        │   PostgreSQL (evidence store)        │
        └─────────────────────────────────────┘
              ▲
              │
        ┌──────────────┐
        │  SearXNG      │ (optional search backend)
        └──────────────┘

Quick Start

Docker Compose

# 1. Kopiere die Beispiel-Env
cp .env.example .env
# 2. Trage deine Endpunkte ein (LLM, Vision, Audio, PostgreSQL)

# 3. Starte alles
docker compose up --build

# 4. Prüfe den Health-Check
curl http://localhost:8080/health

Die API ist danach unter http://localhost:8080 erreichbar. /docs zeigt die auto-generierte Swagger-Dokumentation (nur bei NSCT_DEBUG=true).

Projektstruktur

nsct/
├── src/nsct/
│   ├── api/          # FastAPI-Routen
│   ├── models/       # Pydantic-Schemata
│   ├── providers/    # Abstrakte Provider-Interfaces
│   ├── security/     # SSRF-Schutz, URL-Validierung
│   └── storage/      # SQLAlchemy Models + Engine
├── tests/            # pytest-Tests
├── docker-compose.yml
├── Dockerfile
├── pyproject.toml
├── README.md
├── ARCHITECTURE.md
├── SECURITY.md
├── METHODOLOGY.md
├── API.md
├── DEPLOYMENT.md
└── .env.example

Status

Stage 0 — Repository und Architekturgrundlage.

Stage 0 enthält:

  • Vollständige Projektstruktur mit allen Konfigurationsdateien
  • Pydantic v2 Datenmodelle
  • SQLAlchemy 2.0 Persistenzmodelle
  • Sicherheitshards (SSRF-Schutz, IP-Blocklist)
  • Provider-Interfaces (abstrakte Basisklassen)
  • Health-, Ready- und Provider-Endpunkte
  • Strukturiertes Logging
  • Docker-Konfiguration für PostgreSQL, SearXNG und NSCT

Die eigentliche Evidence-Pipeline (Search, Fetch, Extract, Claim, Compare, Report) wird in späteren Stages implementiert.

Lizenz

MIT

Description
No description provided
Readme 1.5 MiB
Languages
Python 99.9%
Dockerfile 0.1%