Skip to content

Evidence & nutrient density

Two things on this page are enforced by machines rather than promised by prose: every claim resolves to a real source, and every nutrient-density score is recomputed from its inputs at build time.

The audit that started it

Before the content pipeline existed, RAWLY's articles were generated the ordinary way. A source audit of those eight legacy articles found that the citations were not merely sloppy — they were invented:

[…] verification exposed systematic fabrication by the legacy generation: 4 hallucinated PMIDs pointing to unrelated papers, 1 nonexistent study, 1 invented author, and fabricated statistics even where a real study existed.

The failure mode worth understanding is the last clause. Where a real study existed, the numbers attached to it were still wrong:

Legacy article claimed The authority says
Citation de la O, Nutrients Nov 2024, PMID 39599604 de la O, Eur J Nutr 2022, PMID 34671828
What that PMID is an ML dietary-quality paper, unrelated the SUN cohort study actually described
Reported effect −26 % MACE, HR 0.74 (0.61–0.89) HR 0.45 (0.27–0.76), top vs bottom quintile

A reviewer checking that the PMID existed, or that the citation looked plausible, would have passed it. Both the identifier and the effect size were fabricated, in opposite directions from the truth.

What is enforced now

Every article and recipe passes a blocking gate before it ships (npm run validate:content), and the test suite encodes the invariants the audit exposed. These are verbatim test names from the suite:

  • a ref whose PMID is absent from sources[] failsno orphan proof link
  • a ref whose DOI is absent from sources[] failsDOI coverage, not just PMID
  • every claim is checked, not just the first
  • a recipe whose every ref resolves to sources[] passes
  • folder ↔ type mismatch is rejected

Current state of the repository at v0.8.0:

Signal State
Content gate recipes 7 / 7 · articles 8 / 8 — passed
Test suite 88 passed, 0 failed
Sources 16, each carrying both a PMID and a DOI

Dual identifiers are the point: a PMID and a DOI can be cross-checked against each other, and the Fact-Checker resolves both, bidirectionally, from scratch.

Nutrient density

Recipes do not assert that they are nutritious. The score is computed from USDA FoodData Central entries, using NRF9.3 — a published, peer-reviewed index (Drewnowski 2005, PMID 16210699; validated in Fulgoni et al., J Nutr 2009, PMID 19549759):

NRF9.3 = Σ min(nutrient_i / DV_i, 1)·100
       − Σ (limit_j / MRV_j)·100

per 100 kcal of the recipe.

The first sum runs over the nine nutrients to encourage, each capped at 100 % DV. The second runs over the three to limit — saturated fat, added sugars, sodium — which are uncapped. Daily Values come from the FDA 2016 final rule (21 CFR 101.9), cross-checked against fda.gov. The cap is what stops a single fortified ingredient from buying an arbitrarily high score.

The score is not forgeable

The content JSON stores the computed nutrition.density block — but the build guard recomputes the score from the stored micronutrients and rejects the file if the two disagree. A hand-edited score fails the gate.

The reconciliation gate

Micronutrients are reconstructed through an independent ingredient → FDC path, then the reconstructed macros are compared against the recipe's authored macros. Tolerance is ±10 %, gated on kcal, protein and carb.

Fat is reported but not gated, deliberately: in oil-dressed dishes, fat is dominated by discretionary added culinary oil, counted at 100 % of the stated amount — a pure-fat entry times a stated quantity, with near-zero mapping uncertainty. Gating it at ±10 % would flag a culinary convention, not a mapping error. The kcal gate backstops it anyway: a grossly wrong fat mapping would blow the energy total.

First published score

Verbatim excerpt from content/recipes/dishes/herb-roasted-chicken-thighs.json:

{
  "nrf93": 69.1,
  "kcal_basis": 972,
  "coverage": 0.96,
  "reconciliation": {
    "kcal_delta_pct": 5.9,
    "protein_delta_pct": -5.5,
    "fat_delta_pct": 20.1,
    "carb_delta_pct": 3.6,
    "passed": true
  },
  "method_version": "nrf9.3-fda2016-v1",
  "status": "published"
}

The three gated macros land within ±10 %. Fat sits at +20.1 % — reported, not gated, exactly as the rule above anticipates for a roast finished in oil.

Honest scope

Data layer shipped · first score published · non-forgeable guard active · 88 / 88 tests passing.

One recipe of seven carries a score today. The other six are unscored, not defaulted to a placeholder, and no display surface consumes the score yet — the back-fill and the UI are the next units of work.

RAWLY is informational content, not medical advice. Its authoring personas hold no professional certification; the evidence layer exists so that readers can check the sources themselves rather than trust the persona.