GenesisAeon Package 41 — hallucination resilience mapping for LLM semantic paths (scope-resilience)
Project description
scope-resilience — P41
Hallucination resilience mapping for LLM semantic paths GenesisAeon Package 41 · MOR Research Collective · Johann Römer
What is Ρ_sem?
scope-resilience extends genesis-scope with a formal pre-flight hallucination risk assessment for LLMs: before initialising a model on a semantic topic path, compute how resilient that path is against semantic drift.
Ρ_sem(P, t) = r_sem · tanh²(σ · Γ_sem(P))
· (1 − Γ_sem(P)/Γ_max)
· (1 − |dΓ_sem/dt| / Γ̇_critical)
This is the same UTAC fixpoint-resilience formalism as resilience-core (P40), applied to a new domain: instead of physical tipping systems (AMOC, Arctic ice), the "system" is an LLM's coherence on a semantic path, and Γ_sem is derived from a CREP tensor over that path's Sigillin anchors and Q4 transitions.
| Factor | Meaning |
|---|---|
r_sem |
Domain-specific self-correction rate — the one free parameter per knowledge domain |
tanh²(σ·Γ_sem) |
Intrinsic pull toward the semantic coherence attractor |
1 − Γ_sem/Γ_max |
Criticality margin before the path nears a semantic phase boundary |
1 − |dΓ_sem/dt| / Γ̇_critical |
Live drift penalty — punishes paths that are destabilising in real time |
Ρ_sem → 0 means the path is near a semantic phase boundary and actively drifting — the regime where hallucination risk is highest and LLM initialisation should be avoided.
Installation
pip install scope-resilience
# or with the MCP server
pip install "scope-resilience[mcp]"
Quick Start
from scope_resilience import ScopeResilience
sr = ScopeResilience(domain="physics_dense")
result = sr.run_cycle(
topic="AMOC tipping point",
sigillin_ids=["s1", "s2", "s3"],
q4_transitions=[("s1", "s2"), ("s2", "s3")],
)
print(result["rho_sem"], result["risk_level"])
# Best available semantic path for a topic, with a minimum resilience bar
path = sr.get_semantic_path("AMOC tipping point", min_rho=0.4)
print(path.risk_level, path.grounding_recommendations)
# Export as llms.txt for system-prompt injection
print(sr.to_llms_txt())
CLI equivalent:
scope-resilience assess "AMOC tipping point" --domain physics_dense
scope-resilience path "AMOC tipping point" --min-rho 0.4
scope-resilience export-llms-txt "AMOC tipping point"
Risk Levels
| Ρ_sem range | Level | Meaning |
|---|---|---|
| 0.70 – 1.00 | safe |
Path is semantically stable. Proceed. |
| 0.40 – 0.70 | moderate |
Moderate drift risk. Inject grounding anchors. |
| 0.10 – 0.40 | high_risk |
High hallucination risk. Consider an alternative path. |
| 0.00 – 0.10 | critical |
Near a semantic phase boundary. Do not initialise on this path. |
When risk rises, GroundingRecommender suggests concrete mitigations: injecting Sigillin anchors, pulling in cross-domain grounding from high-resilience domains (quantum-genesis, sandpile-utac), or switching to an alternative path entirely.
Domain Calibration
r_sem is the only free parameter per knowledge domain. Structural values (σ, σ_Φ, Γ_max, Γ̇_critical) are universal and shared with resilience-core.
| Domain | r_sem | Status | Source |
|---|---|---|---|
curated_graph |
0.90 | estimate | pending TIP/P49 |
physics_dense |
0.80 | estimate | pending TIP/P49 |
quantum |
0.85 | estimate | quantum-genesis analogy (Γ=0.050, Ρ≈0.90) |
oceanography |
0.75 | estimate | AMOC-UTAC analogy |
general |
0.50 | conservative_default | theoretical midpoint |
sparse_fringe |
0.30 | estimate | pending TIP/P49 |
All r_sem values are provisional. They hold as a pre-registered hypothesis until the TIP/P49 calibration effort delivers ≥30 real perturbation-pair measurements per domain. SemanticCREP.get_domain_r() raises a UserWarning on every use of an uncalibrated domain so this is never silently forgotten. Once real data lands, SemanticCREP.calibrate_r(rho_observed, gamma) recomputes r_sem from measured Ρ and Γ using the same closed-form inversion resilience-core uses for physical domains.
Diamond Interface
ScopeResilience implements all 6 GenesisAeon Diamond methods:
sr.run_cycle(topic, sigillin_ids, q4_transitions) # Method 1: execute one step
sr.get_crep_state() # Method 2: CREP snapshot {C, R, E, P, Gamma}
sr.get_utac_state() # Method 3: UTAC snapshot {H, H_star, K_eff}
sr.get_phase_events() # Method 4: hallucination-risk events
sr.to_zenodo_record() # Method 5: Zenodo deposition metadata
sr.get_resilience_state() # Method 6 (NEW): full Ρ_sem breakdown
get_resilience_state() is the same 6th Diamond method introduced by resilience-core — here it returns rho_sem, gamma_sem, risk_level, live drift rate, a re-grounding flag, and grounding recommendations.
MCP Server
With the mcp extra installed, scope-resilience exposes its risk assessment as MCP tools for Claude Code / Claude Desktop:
pip install "scope-resilience[mcp]"
scope-resilience serve --port 8765
Tools exposed: get_semantic_path, assess_hallucination_risk, export_llms_txt, list_domain_resilience.
llms.txt Export
scope-resilience ships the first GenesisAeon implementation of llms.txt export — a machine-readable knowledge-space summary (analogous to robots.txt) listing a path's Sigillin anchors, Q4 transitions, CREP breakdown, and grounding recommendations, suitable for direct system-prompt injection.
Structure
scope_resilience/
├── constants.py # σ, σ_Φ, Γ_max, Γ̇_critical, DOMAIN_CONFIG, RISK_LEVELS
├── domain_profile.py # DomainProfile — r_sem fingerprint per domain
├── semantic_crep.py # SemanticCREP — CREP tensor + Γ_sem for a path
├── semantic_utac.py # SemanticUTAC — H_sem attractor mapping
├── hallucination_risk.py # HallucinationRisk — Ρ_sem + risk classification
├── path_monitor.py # PathDriftMonitor — sliding-window dΓ_sem/dt
├── grounding.py # GroundingRecommender — mitigation suggestions
├── llms_txt.py # LLMSTxtExporter — llms.txt export
├── mcp_server.py # Optional FastMCP server (requires [mcp] extra)
├── system.py # ScopeResilience — Diamond Interface main class
└── _cli.py # Typer CLI (assess / path / export-llms-txt / serve)
Citation
@software{romer2026scoperesilience,
author = {Römer, Johann},
title = {scope-resilience: Hallucination resilience mapping for LLM semantic paths},
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.XXXXXXX},
url = {https://github.com/GenesisAeon/scope-resilience}
}
Part of the GenesisAeon ecosystem · related: diamond-setup (P-INFRA-1), resilience-core (P40), genesis-scope
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scope_resilience-1.0.0.tar.gz.
File metadata
- Download URL: scope_resilience-1.0.0.tar.gz
- Upload date:
- Size: 102.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05fc4c4b435489cad93442447c8545f977171c1c13fcfcfff13d9065fe069f26
|
|
| MD5 |
7fffad500c0c6e904a26be320c9313be
|
|
| BLAKE2b-256 |
1a9127cdbed30a16287f8fd4b498d46e52decc924f5a6371302ebd09e33d7b4b
|
File details
Details for the file scope_resilience-1.0.0-py3-none-any.whl.
File metadata
- Download URL: scope_resilience-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae6d00e49b9e2d967031a600d9b2b51da2688f13f0fbfb40c947e7d5ab1cdcc0
|
|
| MD5 |
c52039e2357b2152d2a54aecad2f47f2
|
|
| BLAKE2b-256 |
ea697cae626649f4ad43ffcff14b2c3ad8e78e555200970730da04563cedba3f
|