Community Notes Documentation

repository·main·Indexed 23 days ago

https://github.com/twitter/communitynotes

An open-source project by X (formerly Twitter) providing transparency into the algorithms and data powering its community-driven fact-checking system. This repository includes the scoring algorithm, public data exports, and the template-api-note-writer package for developers using the AI Note Writer API.

Tokens
53.8K
Snippets
34
Records
150
Agent score
83%

What's inside Community Notes

  1. Use the Template API Note Writer as a starting point

    main

    The Template API Note Writer is an open-source client designed to call the AI Note Writer API and write rudimentary notes. It serves as a "hello, world" level starting point for developers looking to build or improve upon note-writing automation. It utilizes GitHub Actions and Grok to facilitate the process.

    This project is intended to be forked and used as an optional foundation to quickly get up and running with the Note Writer API.

  2. Understand Community Notes quality measures and guardrails

    main

    Community Notes uses three top-line quality metrics to monitor the health of the system. These metrics are used for monitoring and do not directly impact the status or visibility of individual notes. Evidence of systematic issues in these metrics can trigger operational responses.

    Top-line Quality Metrics

    1. Accuracy: Measured via partnerships with professional reviewers who evaluate whether 'Helpful' notes contain accurate, high-quality information.
    2. Informativeness: Measured via survey experiments in the US to see if notes help users understand the subject matter of a post compared to seeing the post without a note.
    3. Helpfulness: Measured via US user surveys to determine if notes are perceived as helpful by a wide range of people from different viewpoints, rather than just a single group.

    Additionally, the system monitors for violations of X's Rules.

  3. How sufficient agreement for media matching is determined

    main

    To prevent notes intended for a specific post from appearing on irrelevant posts with the same media, media notes require an additional layer of agreement. When rating a media note, contributors are asked if the note would be helpful if shown on all posts with matching media.

    Sufficient agreement is currently defined by two criteria using the rater factor from the model that determined the note's status (e.g., CoreModel, GroupModel01):

    1. Minimum Raters: 5+ raters with positive rater factors AND 5+ raters with negative rater factors must agree the note will be helpful on all matching posts.
    2. Agreement Percentage: 80%+ of raters from each factor must agree the note will be helpful on all matching posts.
  4. Understand the two-stage scoring architecture

    main

    The Community Notes scoring algorithm is split into two distinct binaries: prescoring and final scoring.

    In the production environment at X, these binaries are run separately and independently, each reading the most recent available input data.

    Note for exact reproduction: To exactly match production results, the prescorer should be run on input data that is approximately 1 hour older than the data used by the final scorer. While this difference has minimal impact in practice, it is a requirement for perfect parity with the production pipeline.

  5. How Note Diligence scoring identifies inaccurate notes

    main

    Note Diligence scoring identifies notes that people from different viewpoints agree may have issues with accuracy or sourcing.

    It specifically monitors the following rating tags:

    • Sources not included or unreliable
    • Sources do not support note
    • Incorrect information

    The algorithm uses a rater weight component determined via gradient descent. This component identifies and upweights raters who have a demonstrated pattern of identifying notes that are agreed upon by diverse viewpoints as having diligence issues. Notes scoring above a certain threshold are blocked from being shown on X.

  6. Understand Population Sample Filtering

    main

    To prevent self-selected raters from biasing results, the system uses ratings from users who responded to randomized notifications (the "population-sampled" group) to override default ratings if they disagree.

    Filtering Logic: If a note has at least 8 population-sampled ratings, a separate matrix factorization is run to find the population-sampled intercept $i_{n}^{pop}$. A note that was otherwise going to be Currently Rated Helpful is filtered to Needs More Ratings status if all the following conditions are met:

    1. The population-sampled intercept is significantly lower than the default intercept: $i_{n}^{pop} < i_{n} - 0.15$
    2. The population-sampled intercept is low: $i_{n}^{pop} \leq 0.3$
    3. The note has at least 8 total population-sampled ratings from raters above the helpfulness threshold, including at least two from positive factor raters ($f_{u} > 0$) and at least two from negative factor raters ($f_{u} < 0$).
  7. How Community Notes protects contributors from harassment

    main

    Safety measures to prevent harassment of contributors include:

    • Anonymity via Aliases: Contributors use auto-generated display names (aliases) that are not linked to their X accounts, allowing for private writing and rating.
    • Direct Feedback Channel: Contributors can report issues or concerns directly to the Community Notes team via DM at @CommunityNotes.
    • Content Reporting: Notes that violate X's Rules, Terms of Service, or Privacy Policy can be reported using the ••• menu on a note (selecting "Report") or via the Report a Community Note form.
  8. Understand the Community Notes data structure

    main

    The Community Notes dataset is released as a normalized collection of five separate TSV (tab-separated values) files. This structure reduces dataset size by avoiding duplication. You can join note-related tables using the noteId field to create a combined dataset containing information about users, notes, and ratings.

    The five primary datasets are:

    • Notes: A table representing all notes.
    • Ratings: A table representing all ratings.
    • Note Status History: Metadata about notes, including statuses received and timestamps.
    • User Enrollment: Metadata regarding each user's enrollment state.
    • Note Requests: A table representing all Requests for a Community Note shown to contributors.

    Important Data Retention Note: Snapshots are cumulative but only contain notes and ratings created as of 48 hours before the release time. If a note or rating is deleted, it is removed from future downloads. However, the Note Status History dataset will still contain metadata for deleted notes (including noteId, creation time, and the hashed participant ID of the author), though the actual text content of the note will no longer be available.

  9. How CRH Inertia stabilizes note status changes

    main

    To prevent notes from rapidly losing and re-acquiring "Helpful" status due to small fluctuations in the note intercept $i_n$, the algorithm employs CRH Inertia.

    A note must drop below its threshold by more than 0.01 to lose its status.

    Examples:

    • If a note became helpful with $i_n > 0.40$, it must drop to $i_n < 0.39$ to lose status.
    • If a note was impacted by the tag outlier filter and required $i_n > 0.50$, it must drop to $i_n < 0.49$ to lose status.
  10. How Community Notes manages low-quality contributions

    main

    To mitigate the impact of spam or low-quality notes/ratings, the system uses:

    • Onboarding System: New contributors must first rate existing notes to understand what constitutes a "Helpful" vs "Not Helpful" note before they are granted the ability to write new notes.
    • Writing Ability Locks: If a contributor writes too many notes that are rated as "Not Helpful" by others, their ability to write notes may be temporarily locked. They receive warnings and must repeat the rating process to regain writing privileges.
    • Rating Reputation: New accounts have lower influence in the rating system until they demonstrate a track record of helpful contributions, making it harder for spam accounts to impact the system.
  11. Understand Pseudo-rating Sensitivity Analysis

    main

    Because Matrix Factorization does not inherently estimate parameter uncertainty, the system uses Pseudo-rating Sensitivity Analysis to quantify it.

    This involves adding "extreme" ratings from "pseudo-raters" (using max/min possible rater intercepts and factors, including 0-factor raters) to measure the maximum and minimum possible values for a note's intercept and factor parameters.

    Note Status Rule: A note is assigned a Not Helpful status if the upper confidence bound (the maximum intercept value calculated after adding pseudo-ratings) is less than -0.04, in addition to standard raw intercept rules.

  12. How helpfulness is evaluated across political viewpoints

    main

    Community Notes aims to provide context that is helpful to people from diverse perspectives. The system uses two primary methods to evaluate this without letting political bias influence the note ranking algorithm:

    1. Representative Surveys: Using participants who optionally declare political leanings to understand how notes affect different groups.
    2. Viewpoint Estimation: Using anonymized, aggregate data from follow, like, and repost graphs to estimate political leanings based on network proximity to political accounts. This is used for comparative analysis of note quality and does not influence individual note decisions.