> For the complete documentation index, see [llms.txt](https://trustlevel.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trustlevel.gitbook.io/knowledge-base/products/rex/methodology.md).

# Methodology

How REX scores reviewers, weights reviews, and ranks proposals — the math.

REX turns a set of community reviews into a fair, explainable proposal ranking. The guiding idea: **not every review should count equally.** Each one is weighted by how reliable the reviewer has proven to be (`Reputation`) and how relevant their expertise is to the proposal (`Expertise`) — combined as a geometric mean:

```
REX = √(Reputation × Expertise)
```

The pipeline runs in three phases. The full reference implementation lives in the repository under [`docs/fund14_analysis`](https://github.com/TrustLevel/Grant_Review_Tool/tree/main/docs/fund14_analysis).

## Phase 1 — Reviewer reputation

A reviewer's reputation `R_profile` is built from three independent components, each mapped to `[0, 1]` and combined with **equal weight** (⅓ each, dynamically renormalised when a component has no data).

**Peer reputation** — from peer assessments of the reviewer's reviews, scored on a `[−3, +3]` scale and normalised to `[0, 1]`. Raw averages are smoothed with **Bayesian shrinkage** toward a neutral prior, so a reviewer with few assessments isn't judged on thin evidence:

```
R_peer = (0.5 × 2 + s̄ × n) / (2 + n)
```

where `s̄` is the normalised mean peer score and `n` the number of assessments (prior = 0.5, prior weight = 2).

**Flag reputation** — how accurately the reviewer flags low-quality proposals, with a ramp-up so a few lucky flags don't max out the score:

```
R_flag = Precision × (1 − e^(−flags / 3))
```

**Miss reputation** — penalises missing a proposal that the community consensus later flagged as low-quality:

```
R_miss = 1 − MissRate
```

**Combined:**

```
R_profile = mean(R_peer, R_flag, R_miss)   # equal weight, renormalised over available components
```

## Phase 2 — Review-level REX

**Expertise** for a given review blends four signals — dominated by admin validation to keep it objective:

```
E = 0.20·Self + 0.50·Admin + 0.20·Confidence + 0.10·Match
```

* `Self` — self-declared expertise from onboarding
* `Admin` — admin-validated expertise (highest weight)
* `Confidence` — the reviewer's pre-review self-assessment for this proposal
* `Match` — 1 if the proposal's tags match the reviewer's interests, else 0

**REX score** — the geometric mean of reputation and expertise. Because it's multiplicative, a review scores well only when *both* are present:

```
REX = √(R_profile × E)
```

**Reliability & weight** — REX is passed through a sigmoid to produce a reliability value, which sets the review's effective weight (roughly 0.4× for weak reviewers up to 2.0× for the strongest):

```
reliability = 1 / (1 + e^(−4·(REX − 0.5)))
```

## Phase 3 — Proposal aggregation

Each proposal's reviews are aggregated in two independent channels.

**Quality channel** — weighted review scores feed a **Beta posterior**, so the result is a distribution, not a single point estimate:

```
α = α₀ + Σ wᵢqᵢ
β = β₀ + Σ wᵢ (1 − qᵢ)      # weak prior: α₀ = β₀ = 0.1
```

From the posterior we report a **quality score** (0–10) and, crucially, `p_high` — the **probability** that the proposal's true quality exceeds the funding bar (via the Beta CDF). Uncertainty is shown explicitly rather than hidden behind a fixed number.

**Risk channel** — independently tracks self-flagging (`temperatureCheck`) to catch proposals a reviewer judged low-quality regardless of their numeric score.

**Status** — combining both channels with a quorum check, each proposal is classified:

| Status   | Meaning                                                   |
| -------- | --------------------------------------------------------- |
| **HIGH** | Enough reviews, high `p_high`, low risk                   |
| **GREY** | Insufficient or conflicting evidence — needs a human look |
| **LOW**  | Low quality probability, or high risk                     |

A **disagreement** metric (weighted variance across reviews) surfaces exactly where reviewers diverge.

## Design principles

* **Quality over quantity** — a few high-reputation reviewers outperform many unverified ones.
* **Uncertainty stays visible** — decisions use probabilities and credibility intervals, not false precision.
* **Reputation is earned, not assumed** — it accrues from real review activity and improves each round.
