Skip to content
Projects

About

📰 Your personal daily news briefing agent. Reads 400+ sources overnight and sends one short, checked brief with links to your chat. Self-hosted, <$1/day. | 个人每日新闻简报助手

AI & Machine Learning

How these counts are measured

35 stars4 Forks +18 in 24h

What you can do

  • Get a morning brief you can check. factpack daily --send posts one short brief to Discord, Telegram or WhatsApp. Every story links to its sources and every number is in them.
  • Check an AI summary before you post it. factpack check draft.md -s <article-url> flags each sentence whose numbers or quotes aren't in the source.
  • Give your agent a fact-check step. The FactPack skill teaches Claude Code, Codex and other agents to run the check and fix what it flags before answering.
  • Measure a prompt or model change. Replay any frozen day through the changed pipeline and score recall, a sentence audit and a blind A/B.

Measured star growth

in 24h
+18
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

eval/README.en.md

Original

FactPack evaluation (eval)

中文 · English

Goal: every change (new clustering, a prompt edit, new sources, a different model) gets numbers you can compare, not "it feels better".

Four kinds of metric

Kind Command Needs What it measures
Deterministic metrics factpack eval metrics only digest.json single-source share, cross-day repeats, same-day duplicates, sentences removed by checks, writing-rule violations, source concentration, freshness, on-time delivery, tokens and run time
Must-cover recall factpack eval recall blind labels in eval/golden/*.json whether what really mattered that day was reported: must / should tiers, by section
Claim audit factpack eval claims-prepare → judge → claims-score network access to fetch sources whether each sentence on a card is supported by the sources that card cites
Blinded A/B factpack eval pairwise-prepare → judge → pairwise-score two versions' briefs for the same day which version is better overall; each pair is judged in both orders to cancel position bias

The "judge" step is done by a reviewer: a person, or subagents in a Claude Code session (no separate API key needed). The tools only generate self-contained task files and compute scores; reviewers write their answers to results/. eval/runs/ holds fetched article text and private brief content. It is in .gitignore; do not commit it.

Frozen input and replay

  • After the deterministic filters, factpack daily saves the day's input as data/out/<day>/pool.json.gz and the extracted article text as texts.json.gz.
  • factpack replay --date D --out eval/runs/<variant> reruns clustering → triage → editor-in-chief → full text → cards → wrap-up on that same input. It does not send, does not write to data/out and does not touch seen.sqlite. The digests it writes carry meta.replay (pool source, git revision, variant name).
  • Past days have no pool. factpack pool --date D can rebuild one from the raw fetch cache (read-only, no network), but the cache is kept for only fetch.cache_retention_days (7) days.

A standard change evaluation

# 0. Baseline = the production version's archived output on the golden days, or a replay of current main
uv run factpack replay --date 2026-11-26 --date 2026-11-29 --out eval/runs/main --label main
# 1. The changed version
uv run factpack replay --date 2026-11-26 --date 2026-11-29 --out eval/runs/variant --label "bge-m3 clustering"
# 2. Deterministic metrics + recall (keyword)
uv run factpack eval metrics eval/runs/variant --history $ARCHIVE/v3/days --out eval/runs/variant/report
uv run factpack eval recall eval/runs/variant --out eval/runs/variant/report
# 3. Recall adjudication, claim audit, blinded A/B: generate tasks → reviewers write results → score
uv run factpack eval recall eval/runs/variant --prepare eval/runs/variant/recall-adj
uv run factpack eval claims-prepare eval/runs/variant --days 2026-11-26,2026-11-29 --out eval/runs/variant/claims
uv run factpack eval pairwise-prepare --a eval/runs/main --b eval/runs/variant --out eval/runs/ab-1

Merge rule: B wins ≥ 60% of the A/B comparisons (ties excluded), and must-cover recall, the unsupported-sentence rate, unlabelled cross-day repeats and the single-source share all stay the same or improve.

Metric definitions (change this section whenever you change a definition)

  • Single-source share: cards with n_domains == 1 / all cards.
  • Cross-day repeat: a card whose title_zh has a Chinese character-bigram Jaccard ≥ 0.5 with any card from the previous 3 calendar days; counted separately depending on whether it is labelled "follow-up" (延续).
  • Same-day duplicate pairs: the number of card pairs on the same day with pairwise Jaccard ≥ 0.5.
  • Writing-rule violations: length limits come from prompts/card.md (title 30, lede 50, body 120, why 60, context 50, next 40 characters; a Chinese character counts 1, any other character 0.5). Also counted: banned stock phrases, page leftovers (URLs, "skip to main content" and the like), and the mistranslations "代币" and "特工" (crypto token and spy, used for "token" and "agent") in the AI section.
  • Late: generated_at is after 09:00 local time, or not on the day itself.
  • Must-cover recall: the share of blind-labelled events that a card on day D covers. A hit only on D-1 or D+1 is a "boundary hit" and reported separately.
  • Unsupported-sentence rate: the share of fact sentences (title, body, context, next) judged unsupported or contradicted. Cards whose source text can't be retrieved are excluded. Reviewers see article text refetched today, not the material the writer had, so this number is an upper bound on the hallucination rate.

Golden days

eval/golden/: each file is one day of blind labels (format in that directory's README). Labelers see only public material, never our briefs. reviewed: false means no human has reviewed the file yet; it counts as "silver".

Explore related projects

Loading…