Digital Public Good (DPG)

The Science of Prevention: PIE Architecture

The platform operates as a continuous, empirical research loop. It transforms raw field signals into standardized, structured data, combining a three-axis prevention taxonomy and an evidence-informed knowledge base with an active analytical contour designed to programmatically validate and engineer future standards for AI-assisted care.

Powered by the Prevention Intelligence Engine (PIE)—a deterministic ontology that bounds generative AI within validated prevention science, not open-ended clinical advice.

Statistical feedback loop Evidence production Three-axis taxonomy Non-clinical boundaries
The Core Mapping Engine

The Multidimensional Prevention Matrix

The PIE engine does not allow open-ended semantic drifting. Every incoming natural language token is programmatically ingested, vectorized, and forced to map onto a strict, 5D state matrix compiled directly from our production codebase (derived from WHO prevention standards).

X_STAGE_VALUES

X-Axis: Process Stages

Defines the exact operational phase of the intervention loop:

  • X1_Problem — Acute identification of friction
  • X2_Diag — Non-clinical prevention screening / structured check-up
  • X3_Goal — Setting bounded de-escalation milestones
  • X4_Action — Deploying micro-action protocols
  • X5_Eval — Automated reflection and outcome tracking
Y_LEVEL_VALUES

Y-Axis: Severity Levels

Enforces the safety perimeter and determines routing thresholds:

  • Y1_Normal — Standard age-appropriate crisis
  • Y2_Risk — Sub-clinical risk factors accumulation
  • Y3_Problem — Manifested behavioral or communication crisis
  • Y4_Crisis_Clinical — Hard boundary for human hot-routing
M_MODALITY_VALUES

M-Axis: Systemic Modalities

Categorizes the physiological or ecological origin of the stress vector:

  • M1_Biology — Age-related and neurodevelopmental shifts
  • M2_Psychophysiology — Somatic and stress-response markers
  • M3_Cognition — Internal behavioral loops, beliefs, and scripts
  • M4_Social — Micro-system dynamics (family and peer environments)
  • M5_Environment — Macro spaces (institutional and digital contexts)
Executor Roles (Target Interface)

Dynamic context filtering depending on the certified user interface: Psychologist (methodological logs), Teacher (classroom dynamics), or Administrator (macro reports).

Organizational Scale (Target Radius)

Defines the target sociological system size for the data loop: IndividualFamilyGroupCommunitySociety.

Unified Taxonomy Passport Metadata

To ensure total semantic continuity between Level 1 consumer apps and Level 2 specialist spaces, every operational session generates an isolated, non-PII cryptographic passport. This passport tracks the BEHAVIOR_DELTA (movement from baseline anomaly to target de-escalation) and evaluates context continuity across long-term logs without exposing the underlying personal narratives.

The Cognitive Core

System Prompts Architecture

We operate a fully transparent, highly deterministic prompt hierarchy. It enforces non-clinical bounds, isolates sensitive diagnostics, and steers LLMs safely through validated protocols. This entire brain structure is open for joint governance and continuous scientific review.

graph TD A[Main System Prompt
Prevention.AI / Teenology] --> B(Frontend: Specialist Terminal) A --> C(Backend: Client Apps & Core) %% Frontend Branch B --> B1(Document Architect) B --> B2(Methodological Expert) B --> B3(Case Copilot) B --> B4(Smart Fill) B1 --> B1a[IEP / MDR / Group Plans / Safety] B2 --> B2a[FBA / Profiles / Program Audit] B3 --> B3a[Quick AI Synthesis] B3 --> B3b[Role & Risk Analysis] B4 --> B4a[DAP Session Structuring] %% Backend Branch C --> C1(Client Intake & Matching) C --> C2(Diagnostic Module) C --> C3(Consultative Companions) C1 --> C1a[Intake Overrides
Moral Panic, Adoption] C1 --> C1b[Taxonomy Matching
Provider Hard Gates] C2 --> C2a[Diagnostic Axioms
PII Protection] C2 --> C2b[Deep Dive Lead
Interim Insight Generation] C2 --> C2c[Intake Summary
Evidence Synthesis] C3 --> C3a[Parent Navigator] C3 --> C3b[IDA Companion
Relationship Bridge] C3 --> C3c[Educator Companion] classDef core fill:#1e293b,stroke:#475569,stroke-width:2px,color:#fff; classDef frontend fill:#0ea5e9,stroke:#0284c7,stroke-width:2px,color:#fff; classDef backend fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff; classDef leaf fill:#0f172a,stroke:#334155,stroke-width:1px,color:#cbd5e1; class A core; class B,B1,B2,B3,B4 frontend; class C,C1,C2,C3 backend; class B1a,B2a,B3a,B3b,B4a,C1a,C1b,C2a,C2b,C2c,C3a,C3b,C3c leaf;
Frontend (Terminal) Backend (Core Engine) Actionable Prompts

Frontend Terminal Prompts

Document Architect

IEP / MDR / Plans

Generates complex individual educational prevention routes (IEP), group plans, and case reports from raw consultation metadata.

Methodological Expert

FBA & Profiles

Constructs Functional Behavioral Assessments (FBA) and psychological profiles matching student behavior with A-B-C triggers.

Case Copilot

Quick Synthesis & Risk Analysis

Analyzes roles (victim, aggressor, bystander) and computes hidden social and destructive risks on demand.

Smart Fill

DAP Session Structuring

Automatically transforms unstructured voice dictation into strict Data, Assessment, and Plan fields for professional logs.

Backend Core Prompts

Intake & Matching

Overrides & Provider Routing

Safely handles acute intake scenarios (like adoption panics) and matches conversational taxonomy with provider psychological profiles.

Diagnostic Module

Deep Dive & Intake Summary

Post-processes test results to generate one empathetic "Deep Dive" follow-up question and synthesizes PII-stripped evidence summaries.

Companions

Parent & IDA Navigators

Governs relational support logic (family vs couples). Enforces absolute neutrality, privacy shields, and routes safety hazards away from the AI.

Safety Kernel

Diagnostic Axioms

The absolute non-negotiable floor: forbids clinical diagnoses, prohibits moralizing, and mandates 112 routing for life-threatening inputs.

Operational triad

Taxonomy, knowledge, and evidence production

Three coupled layers turn everyday prevention work into standards the industry can audit—not a static expert system relocated onto an LLM.

Prevention taxonomy

A shared, deterministic language for risk factors, protective factors, and outcomes across family, specialist, and administrative layers. It bounds AI within validated behavioral standards.

Knowledge base

Evidence-informed guidance attached to concrete prevention situations in real time—the matrix is injected into the AI runtime, not left as disconnected literature.

Closed-loop architecture

Evidence production engine

The third layer closes the design: anonymized field signals are intended to refine what the platform deploys next—evidence-informed protocol updates rather than one-off guidelines (subject to pilot evaluation).

How the closed loop is designed to run

The engine above is not a separate product—it is the target pipeline connecting taxonomy coordinates to measurable protocol updates as pilots mature.

1. Edge categorization

Teenology logs and specialist intake summaries are tokenized and mapped to taxonomy coordinates at the PWA layer, with PII stripped at the edge.

2. Aggregated evaluation

Anonymized telemetry is designed to enter an isolated BigQuery research contour for risk clustering and aggregate public-health trend analysis (when enabled in pilots).

3. Protocol optimization

Verified statistical deltas adjust prompt boundaries, RAG injection, and routing—codifying benchmarks for AI-assisted psychological support.

Knowledge Base Architecture

The RAG, Prompt, and Protocol Stack

To ensure absolute safety and prevent hallucination, the AI does not operate on raw unstructured reasoning. It is bound by three layered layers of constraint and structured reference, demonstrated on the example of Teenology.

Layer 1 · System Prompt (Deterministic Perimeter)

Deterministic Role Bounding

The core instruction set permanently defines the AI's boundaries, tone, and operational limits. E.g. in Teenology, the prompt strictly defines the assistant as a supportive companion, prohibiting clinical diagnosis, psychoanalysis, or prescription of medical protocols.

Prompt Constraint Example: "You are a supportive, non-clinical communication companion for families. Do not diagnose mental health conditions. Do not perform therapy. If clinical risks emerge, activate the safety redirect protocol immediately."
Layer 2 · Semantic RAG Retrieval (Dynamic Context)

Real-time Knowledge Injection

When a user speaks, their query is converted into an embedding vector to search the isolated knowledge_base_v3 database. The matched methodological card is dynamically injected as [МЕТОДИЧЕСКИЙ КОНТЕКСТ] into the prompt. This supplies context-specific psychological methodology, entirely preventing hallucinations while keeping the chat transcript ephemeral.

RAG Mapping Example: User says: "My teenager locked themselves in their room and won't speak to me."
→ RAG fetches card kb_node: teen-isolation-room.
→ Injected Context: "Guidance: Acknowledge the need for space. Avoid yelling or breaking the door. Suggest writing a simple, non-threatening note to re-establish a low-friction bridge."
Layer 3 · Executable Protocols (The Case Sprint)

Structured Case Routing

Every conversation is driven by a finite state machine of micro-interventions (public.protocols). The AI is guided through discrete stages: mapping the issue, active de-escalation, structuring micro-actions, and tracking user outcomes. The protocol forces the model to stay on-script and focus on the user's specific progress path.

Protocol Sprint Example: X1_Problem (Identify friction) → X2_Diag (Normative check-up) → X3_Goal (Set one communication boundary) → X4_Action (Attempt the note) → X5_Eval (User rates outcome).
Operational Limits

Strict Non-Clinical Bounds: Prevention vs. Therapy

Generic LLMs fail in volatile social environments because they drift into unvalidated psychotherapeutic advice. The PIE framework enforces strict topological boundaries, operating exclusively within the domain of Primary and Secondary Public Health Prevention Science.

We do not diagnose. We de-escalate.

The system is architected to explicitly reject the clinical/psychotherapeutic paradigm. It does not treat clinical pathologies, handle deep trauma, or issue medical assessments. Instead, it acts as an immediate structural stabilizer for communication, reinforcing systemic buffers before vulnerabilities manifest as medical or behavioral crises.

Automated Crisis Routing

If natural language tokens breach deterministic thresholds (detecting clear indicators of self-harm, systemic violence, or criminal patterns), the LLM layer is bypassed entirely. The platform locks the session and triggers a hot-route handoff to geo-targeted human crisis infrastructure.

Runtime factory

The evidence factory: classifier → protocols → sprints → outcome

Above the macro research contour, Teenology already runs a closed operational loop on every paid session. Raw chat is never stored as evidence; the factory emits structured keys, protocol IDs, sprint metadata, and user-rated outcomes that can be aggregated for protocol effectiveness.

Step 1 · Classify Automatic problem classifier

Each user turn is mapped to taxonomy coordinates: problem_key, category_key, severity (Y-axis), modality hints (M-axis), and prevention direction (prevention_link). Unmatched topics stage review candidates without persisting message text.

Step 2 · Protocolize Executable protocol selection

The engine selects bounded micro-interventions from the approved public.protocols catalog for the current process stage (X1X5). Guidance is injected into the AI runtime; applied protocol IDs are logged on every assistant turn.

Step 3 · Sprint Case sprint loop

Dialogue is organized as short case sprints: discover friction → work the focus problem → contain escalation → evaluate → decide next. Each sprint carries sprint_id, focus node, and x_stage so the same taxonomy language spans turns and sessions.

Step 4 · Evaluate User outcome card

When a sprint closes, the user rates the cycle: helped / partly / did not help / felt worse, plus optional science scales (clarity, relief, next-step confidence, alliance, micro-action status). Outcomes bind to applied_protocol_ids and focus taxonomy—measuring what worked, not storing narratives.

From telemetry to evidence: Instead of collecting raw personal chats, the platform captures only anonymized event signals (such as classified problem categories, protocol steps, and user-rated sprint outcomes). These combined datapoints generate real-time statistical maps showing which prevention protocol works best for which specific issue. This approach automatically builds a comprehensive, high-integrity statistical pool for public health decision-makers—something traditional, paper-based reporting systems can never achieve.

The Future of Diagnostics

AI-Driven CAT & Shadow Scoring Roadmap

The platform is evolving beyond classical, static questionnaires. By analyzing natural conversation, we are building a continuous background diagnostic loop that scores risk factors without breaking the therapeutic flow.

Phase 1 · Intake Taxonomy Tag Picker

Immediate dialogue initiation via dynamic tagging, replacing static forms with real-time mapping of structural themes (e.g., REL_FAM, DEV_EMO).

Phase 2 · Test Banks Question Pools Architecture

Decomposing validated psychometric scales (depression, anxiety, PTSD) into atomic items enriched with IRT weights, LLM system prompts, and contextual guards.

Phase 3 · Analysis Shadow Scoring

A background AI module that parses free text and automatically maps client narratives onto diagnostic scales without explicit questioning, governed by strict context filtering.

Phase 4 · Dynamic Testing AI-Driven CAT

Computerized Adaptive Testing where the LLM organically weaves the next most statistically valuable question from the Test Bank into the natural flow of conversation.

Phase 5 · Specialist UI Diagnostic X-Ray

An interactive dashboard for specialists displaying screening probabilities (not clinical diagnoses) and anonymized conversational evidence, plus a test builder for researchers.

Phase 6 · Validation Scientific Calibration

Collecting anonymized statistics to compare AI shadow scoring with traditional forms, calibrating IRT weights to constantly improve scoring precision.

Macro Analytics

Anonymized aggregate analytics (design)

Local client-side logging (IndexedDB) and PII stripping at the edge are design choices so individual interactions can become structured research signals—not passive charts alone, but inputs to the evidence loop described above.

The target architecture routes behavioral typologies and risk-vector matrices to analytics warehouses (e.g., BigQuery) so institutions could monitor regional stress patterns at aggregate level. That governance layer is not live nationally yet; institutional pilots aim to validate the pipeline end-to-end in localized contexts.

Vector Ontological Search

We use high-throughput vector databases (Azure AI Search / Vertex AI Vector Search) to perform deterministic matching between natural language input and our fixed prevention ontologies, forcing the model to stay on-script.

Decoupled Edge Isolation

The processing architecture utilizes stateless cloud worker nodes to ensure raw text analysis remains ephemeral and completely separated from the storage layers that feed the macro research databases.

"The ultimate goal of the Prevention AI Platform is not to automate human empathy, but to construct a resilient, scalable digital infrastructure where empirical science, frontline prevention practice, and regional governance finally operate in a single, real-time data feedback loop. By turning day-to-day field activity into a structured, verifiable source of evidence, we aren't just applying existing protocols—we are validating the future standards of AI-assisted psychological care."

— Roman Dubrovsky, PhD, platform founder