Spatial Faithfulness Score (SFS) — a domain-agnostic MCP toolkit for measuring context faithfulness in RAG systems
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"sfs-mcp-toolkit","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# SFS MCP Toolkit **Spatial Faithfulness Score (SFS)** — a domain-agnostic metric and MCP server for measuring whether LLM-generated reasoning is grounded in retrieved context, not hallucinated. ## The Problem Retrieval-Augmented Generation (RAG) systems retrieve evidence and feed it to an LLM to produce grounded answers. But how do you *measure* whether the LLM actually used that evidence faithfully, or fabricated plausible-sounding numbers? Existing faithfulness metrics (RAGAS, DeepEval, etc.) rely on an LLM-as-judge approach — asking another LLM whether the output is faithful. This creates a circularity problem: you're using the same class of system to audit itself. ## The Solution: SFS SFS takes a **deterministic, evidence-grounded** approach: ``` SFS = verified_claims / total_claims ``` 1. **Extract** — Scan the LLM output for numerical assertions (prices, percentages, distances, counts, dosages, ratios, etc.) 2. **Verify** — For each claim, check whether the stated value falls within a configurable tolerance of any value in the evidence pool 3. **Score** — The ratio of verified claims to total claims gives a 0–1 faithfulness score ### Why This Works for Any RAG System The key insight is that **any RAG system that produces numerical claims can be audited this way**, regardless of domain: | Domain | Claim Types | Evidence Source | |--------|-------------|-----------------| | Property Valuation | Prices, gradients, distances | Comparable sales DB, spatial statistics | | Medical RAG | Dosages, lab values, durations | Clinical databases, drug references | | Legal RAG | Monetary amounts, durations, counts | Case law, statutory databases | | Financial Analysis | Prices, returns, ratios | Market data, financial statements | The SFS formula remains identical. Only the **extraction patterns** and **tolerance thresholds** change per domain — and these are fully configurable via `DomainConfig`. ### Advantages Over LLM-as-Judge | Property | LLM-as-Judge | SF…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.