Skip to main content

Préprocesseur érotétique — prétraitement formel des questions avant le moteur de réponse

Project description

Préprocesseur érotétique

Les LLM ont résolu le problème de la réponse — la capacité d'exécution est quasi-illimitée. Le goulot est désormais la question : pour la première fois dans l'histoire, l'outil dépasse structurellement la capacité de spécification de celui qui s'en sert.

Manifeste · Livre blanc

Format Fichier Statut
F1 — Positioning Statement docs/positioning-statement.md brouillon
F3 — Manifeste docs/manifeste.md brouillon
F5 — Livre blanc docs/livre-blanc.md brouillon
G0 — Ontologie erotetique/ontology/erotetique.ttl brouillon
CQ — Competency Questions erotetique/ontology/cq-erotetique.ttl brouillon

Docs inclus dans distribution. Après pip install erotetique, fichiers à: site-packages/erotetique/docs/


Architecture

ontology/erotetique.ttl          ← G0 source de vérité (dimensions, quadrants, outils, opérations)
ontology/erotetique-shapes.ttl   ← contraintes SHACL
ontology/cq-erotetique.ttl       ← 7 Competency Questions SPARQL

erotetique/
  classifier.py   ← lit quadrants depuis Turtle, classification linguistique
  soundness.py    ← extraction heuristique présupposés
  augmenter.py    ← lit dimensions depuis Turtle, génère prompt dynamique
  server.py       ← MCP JSON-RPC stdio

Invariant SDD — le code ne connaît ni les dimensions ni les quadrants. Tout est lu depuis le Turtle au runtime. Ajouter une dimension dans erotetique.ttl = elle apparaît dans l'analyse sans toucher au Python (test_sdd_acid_test le vérifie).


Installation

uv sync
uv run pytest        # 67 tests

Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json :

{
  "mcpServers": {
    "erotetique": {
      "command": "/opt/homebrew/bin/uv",
      "args": ["run", "--project", "/Users/luc/Projets/erotetique", "python", "-m", "erotetique.server"],
      "env": { "HOME": "/Users/luc" }
    }
  }
}

Usage as Python Library

Install from PyPI:

pip install erotetique

Or locally (editable mode for development):

pip install -e /path/to/erotetique

Basic usage:

from erotetique import classify_question, check_soundness, valorize_question
from pathlib import Path

# Locate ontology (installed as package data)
ontology = Path(__file__).parent / "erotetique" / "ontology" / "erotetique.ttl"

question = "Pourquoi notre chiffre d'affaires a-t-il baissé ?"

# Classify into ignorance quadrant (KK/KU/UK/UU)
result = classify_question(question, ontology)
print(f"Quadrant: {result.quadrant_label}")
print(f"Action: {result.action}")

# Check soundness and extract presuppositions
soundness = check_soundness(question)
print(f"Sound: {soundness.sound}")
for p in soundness.presuppositions[:3]:
    print(f"  • {p.text}")

# Estimate value of information (two proxies)
voi = valorize_question(question, result, ontology)
print(f"VoI score (proxy 1 — decisional sensitivity): {voi.score:.2f}")
print(f"VoI score (proxy 2 — prior entropy): {voi.proxy2_score:.2f}")
print(f"Prescribed operations: {', '.join(voi.prescribed_operations)}")

Key Types

  • ClassificationResult — quadrant URI, label, rationale, action
  • SoundnessResultsound: bool, presuppositions: list[PresuppositionCheck]
  • VoIEstimatescore: float, proxy2_score: float, prescribed_operations: list[str], rationale: str

Architecture

All logic is deterministic, LLM-free, zero network:

  • Classifier reads quadrant definitions from ontology at runtime (SDD invariant)
  • Soundness extracts presuppositions heuristically (linguistic patterns)
  • Valorizer estimates VoI via two proxies:
    • Proxy 1: Decision-marker sensitivity (choisir, sélectionner, décider keywords → VoI ↑)
    • Proxy 2: Prior entropy of answer distribution (enumerable answers → low entropy; causal questions → high entropy)

Stack

Composant Techno
Ontologie Turtle — rdflib
Validation SHACL — pyshacl
Classification Linguistique pure — re
MCP JSON-RPC stdio
LLM Claude Desktop (le client est le LLM)

Zéro clé API. Zéro base externe. Zéro dépendance réseau au runtime.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erotetique-0.2.2.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erotetique-0.2.2-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file erotetique-0.2.2.tar.gz.

File metadata

  • Download URL: erotetique-0.2.2.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for erotetique-0.2.2.tar.gz
Algorithm Hash digest
SHA256 624e16b2ae0e5a5392044d3c43fc6cec7b8a4774fcebbb2d8c5de150eea9d56f
MD5 4e41b91efe1ea4fc1bab564373d94d95
BLAKE2b-256 bdd4e6bfd36279b597dc29ba4550c38c24dc938f6aa6b23d7982e959600892fa

See more details on using hashes here.

File details

Details for the file erotetique-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: erotetique-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for erotetique-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d89f558cebd80188bb88d621f20f5dedbad8e41d7f9f3f2700651faea712fe0e
MD5 d4578b95798c7093c493c4a17b0ebc62
BLAKE2b-256 472dbbf3d2221eff3b0451d019c7842156c3aac1131024afbe53914c7bf3e994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page