Skip to main content

CATS — Contextual Ambiguity & Trust Scoring

Trust intelligence for OSINT sources — not fact-checking, but source reliability over time.

CI Coverage PyPI Python 3.11+ License: MIT GDPR EU AI Act Stars


What CATS measures

CATS scores how reliable a source's behaviour has been over time — narrative consistency, sentiment volatility, publishing gaps, signs of algorithmic manipulation — not whether any single piece of content is true. It does not fact-check, does not label sources as "disinformation", and does not replace human judgement: every score is an ordinal ranking with a full explanation attached, meant to prioritise where a human looks closer.

See it run

$ COHERENCE_BACKEND=sbert cats score ansa.it --source-type news
Source     https://ansa.it   (feed: https://ansa.it/rss.xml, 28 messages, 2026-09-20 → 2026-09-21)
Score      62.87   band: medium_high
Driver     silence (share 39.8%)
Signals    coherence 20.42 · volatility 7.41 · silence 0.0 · gaming 39.0 · domain_provenance 0.0
Language   italian (1.0)      Evidence  28 ≥ 3 ✓
Note       Ordinal score, not a probability. Cross-validate key claims. See docs/architecture.md.

COHERENCE_BACKEND=sbert is not decoration: why.

Try it in 30 seconds

pip install cats-scoring
python -m spacy download it_core_news_lg   # Italian NLP model (large download), needed by `coherence`
cats score <url>                       # any source URL — feed autodiscovery included

Without the spaCy model coherence is not measured: it enters the score as a neutral 50, which can move the score by up to ~20 points. cats score then prints a warning and forces human review. If feed autodiscovery fails on a site (no RSS/Atom feed found), pass the feed URL itself, e.g. cats score https://www.repubblica.it/rss/homepage/rss2.0.xml.

To rank several sources side by side (failures are listed, not fatal):

cats compare ansa.it ilpost.it https://www.repubblica.it/rss/homepage/rss2.0.xml --source-type news
cats compare --file sources.txt --json      # one URL per line, '#' for comments

The table shows score, band, main driver, the four raw signals, message count and review flags. Compare only sources scored together, with the same --source-type and install: a high rank describes publishing behaviour, not truthfulness.

The coherence backend matters

data/calibrated_weights.json was calibrated with the SBERT coherence backend. On the default spaCy-NER backend coherence — ~0.40 of the weight for news sources — is close to inert (mean 1.7 / sd 5.3 against SBERT's 23.3 / 11.6), so a default install forfeits its contribution and lands nearer ≈0.62 concordance than the 0.750 the calibrated weights reach.

For the numbers quoted here:

pip install -r requirements-sbert.txt   # pulls torch + transformers, ~2 GB
export COHERENCE_BACKEND=sbert

It falls back to NER silently when the model is unavailable — check the logs for sbert_loaded to confirm it took effect. Measurement.

Or as a library:

from cats.lite import score_feed

result = score_feed("https://example-news-outlet.it", source_type="news")
print(result["trust_score"], result["band"])
print(result["explanation"]["primary_driver"])

Or from an LLM client such as Claude, through the MCP server (score_source, score_messages, compare_sources, explain_bands):

pip install "cats-scoring[mcp]"
claude mcp add cats -- cats-mcp

Setup and tool reference: docs/mcp.md.

Try it in the browser instead: Open In Colab

A real use case

An OSINT analyst vetting a list of public source URLs before citing them in a report runs cats score <url> on each one and reads the explanation — which signal drove the score, and why — rather than treating trust_score as a verdict. A medium or low band means "look closer, cross-validate", not "discard": CATS surfaces behavioural patterns (irregular cadence, narrative drift, a clone domain) for a human to weigh alongside the actual content. It never outputs a "disinformation" label.


Signals

Signal What it measures Method
Coherence Entity/argument consistency across messages spaCy NER + Jaccard (or optional Sentence-BERT) similarity
Volatility Abrupt narrative tone changes TextBlob (or optional BERT) sentiment spike detection
Silence Anomalous temporal gaps in publishing Gap analysis vs. source-type thresholds
Gaming Signs of algorithmic manipulation Repetition + TTR + burst + vocab diversity

On top of the four behavioural signals, an asymmetric domain-provenance penalty lowers the score of impersonation/clone domains (rare/cheap TLDs, free-hosting subdomains, brand typo-squats) when a source URL is supplied. It only ever lowers a score, never rewards a clean domain — see architecture.

Trust score bands

Score Band Recommended action
80–100 high Lower review priority; still cross-check key claims
60–79 medium_high Cross-validate key claims
40–59 medium Human review recommended
20–39 low Human review required
0–19 very_low Do not use without validation

⚠️ Scores are ordinal rankings of source reliability, not absolute probabilities. A high band means consistent publishing behaviour, not truthful content: a source that publishes disinformation on a steady schedule can still score high.


Honest limits

  • Default NLP accuracy is roughly 55–62% (spaCy NER + TextBlob); optional SBERT/BERT backends do better.
  • The default install does not reproduce the calibrated numbers: the shipped weights assume COHERENCE_BACKEND=sbert, and on the default NER backend coherence is close to inert (≈0.62 concordance instead of 0.750). See the backend note.
  • Ranking still leans heavily on one signal (silence), with coherence as the main tie-breaker.
  • The default stack is Italian-optimised — other languages are detected and flagged, not blocked, but accuracy degrades.
  • Calibration is validated on a 56-source train / 53-source future-holdout split — informative, not large-scale.
  • Fewer than 3 messages: read evidence, not the score. With a single message coherence has nothing to compare and returns 100 (at zero confidence), so a one-item or long-dead feed can show a high band. CATS flags these cases (evidence.sufficient: false, review forced), but the score itself is not lowered until the next recalibration cycle. In a probe over 852 catalogue feeds, all 6 high results were one-message feeds.
  • Scores are ordinal, not probabilities, and are not a substitute for human review.

Full detail, numbers and the validation history: docs/architecture.md and the calibration findings.


Full deployment

Beyond the zero-infrastructure library, CATS also ships a full multi-tenant FastAPI service — PostgreSQL-backed audit logging, Redis rate limiting, batch scoring, and a GDPR Art. 13–22 contest/appeal flow — behind the same four signals and the same guarantees. See docs/api.md for the REST reference and docs/architecture.md for the deployment topology and security design.


Documentation

Document Description
docs/README.md Full documentation index, organised by topic
docs/architecture.md Signal algorithms, weight matrix, security design
docs/api.md Full REST API reference
docs/mcp.md MCP server for LLM clients: setup and tools
docs/calibration.md Empirical weight calibration (genetic search)
docs/compliance.md GDPR + EU AI Act compliance

Roadmap

CATS has shipped through v1.11 (calibrated weights, the domain-provenance penalty, the language/evidence guardrails, the CLI with cats compare, the MCP server and SSRF-safe feed fetching, then feed discovery on HTML "RSS" pages, the stale-feed flag and multi-worker deployment, then the Python 3.15 image and the data-rights drafts); active work is on adoption (a public demo, first users, human labels) before any further signal changes. Full plan: docs/piano_sviluppo_roadmap_2026-09.md.


Contributing

Issues and PRs are welcome — see CONTRIBUTING.md for the dev setup, code standards, and the checklist for adding a new signal. Please also read the Code of Conduct.

If CATS is useful to you, consider starring the repo ⭐ — it helps others doing OSINT/disinformation work find it.

Star history

License

Code: MIT. Security reports: see SECURITY.md.

Data: the MIT License does not cover the data files. The RSS texts in data/ belong to their publishers. See DATA_LICENSE (draft, pending legal review) and NOTICE.md for third-party attributions.

Metadata

Release files for cats-scoring 1.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cats-scoring 1.11.0
File Size Uploaded Provenance Actions
cats_scoring-1.11.0.tar.gz 96.8 kB With provenance Details for cats_scoring-1.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cats-scoring 1.11.0
File Interpreter ABI Platform Actions
cats_scoring-1.11.0-py3-none-any.whl Python 3 none any Details for cats_scoring-1.11.0-py3-none-any.whl

Total release size: 210.2 kB

Release files / cats_scoring-1.11.0.tar.gz

Download URL cats_scoring-1.11.0.tar.gz
Size 96.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1cc977c7589b443bb121593c5d1e1d4ec3f106b8b0ea9f626f180fc53e894555
BLAKE2b-256 checksum
How to use checksums
283e186e1623bd0d1efc6542cf0899535ded0bad2c8d77ef8430b4f460e68082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / cats_scoring-1.11.0-py3-none-any.whl

Download URL cats_scoring-1.11.0-py3-none-any.whl
Size 113.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8632f10c3cef994d35a334aadf6735759f2de6e21f2044221e220ec960093f86
BLAKE2b-256 checksum
How to use checksums
a219372d54bfd5d60a9127c5f77a3bfd688f93db0f2bac1d34463d6bdce1021a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for cats-scoring 1.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cats_scoring-1.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page