Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Description
The DESCRIBE statement is used to display the attributes of an existing model.
The available options to describe a model depend on the underlying engine.
Syntax
Here is how to retrieve general information on the model:
Or:
DESCRIBE MODEL model_name;
This command is similar to the below command:
SELECT *
FROM models
WHERE name = 'model_name';
One difference between these two commands is that DESCRIBE outputs an additional column that stores all available options to describe a model, depending on the underlying engine.
Examples
NLP Models
MindsDB offers NLP models that utilize either Hugging Face or OpenAI engines. Let’s see how to describe such models.
DESCRIBE [MODEL] sentiment_classifier;
On execution we get:
+---------------------+----------------------+--------+---------+--------+---------+----------+----------+-----------+---------------+-----------------+--------+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| tables | NAME | ENGINE | PROJECT | ACTIVE | VERSION | STATUS | ACCURACY | PREDICT | UPDATE_STATUS | MINDSDB_VERSION | ERROR | SELECT_DATA_QUERY | TRAINING_OPTIONS | TAG |
+---------------------+----------------------+--------+---------+--------+---------+----------+----------+-----------+---------------+-----------------+--------+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| ["args","metadata"] | sentiment_classifier | openai | mindsdb | true | 1 | complete | [NULL] | sentiment | up_to_date | 23.1.3.2 | [NULL] | [NULL] | {'target': 'sentiment', 'using': {'prompt_template': 'describe the sentiment of the reviews\n strictly as "positive", "neutral", or "negative".\n "I love the product":positive\n "It is a scam":negative\n "{{review}}.":'}} | [NULL] |
+---------------------+----------------------+--------+---------+--------+---------+----------+----------+-----------+---------------+-----------------+--------+-------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+
The tables output column lists all available options to describe a model.
DESCRIBE args
DESCRIBE metadata
DESCRIBE [MODEL] sentiment_classifier.args;
The above command returns the following output columns:| Name | Description |
|---|
key | It stores parameters, such as prompt_template and target. |
value | It stores parameter values. |
DESCRIBE [MODEL] sentiment_classifier.metadata;
The above command returns the following output columns:| Name | Description |
|---|
key | It stores metadata parameters. |
value | It stores parameter values. |
Nixtla Models
MindsDB integrates Nixtla engines, such as StatsForecast, NeuralForecast, and HierarchicalForecast. Let’s see how to describe models based on Nixtla engines.
DESCRIBE [MODEL] quarterly_expenditure_forecaster;
On execution we get:
+-----------------------------+----------------------------------+---------------+---------+--------+---------+----------+----------+-------------+---------------+-----------------+--------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| tables | NAME | ENGINE | PROJECT | ACTIVE | VERSION | STATUS | ACCURACY | PREDICT | UPDATE_STATUS | MINDSDB_VERSION | ERROR | SELECT_DATA_QUERY | TRAINING_OPTIONS | TAG |
+-----------------------------+----------------------------------+---------------+---------+--------+---------+----------+----------+-------------+---------------+-----------------+--------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+--------+
| ["info","features","model"] | quarterly_expenditure_forecaster | statsforecast | mindsdb | true | 1 | complete | [NULL] | expenditure | up_to_date | 23.4.4.0 | [NULL] | SELECT * FROM historical_expenditures | {'target': 'expenditure', 'using': {}, 'timeseries_settings': {'is_timeseries': True, 'order_by': 'month', 'horizon': 3, 'group_by': ['category']}} | [NULL] |
+-----------------------------+----------------------------------+---------------+---------+--------+---------+----------+----------+-------------+---------------+-----------------+--------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+--------+
The tables output column lists all available options to describe a model.
DESCRIBE info
DESCRIBE features
DESCRIBE model
DESCRIBE [MODEL] quarterly_expenditure_forecaster.info;
The above command returns the following output columns:| Name | Description |
|---|
accuracies | It lists the chosen model name and its accuracy score. |
outputs | The target column. |
inputs | All the feature columns. |
DESCRIBE [MODEL] quarterly_expenditure_forecaster.features;
The above command returns the following output columns:| Name | Description |
|---|
ds | It defines intervals between records. For example, here, we’ve got monthly expenditure records. |
y | It stores the target column. |
unique_id | It stores columns listed in the GROUP BY clause. It defines the column(s) in the dataset by which you can split it into multiple time series that track the same process or value for different entities or groups. |
DESCRIBE [MODEL] quarterly_expenditure_forecaster.model;
The above command returns the following output columns:| Name | Description |
|---|
model_name | It is the chosen model name. |
frequency | It is the frequency |
season_length | It indicates how many measurements until the next season occurs. For example, a time series with monthly measurements and a season length of 12 means that, every 12 months, a new season occurs. It can have a very strong effect on the final model’s performance. |
hierarchy | It defines whether HierarchicalForecast is used (true) or not (false). |
Other Models
Models that utlize LangChain or are brought to MindsDB via MLflow can be described as follows:
DESCRIBE [MODEL] other_model;
The above command returs ["info"] in its first output column.
DESCRIBE [MODEL] other_model.info;
The above command lists basic model information.
If you need more information on how to DESCRIBE [MODEL] or understand the results, feel free to ask us on the community Slack workspace.