How N-Shot Works
Omega is an encoder: it turns a window of sensor readings into a fixed-size embedding vector via a single Direct Query call. Windows that represent similar physical behavior land close together in embedding space, which makes classification a nearest-neighbor problem:- Build the reference library — for each class (e.g.
healthy,broken,overheating), embed a handful of labeled windows and store the vectors with their labels. - Classify new data — embed each incoming window the same way and take a majority vote among its k nearest library vectors (KNN).
data.numeric_array event per channel, no prompt:
Requirements for N-Shot Examples
In the Direct Query workflow, windowing and normalization are your client’s responsibility. Two of the rules below exist because of that: use one window length everywhere (mixing lengths invalidates KNN distances), and normalize with one scaler fit on your reference pool rather than per window. Skipping either produces a pipeline that runs without errors but classifies poorly.
- Same sampling rate
- Same variates (columns/channels)
- Same data formats
- Same window length (16–1024 timesteps; use one length for both the library and inference windows, since mixing lengths invalidates KNN distances)
- No leaking of incorrect examples into other classes’ reference data
normalize_input: false. Per-window normalization (normalize_input: true) erases cross-window amplitude differences, which are often exactly the signal that separates classes.
Coverage
Provide at least one example for each possible state or class you want Newton to identify.
Quality
Examples should be clean, representative instances of each class, taken from contiguous recordings — the encoder reads a window as an ordered series, so windows that span gaps in the data produce misleading embeddings. Avoid noisy or ambiguous examples that could confuse the classification.
When to Use N-Shot Examples
N-shot examples are appropriate when:- You have limited labeled data (even just one example per class)
- You need to classify states or detect patterns that Newton doesn’t recognize by default
- You want to customize behavior without the overhead of fine-tuning
- Your classification needs may change frequently, as you can update the reference library without retraining
Learn More
Quickstart: Detect a Machine Fault
The full library → KNN → evaluation cycle on real bearing data, in one runnable script.
Omega Agent Skill
Teach your coding agent the embedding and KNN patterns, including a full-scale evaluation harness.
Data Prep Agent Skill
Clean, split, and featurize time-series data into a leakage-free reference library.
Direct Query API
Request and response reference for the /query endpoint.