Wiki source code of Source Reliability Bundle
Version 1.1 by Robert Schaub on 2026/01/02 14:49
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = FactHarbor Source Reliability Bundle = | ||
| 2 | |||
| 3 | FactHarbor uses configurable source reliability scores to assess the credibility of sources during fact-checking. These scores come from [[Media Bias/Fact Check (MBFC)>>https://mediabiasfactcheck.com]], a scientifically validated media bias database. | ||
| 4 | |||
| 5 | == Quick Start == | ||
| 6 | |||
| 7 | === Option 1: Use Sample Bundle (50 sources) === | ||
| 8 | |||
| 9 | A sample bundle with 50 common sources is included: | ||
| 10 | |||
| 11 | {{code language="powershell"}} | ||
| 12 | # Copy sample bundle to project root | ||
| 13 | copy source-bundle-sample.json source-bundle.json | ||
| 14 | |||
| 15 | # Add to .env.local | ||
| 16 | echo FH_SOURCE_BUNDLE_PATH=./source-bundle.json >> apps\web\.env.local | ||
| 17 | {{/code}} | ||
| 18 | |||
| 19 | === Option 2: Full MBFC Database (9,500+ sources) === | ||
| 20 | |||
| 21 | For comprehensive coverage, fetch the full MBFC database via RapidAPI: | ||
| 22 | |||
| 23 | {{code language="powershell"}} | ||
| 24 | # 1. Get RapidAPI key from https://rapidapi.com/mbfcnews/api/media-bias-fact-check-ratings-api2 | ||
| 25 | |||
| 26 | # 2. Set environment variable and run loader | ||
| 27 | set RAPIDAPI_KEY=your_key_here | ||
| 28 | npx ts-node apps\web\src\lib\mbfc-loader.ts ./source-bundle.json | ||
| 29 | |||
| 30 | # 3. Configure FactHarbor to use the bundle | ||
| 31 | echo FH_SOURCE_BUNDLE_PATH=./source-bundle.json >> apps\web\.env.local | ||
| 32 | {{/code}} | ||
| 33 | |||
| 34 | == Configuration == | ||
| 35 | |||
| 36 | === Environment Variables === | ||
| 37 | |||
| 38 | |= Variable |= Description |= Default | ||
| 39 | | {{code}}FH_SOURCE_BUNDLE_PATH{{/code}} | Path to source bundle JSON file | None (no scores) | ||
| 40 | | {{code}}RAPIDAPI_KEY{{/code}} | RapidAPI key for MBFC loader | None | ||
| 41 | |||
| 42 | === Score Interpretation === | ||
| 43 | |||
| 44 | |= Score Range |= MBFC Rating |= Interpretation | ||
| 45 | | 0.90 - 0.99 | Very High | Wire services, fact-checkers (Reuters, AP, FactCheck.org) | ||
| 46 | | 0.80 - 0.89 | High | Quality journalism (BBC, NPR, Economist) | ||
| 47 | | 0.70 - 0.79 | Mostly Factual | Generally reliable with some issues | ||
| 48 | | 0.50 - 0.69 | Mixed | Verify claims independently | ||
| 49 | | 0.30 - 0.49 | Low | Unreliable, often misleading | ||
| 50 | | 0.05 - 0.29 | Very Low | Conspiracy, fake news, pseudoscience | ||
| 51 | |||
| 52 | == Bundle Format == | ||
| 53 | |||
| 54 | The source bundle is a JSON file with this structure: | ||
| 55 | |||
| 56 | {{code language="json"}} | ||
| 57 | { | ||
| 58 | "version": "1.0.0", | ||
| 59 | "generated": "2026-01-01T00:00:00.000Z", | ||
| 60 | "sourceCount": 50, | ||
| 61 | "provider": "Media Bias/Fact Check", | ||
| 62 | "providerUrl": "https://mediabiasfactcheck.com", | ||
| 63 | "sources": { | ||
| 64 | "reuters.com": 0.95, | ||
| 65 | "apnews.com": 0.95, | ||
| 66 | "bbc.com": 0.85, | ||
| 67 | "foxnews.com": 0.30 | ||
| 68 | }, | ||
| 69 | "metadata": { | ||
| 70 | "reuters.com": { | ||
| 71 | "name": "Reuters", | ||
| 72 | "factual": "very high", | ||
| 73 | "bias": "least biased" | ||
| 74 | } | ||
| 75 | } | ||
| 76 | } | ||
| 77 | {{/code}} | ||
| 78 | |||
| 79 | == Why MBFC? == | ||
| 80 | |||
| 81 | Media Bias/Fact Check was chosen because: | ||
| 82 | |||
| 83 | # **Scientifically Validated**: Studies show "almost perfect" inter-rater reliability when compared to independent fact-checking datasets | ||
| 84 | # **Comprehensive**: 9,500+ sources rated | ||
| 85 | # **Transparent Methodology**: Clear criteria for bias and factual reporting ratings | ||
| 86 | # **API Available**: Programmatic access via RapidAPI | ||
| 87 | # **Regularly Updated**: Ratings are reviewed and updated | ||
| 88 | |||
| 89 | == Design Decisions == | ||
| 90 | |||
| 91 | === No Hard-coded Defaults === | ||
| 92 | |||
| 93 | FactHarbor does **not** include hard-coded source reliability scores. All scores must come from the configured bundle. This ensures: | ||
| 94 | |||
| 95 | * **Transparency**: All scoring is traceable to the bundle | ||
| 96 | * **Configurability**: Organizations can use their own ratings | ||
| 97 | * **No Hidden Bias**: No implicit assumptions about source reliability | ||
| 98 | |||
| 99 | === Sources Without Scores === | ||
| 100 | |||
| 101 | If a source is not in the bundle, it returns {{code}}null{{/code}} (unknown reliability). The analyzer will still use the source but won't apply a reliability weight. | ||
| 102 | |||
| 103 | == Updating the Bundle == | ||
| 104 | |||
| 105 | To refresh the bundle with latest MBFC data: | ||
| 106 | |||
| 107 | {{code language="powershell"}} | ||
| 108 | set RAPIDAPI_KEY=your_key_here | ||
| 109 | npx ts-node apps\web\src\lib\mbfc-loader.ts ./source-bundle.json | ||
| 110 | {{/code}} | ||
| 111 | |||
| 112 | Consider scheduling this monthly to capture MBFC rating updates. | ||
| 113 | |||
| 114 | == References == | ||
| 115 | |||
| 116 | * [[MBFC Methodology>>https://mediabiasfactcheck.com/methodology/]] | ||
| 117 | * [[MBFC API on RapidAPI>>https://rapidapi.com/mbfcnews/api/media-bias-fact-check-ratings-api2]] | ||
| 118 | * [[Wikipedia: Media Bias/Fact Check>>https://en.wikipedia.org/wiki/Media_Bias/Fact_Check]] |