Improve Model Performance
Improve a Kumo Relational workflow by changing one factor at a time and evaluating each configuration on the same entities, labels, and historical anchor times.
1. Define the task and ground truth
This example predicts total sales for each article_id during the seven days after an anchor time. It includes only articles with sales during the preceding seven days.
Verify that the interval boundaries match the business definition before comparing model configurations.
2. Align PQL with the evaluation population
The filter keeps the in-context population aligned with the entities used to construct labels.
3. Run a key-aligned backtest
Joining by article_id/id prevents a silent metric error when response order differs from label order. If predictions will be summed, score with prediction_statistic="mean" instead of the default median — see Prediction Results.
4. Tune one factor at a time
Compare configurations while keeping the evaluation set fixed:
- Align the PQL target and filters with the production population.
- Compare different
num_context_samplesvalues. - Test task-relevant neighborhood settings (
num_neighbors,num_hops) directly onmaterialize(). - Test
use_prediction_timeonly when calendar time can contain a useful signal. - Remove noisy columns or add well-justified relational signals.
Do not assume that a larger context or neighborhood will always improve accuracy. Measure latency, request size, and the selected task metric on representative data.
5. Report reproducible results
Record the dataset revision, entity set, anchor times, label construction, SDK and NIM versions, query, materialize/predict settings, metric, and code revision.