Review & Content Quality Intelligence · Documentation

Architecture

Review & Content Quality Intelligence's pipeline, its owned data, the events it emits/consumes, and what is out of scope.

Review & Content Quality Intelligence
intakenormaliseLayer 1baselineLayer 2owner overlayclassifymeteredmetered · LLMdeterministic · $0
Live diagram — intake and the two rule layers are deterministic; only classify is metered (OSS qwen2.5-7b recorded at $0 in the prototype).
intake$0Layer 1$0Layer 2$0$classifymeteredCOST LEVER · rule layers pre-filter
Live diagram — the immutable baseline and owner overlay clear the obvious cases for free; only classify spends.
ASPECTCLOUD · capable readOSS · recordedBorderline promoholdauto-publishSubtle competitor digreviewerpublishedQuality / toxicity scoreidenticalidenticalMixed-language reviewclassifiednot captured - routed to a human
Live diagram — Cloud (claude-haiku-4-5) vs recorded OSS (qwen2.5-7b); the deterministic scoring and rule layers are identical in both modes.

Pipeline + stages

The classify pipeline is four stages: Intake & normalise (deterministic), Layer 1 baseline rules (deterministic, immutable), Layer 2 owner overlay (deterministic), and Classify — the one metered stage. The quality and toxicity scoring is deterministic. The owner's final approve / hold / reject is a separate, owner-gated action that publishes on approve.

Owned data + shared-core reads

The app owns the review-with-moderation entity in its demo_eco_c3_review table and reads the shared host #01 property catalog. On approve it performs the campsite-canon plain row write into the core demo_eco_review store (one published-review store — not a schema change). The data invariant holds throughout: owner writes are canonical (credential_id NULL); a viewer's writes are credential-scoped, ephemeral, and reset-clearing, and a DO-UPDATE scope guard means a viewer edit can never clobber a canonical row.

Events emitted + consumed

Moderating a review emits review.moderated on the in-process event bus (persisted to the durable event log), carrying the id, decision, and property. The upstream trigger is a guest review submission. Downstream, the property detail page and the trust/analytics surface (#13) consume the published outcome through the shared core store.

Metered AI + dual-mode, out of scope

The one metered stage (classifyReview) runs dual-mode: Cloud claude-haiku-4-5, cost-capped at $0.05 per session and fail-closed — over the cap it falls back to recorded OSS (qwen2.5-7b-instruct) at $0, which is recorded on local hardware and never fabricated. Each run writes a cost_ledger row and a demo_cache replay key (slug · stage · prompt-version · input-hash). Out of scope and clearly labelled: the classifier is a deterministic simulation in the prototype; no real PII, no real imagery, no production prompts appear anywhere. Honesty is inspector-only.

Architecture · Review & Content Quality Intelligence · Abhishek Saxena