Functions
A Nyckel function is the core unit of the platform. It is more than a prediction endpoint — it is a complete, self-contained classification pipeline that combines a model, a labeled dataset, a review queue, and a continuous improvement loop, all exposed through a single stable API.
What a function does
When you invoke a function, it receives an input — an image, a text string, or a row of structured data — and returns:
- A predicted label chosen from the set of labels you have defined
- A confidence score between 0 and 1 indicating how certain the model is
Your application uses these two values to make decisions: act on high-confidence predictions automatically, route low-confidence ones for human review, or set thresholds for escalation.
The model
Every function has a model attached to it. Nyckel manages the full model lifecycle:
- Automatic selection — Nyckel evaluates multiple model architectures and selects the best one for your data type and label set.
- Automatic training — The model trains as you add labeled samples. There is no separate training step.
- Automatic updates — When you add new samples or correct predictions, the model retrains in the background without any intervention.
You do not choose a model architecture or tune hyperparameters. Nyckel handles this so accuracy improves as your dataset grows.
The data pipeline
A function maintains an active pipeline of all data flowing through it:
- Every invocation is captured and associated with its prediction and confidence score.
- Samples can be labeled or re-labeled at any time — either manually or through your application sending feedback.
- The function distinguishes between labeled samples (used for training) and unlabeled invocations (available for review and annotation).
This means your function accumulates real-world data over time, not just the examples you uploaded at setup.
Review and annotation
The Nyckel console provides a review queue for every function. From it you can:
- Browse recent predictions and their confidence scores
- Correct mislabeled predictions by assigning the right label
- Annotate unlabeled invocations to convert them into training samples
- Filter by label, confidence range, or date to focus on the most uncertain predictions
Each correction or annotation is immediately available to the next training run.
Monitoring
You can monitor function health over time:
- Accuracy — measured against your labeled samples using held-out evaluation
- Confidence distribution — see how confident the model is across recent traffic
- Label distribution — track how often each label is predicted to catch drift
If accuracy drops or confidence shifts, it is usually a signal that new samples are needed, or that the real-world data has changed since the function was trained.
Self-improvement
A Nyckel function is designed to get better as it is used:
- Your application invokes the function with real inputs.
- Predictions are captured automatically.
- You (or your users) review and correct predictions.
- Corrections become new labeled samples.
- The model retrains on the expanded dataset.
- Accuracy improves — and the cycle continues.
This feedback loop means a function trained on a small initial dataset can become significantly more accurate over weeks of production use, without any manual retraining or re-deployment.
Function types
Nyckel supports three input types. Each produces the same prediction + confidence output:
| Input type | Use for |
|---|---|
| Image | Photos, documents, frames from video |
| Text | Messages, reviews, support tickets, any string |
| Tabular | Rows of structured data with named fields |
The function type is set at creation and cannot be changed. All three types support the same labeled dataset, review, annotation, and self-improvement features described above.