Parliament Pulse — Methodology
This page documents the classification pipeline and its thresholds, so you can judge the figures on the Overview tab for yourself. Those figures are published. Two things limit what you see there, and both are described below: an item's tone is machine-assigned and must survive review before it appears, and no average is calculated from a sample too small to mean anything.
The pipeline, step by step
- 1. Allowlisted collection. Every few hours we ingest articles from a fixed allowlist of established Kenyan outlets — the Nation, The Standard, The Star, People Daily, Citizen Digital, NTV Kenya, K24, KTN News, KBC and Business Daily — plus the official YouTube channels of those newsrooms. Nothing outside the allowlist is ever ingested; speculative blogs are permanently excluded; and extending the list is a reviewed code change, not an editor toggle.
- 2. Parliament-relevance gate. The classifier scores each item 0.0–1.0 for how much it is actually about the Parliament of Kenya. Items scoring below 0.4 are auto-rejected before anything else happens (the rejection reason is retained for audit). Items admitted from weaker collection signals are additionally held until a relevance verdict confirms them.
- 3. AI classification. Each surviving item is classified positive / neutral / negative with a score from −1.0 to +1.0 by an AI language model, instructed to handle sarcasm and mixed tone conservatively. The item also gets a subject hint (which member, Bill or institution it is mainly about).
- 4. Review, and what it excludes. A tone label is produced by a machine, so it is checked before you see it. Each item carries one of three states — approved, pending or rejected — and only approved items appear on the Overview tab or in the CSV export, or count towards any figure on it. An item still awaiting review is not shown; nor is one the review judged wrongly classified. |score| ≥ 0.5 counts as a clear read and can be approved automatically; weaker rows go to a person, so in practice a borderline item is usually one you cannot yet see. This is a check on a machine's guess about tone, not a decision about Parliament's own record — nothing on this site's record of what Parliament did depends on it.
- 5. Entity linking. Items are linked to the members, Bills and Acts they actually name, using deterministic name/title matching (no AI at this step). A link's confidence is retained alongside it.
- 6. Sample-size floor. Below 5 items no aggregate is calculated at all — no average, no distribution, no trend, no table average — and you see only the individual articles with links to their sources. Between 5 and 30 the aggregate is shown but labelled a small sample. This is a statistical rule about when a mean means anything. Unlike the review step above, it never hides an individual article from you — below the floor you still see every approved item, just no average over them.
Traceability
Every row retains its source outlet, publication date and source URL, and the Overview tab links each item back to the article it came from, so any figure here can be traced to the reporting behind it. Media tone is never written into Mzalendo's record of what Parliament did: it sits in its own store, labelled as coverage, and it never establishes a fact about a member, a Bill or a vote.
Which sources we use
The current active allowlist as configured in this system:
- Citizen Digital (News website)
- Citizen TV Kenya (YouTube channel)
- K24 TV (YouTube channel)
- KBC Channel 1 (YouTube channel)
- KTN News (YouTube channel)
- KTN News Kenya (YouTube channel)
- NTV Kenya (YouTube channel)
- Nation (News website)
- People Daily (News website)
- People Daily TV (YouTube channel)
- The Standard (News website)
- The Star (News website)
- The Star Kenya (YouTube channel)
Topics tracked
- Agriculture
- Corruption & Accountability
- Devolution
- Economy & Taxation
- Education
- Governance & Constitution
- Healthcare
- Security
What this can and cannot tell you
It can tell you how allowlisted Kenyan newsrooms have been covering Parliament and its business, and how that tone shifts over time. It cannot tell you what Kenyans think, how popular anyone is, or how a vote would go — it is not a survey, has no sampling frame, and should never be quoted as “public opinion” or “approval”. Corrections are welcome via Contact.