Task¶
A Task is the third and last organizational entity in ML cube Platform. A Task represents an ordinary artificial intelligence task like regression, classification, text generation or object detection.
A Task is associated with a Model and a Data schema that describes all the information about the data in the Task.
A Task is associated with a unique identifier that will be used by SDK to operate on it. The identifier can be retrieved from the Task homepage or by looking at the url.
A Task has a status that summarizes the health of its AI model. The status depends on the monitoring module and changes from Ok, Warning or Drift when the Monitoring modules detect drifts on monitored quantities.
Moreover, in the Task homepage is present the section named Data events which shows the most recent detection events generated by the monitoring module. It is possible to click on view to see more details or discard the notification (the event will remain available for future analysis on the Detection page).
Attributes¶
A Task is described by a set of attributes specified during its creation. Some attributes are common for every Task, while others vary according to its type. Generic attributes are:
| Attribute | Description |
|---|---|
| Name | Name of the Task, unique for the Project. |
| Tags | Optional customizable list of tags. They are used to better describe the Task and to improve search. |
| Task type | Artificial intelligence type of Task. Possible values are: |
| Data structure | Type of input data the Task uses. Possible values are:
|
| Optional target | Boolean value that specifies if the ground truth is always available or not. In some Tasks, the actual value is not present until explicit labeling is done. In this cases, the Task is marked as with optional target so that ML cube Platform works accordingly. |
| Cost info | Optional information about costs that depend on Task Type. |
| Text language | Which language is used in the Task when input data structure is text. |
| Positive class | Required when Task Type is Binary Classification, it indicates the positive class to be predicted. |
| Context separator | Available when Task Type is RAG, it specifies the string separator to split retrieved context into different chunks. |
| Default answer | Available when Task Type is RAG, it specifies the default answer to be used when no retrieved context is available. |
| Target Type | Available when Task Type is Semantic Segmentation, it specifies how target and predictions are specified in this task. For now, the only available option is Polygon. See Semantic Segmentation details for more information. |
| Multi-turn | Available for RAG and AI Agents tasks. Specifies whether the task operates in a conversational (chat) setting with multiple turns or a single-turn interaction. |
| Timeseries frequency | Available for Timeseries tasks. Defines the frequency of the time series data (e.g., hourly, daily, monthly) and is used to correctly interpret temporal spacing between observations. |
| OCR mode | Defines the OCR operating mode: either plain text extraction or structured extraction with bounding boxes and text regions. |
Warning
Some Task's attributes are immutable: type, data structure and optional target flag cannot be modified after the creation of the Task.
Platform modules and Task Type compatibility¶
Most of ML cube Platform operations are done at Task level: monitoring, retraining, analytics and other features are specific to AI models and data that belong to a Task. Indeed, each Task Type has a set of ML cube Platform modules:
| Module | Regression | Classification | RAG | Object Detection | Semantic Segmentation | Timeseries | Clustering | OCR |
|---|---|---|---|---|---|---|---|---|
| Monitoring | ||||||||
| Explainability | ||||||||
| Retraining | ||||||||
| Dynamic Clustering | ||||||||
| Topic Modeling | ||||||||
| RAG Evaluation | ||||||||
| LLM Security |
Tip
On the left side of the web app page the Task menu is present, with links to the above-mentioned modules and Task settings.
Task Type¶
ML cube Platform supports several Task Types providing specific features for each of them. Not all Task Types are compatible with data structures, in the table below are shown which data structure is supported by which Task Type:
| Task Type | Tabular | Image | Text | Embedding |
|---|---|---|---|---|
| Regression | ||||
| Classification | ||||
| RAG | ||||
| Object Detection | ||||
| Semantic Segmentation | ||||
| Timeseries | ||||
| Clustering | ||||
| OCR |
In the following sections, you can find a description of each Task Type with its specific information.
Regression¶
Supervised regression Task with continuous target.
Cost information¶
Cost information is expressed by two proportional coefficients \(c_{o}\) and \(c_{u}\):
- \(c_{o}\) is the cost of overestimating the target value, i.e., when \(\hat{y} > y\)
- \(c_{u}\) is the cost of underestimating the target value. i.e., when \(\hat{y} < y\)
Given a data batch, the mean cost \(\bar{C}\) is expressed as $$ \bar{C} = \frac{\sum_{i | \delta_i < 0} |\delta_i| \times c_{o} + \sum_{i | \delta_i > 0} \delta_i \times c_{u}}{N} $$ where \(\delta_i = y_i - \hat{y}_i\) is the different between the target and the estimated value.
Classification¶
Supervised classification Task with discrete target. Classification Tasks divides in:
- Binary: when then target is a binary variable. For binary classification tasks additional positive class attribute must be specified indicating which value is considered as the positive one. For instance, in fraud detection classification task "1" can represent that the sample is a fraud, while "0" when it is not. In that case positive class attribute is "1".
- Multiclass: when the target is a categorical variable with more than two possible values but only one value can be assigned.
- Multilabel: when the target is an array indicating which of the possible categories are present. In this case, each element can be either 0 or 1, and more than one element of the array can be 1.
Cost information¶
Cost information differs from each of the three classification types, however, the concept is similar. A cost is associated to every misclassification possibility:
-
Binary:
- \(c_{FP}\) is the cost of classifying a negative sample as positive
- \(c_{FN}\) is the cost of classifying a positive sample as negative
Given a data batch, the mean cost \(\bar{C}\) is expressed as
$$ \bar{C} = \frac{N_{FP} \times c_{FP} + N_{FN} \times c_{FN}}{N} $$ where \(N_{FP}\) and \(N_{FN}\) are the number of false positives and false negatives respectively.
-
Multiclass:
- \(c_{k}\) is the cost of misclassifying a sample, whose actual class is \(k\), with another class
Given a data batch, the mean cost \(\bar{C}\) is expressed as
$$ \bar{C} = \frac{\sum_{k} N_{k} \times c_{k} }{N} $$ where \(N_{k}\) is the number of misclassified samples of class \(k\).
-
Multilabel:
- \(c_{FP}^{k}\) is the cost of classifying a sample as class \(k\) when the actual class \(k\) is not present
- \(c_{FN}^{k}\) is the cost of not classifying a sample as class \(k\) when the actual class \(k\) is present
Given a data batch, the mean cost \(\bar{C}\) is expressed as
$$ \bar{C} = \frac{\sum_{k} N_{FP}^{k} \times c_{FP}^{k} + N_{FN}^{k} \times c_{FN}^{k}}{N} $$ where \(N_{FP}^{k}\) and \(N_{FN}^{k}\) are the number of false positives and false negatives of class \(k\) respectively
Retrieval Augmented Generation¶
Retrieval Augmented Generation is a particular AI task for Text data based on Large Language Models, in which they are used to generate responses of user query using a set of retrieved documents as context to provide a precise and more focused response.
RAG Tasks, do not have a Target therefore, the attribute optional target is always set to True. Moreover, in this Task, the Prediction is a text as well. While the input is composed of two entities:
- User Input: the user query that the model needs to answer
- Retrieved Context: the set of documents the retrieval engine selected to help the model
RAG Tasks have two additional attributes:
-
Context separator: which is a string used to separate different retrieved contexts into chunks. Context data is sent as a single string, however, in RAG settings multiple documents can be retrieved. In this case, context separator is used to distinguish them. It is optional since a single context can be provided.
Example
Context separator: <<sep>>
Context data: The capital of Italy is Rome.<<sep>>Rome is the capital of Italy.<<sep>>Rome was the capital of Roman Empire.
Contexts:
- The capital of Italy is Rome. - Rome is the capital of Italy. - Rome was the capital of Roman Empire. -
Default answer: which is a string used when no retrieved context is available. It is optional since other way to handle this situation are available.
Example
Default answer: "I am sorry, I cannot help you with that request."
Object Detection¶
Object Detection is a computer vision task that processes images to identify and localize objects within them. The model returns both the type of each detected object and its spatial location in the image.
The output is a list of bounding boxes, where each bounding box is associated with a label representing the detected object class. Each bounding box is defined by four coordinates (\(x_{min}, x_{max}, y_{min}, y_{max}\)) that describe the position and size of the detected object.
The target for this task is a list of annotated objects, where each annotation includes a bounding box and a corresponding class label. This structure allows the model to learn both what is present in the image and where it is located.
Object Detection is commonly used in applications such as autonomous driving, surveillance systems, industrial inspection, and general visual recognition tasks.
Semantic Segmentation¶
Semantic Segmentation is a computer vision task that assigns a class label to each object or region in an image, providing a more detailed understanding compared to object detection.
The model produces a set of labeled regions that describe the different entities present in the image. Unlike object detection, which uses bounding boxes, semantic segmentation focuses on pixel-precise or region-based shapes.
The target format can vary depending on the configuration, and is defined by the Task attribute Target Type. When the target type is Polygon, each entity is represented as a list of ordered (x, y) coordinates that define the vertices of a polygon outlining the object.
Semantic Segmentation is widely used in applications such as medical imaging, autonomous systems, satellite imagery analysis, and scene understanding.
Timeseries¶
Timeseries is a machine learning task used to analyze data that is indexed over time, where observations are collected sequentially and temporal order is important.
The goal of a timeseries task can vary depending on the use case. It may involve forecasting future values, detecting anomalies, or learning temporal patterns from historical data.
Unlike standard tabular problems, timeseries data must preserve ordering, and past observations are typically used to predict or analyze future behavior.
The output of a timeseries model depends on the specific configuration and use case. It can range from a single predicted value, to a sequence of future values, or to anomaly scores indicating unusual behavior over time.
Timeseries tasks are commonly used in domains such as demand forecasting, financial analysis, monitoring systems, and predictive maintenance.
Clustering¶
Clustering is an unsupervised machine learning task used to group similar data points together without predefined labels. The model learns patterns directly from the data and organizes samples into clusters based on similarity.
Unlike supervised tasks, clustering does not require a ground truth target during training. However, in many real-world scenarios, target labels may become available later and can be used to evaluate how meaningful the discovered clusters are.
The output of a clustering model is typically a cluster assignment for each input sample. This can be represented either as a simple cluster index (e.g. 0, 1, 2, …) or, in some cases, as a probability distribution over all possible clusters indicating the likelihood of belonging to each one.
Clustering is commonly used for exploratory analysis, such as customer segmentation, anomaly detection, or discovering hidden structures in data.
OCR (Optical Character Recognition)¶
OCR is a computer vision task that extracts text from images and converts it into machine-readable form.
Depending on the configuration, OCR can operate in two modes:
- Plain text mode: the model returns the extracted text as a single string
- With labels mode: the model returns both the extracted text and structured information about each detected text region, including its position in the image
This flexibility allows OCR to be used both for simple text extraction tasks and for more structured document understanding problems.
OCR is widely used in document digitization, automated data entry, and extracting information from scanned documents or photos.
Coming Soon¶
ML cube Platform is continuously evolving, and new Task Types are being introduced to cover additional machine learning use cases. The following Tasks are currently in development and will be available in future releases:
Anomaly Detection¶
Anomaly Detection is a task aimed at identifying unusual or rare patterns in data that deviate from expected behavior. It is commonly used in applications such as fraud detection, system monitoring, and quality control. Models typically assign an anomaly score to each sample, indicating how much it differs from the norm.
Optimization¶
Optimization Tasks focus on finding the best possible configuration or decision under a set of constraints and objectives. These tasks are often used in scenarios such as resource allocation, scheduling, or parameter tuning. The goal is to maximize or minimize a target objective while satisfying given conditions.
AI Agents¶
AI Agents are autonomous or semi-autonomous systems designed to interact with environments, tools, or users to achieve specific goals. Unlike traditional models that produce a single prediction, AI Agents can perform multi-step reasoning, execute actions, and adapt their behavior based on feedback or observations. They are particularly suited for complex workflows that require planning, tool usage, and iterative decision-making.