Skip to content

get_learning_stats

View adaptive prediction weights for a project — the output of Layer 4 Meta-Learning.

Overview

The get_learning_stats tool returns the per-project prediction weights that Layer 4 has tuned based on observed outcomes. These weights control how the three prediction signals (temporal, causal, frequency) are blended when calculating a context's prediction_score.

Layer: Layer 4 (Meta-Learning)

Purpose: Inspect how Wake Intelligence has learned to weight predictions for a specific project


Parameters

ParameterTypeRequiredDescription
projectstringYesProject identifier to inspect

Returns

Formatted text showing the current learned weights and outcome sample count:

Learning stats for "api-service":

Temporal weight:   0.52  (default: 0.40)
Causal weight:     0.28  (default: 0.30)
Frequency weight:  0.20  (default: 0.30)

Based on 47 recorded outcomes.
Minimum outcomes for learning: 20

If fewer than 20 outcomes have been recorded, default weights are used and the response indicates this:

Learning stats for "new-project":

Using default weights (only 5 outcomes recorded; minimum: 20).

Temporal weight:   0.40  (default)
Causal weight:     0.30  (default)
Frequency weight:  0.30  (default)

What Are Prediction Weights?

Layer 3 calculates each context's prediction score using a weighted sum of three signals:

score = temporal_weight * temporal_score
      + causal_weight   * causal_score
      + frequency_weight * frequency_score

The default weights are 0.4 / 0.3 / 0.3. Layer 4 adjusts these per-project based on which signal was most accurate in predicting actual access.

Weight Constraints

  • Each weight is clamped to [0.1, 0.6] — no signal can dominate entirely or be ignored
  • Weights always sum to exactly 1.0
  • Adjustments are small (±0.05 per feedback cycle) to prevent overcorrection

Examples

Inspect a Project

typescript
get_learning_stats({ project: "authentication-service" })

Check If Learning Has Kicked In

typescript
// If outcome count < 20, learning is not active yet
get_learning_stats({ project: "new-project" });
// → "Using default weights (only 3 outcomes recorded; minimum: 20)"

Use Cases

1. Understand Prediction Bias

If predictions feel too time-biased for your project, check whether the temporal weight has grown:

typescript
get_learning_stats({ project: "my-project" });
// Temporal weight: 0.58 — temporal access patterns are dominant for this project

2. Compare Projects

Different projects develop different learning profiles:

  • Long-lived documentation projects: High frequency weight (revisited regularly)
  • Short decision sprints: High causal weight (decision chains matter)
  • Daily standup workflows: High temporal weight (recency rules)

3. Verify Learning Is Active

Before trusting prediction scores, confirm enough outcomes exist:

typescript
get_learning_stats({ project: "api-service" });
// → 47 outcomes — learning active

How Learning Accumulates

Each time a context is accessed after being predicted, Layer 4 records an outcome comparing what was predicted vs. what was actually accessed. After 20+ outcomes, it adjusts the weights toward whichever signal had better predictive accuracy.

Use update_predictions to trigger a Layer 3 score refresh after weights change:

typescript
// Refresh predictions with updated weights
update_predictions({ project: "api-service" });

See Also