3D Archetype-Aligned Forensic Learning Engine
causal rule alignment & mae/mfe semantic injection
Published: 2026-08-16 | Project: BayesianPivot | Discipline: Cognitive AI & Multi-Agent Swarms
Author: Nicholas Alexander MacAskill — Founder & CTO, Flocano Labs | Canonical: https://www.nicholasmacaskill.com/dossier/bp-forensic-learning-engine
1. The Short-Term Context Window Constraint
Algorithmic trading systems utilizing Large Language Models (LLMs) fundamentally struggle with historical awareness. Because context windows are limited and API calls are expensive, passing an entire database of historical trades to Gemini for every execution decision is computationally inviable. The system lacks a structural memory of why past setups succeeded or failed.
To solve this, BayesianPivot implements a 3D Archetype-Aligned Forensic Learning Engine. This architecture generates compressed semantic memories of every closed trade—capturing visual geometry, market confluence, and MAE/MFE execution quality—and selectively injects only the most relevant historical lessons into the AI validator during live evaluation.
2. Strategy Archetype Classification
Rather than querying a flat database, the engine automatically categorizes every trade into its matching execution mandate before generating its memory vector:
- Core Anchor: Low-frequency swing execution.
- Trend Expansion: High-turnover volume harvesting.
- Turtle Soup Fader: Liquidity sweep and reversal capture.
- Scalp Velocity: Rapid-scaling momentum breakouts.
By strictly bounding the semantic search to the detected archetype, the engine guarantees that the AI validator is never confused by conflicting historical rules (e.g., applying swing trading lessons to a scalping setup).
3. Forensic Generation & Prompt Injection
When a setup is flagged for evaluation, the AIValidator interrogates the SetupMemory module. The engine calculates the Causal Rule Delta—determining precisely why a historical trade won or lost relative to the established rules—and extracts the highest-fidelity few-shot examples.
These precise historical matches are injected directly into the LLM prompt. The model doesn't just evaluate the live setup; it evaluates it against a curated dataset of its own exact past mistakes and triumphs, achieving continuous, low-latency calibration without requiring daily full-weight fine-tuning.