ML Layer
AMFS Pro’s ML layer learns from your outcome data to make retrieval smarter, confidence scoring more accurate, and your agents’ decision traces exportable as fine-tuning datasets.The ML layer is a Pro-only feature. The OSS layer captures all the data — reads, writes, outcomes, causal chains — and the ML layer learns from it.
Prerequisites
- AMFS Pro MCP server running (see MCP Setup)
- Outcome data in your memory store — the ML layer trains on
commit_outcomehistory - At least 20 outcome-linked entries for learned ranking, 5 per outcome type for calibration
Learned Retrieval Ranking
The Problem
AMFS’s multi-strategy retrieval uses fixed weights (semantic: 0.4, keyword: 0.2, temporal: 0.2, confidence: 0.2) merged via Reciprocal Rank Fusion. These work well as defaults, but they can’t capture domain-specific patterns like “for this entity, recency matters more than confidence” or “entries from production agents are more reliable for deployment decisions.”How It Works
The learned ranker trains a gradient-boosted model on your outcome history:- Positive labels: entries that were read before clean deploys
- Negative labels: entries read before incidents, or entries never linked to any outcome
MemoryEntry features predict usefulness and integrates as an additional strategy in the retrieval pipeline. When trained, it automatically gets 30% weight in RRF fusion.
Via MCP
Via Python SDK
Graceful Degradation
With fewer than 20 training samples, the ranker falls back to confidence-based scoring. Theamfs_retrieve tool works identically whether a model is trained or not — the learned strategy simply receives zero weight until training completes.
Adaptive Confidence Calibration
The Problem
AMFS uses fixed outcome multipliers:
These are reasonable defaults, but the actual signal strength of each outcome type varies by domain. A P1 incident in a payment service carries different weight than a P1 in a logging service.
How It Works
The calibrator analyzes your outcome history to learn domain-specific multipliers:- Groups outcomes by type
- For each type, measures how often causally-linked entries later appear in incidents vs clean deploys
- Adjusts multipliers based on observed signal strength
- Estimates optimal decay half-life from the age distribution of actively-used entries
Via MCP
Via Python SDK
Training Data Export
The Problem
AMFS captures structured decision traces: what the agent read, what it decided, and what happened next. These traces are the exact data structure needed for fine-tuning —(context, action, reward) tuples — but they’re locked inside the memory store.
