Featurization Groups
VehicleFeaturizationComponent writes, to featurization/inventory and
featurization/synthetic, a set of each vehicle's features for each top-level category of the
feature hierarchy. The feature hierarchy alone defines these categories, so no OEM configures
them.
Attribute encoding
Every featurization table stores an attribute as an attribute_type, an attribute_value and an
attribute_class. The type is the scheme id in upper case.
- For a multiclass scheme, the value is the option selected and the class is
MULTICLASS, such asUPHOLSTERY_MATERIAL/FINE_LEATHER/MULTICLASS. - For a binary scheme, the value is
TRUEand the class isBINARY, such asDASHCAM/TRUE/BINARY.
featurization/features and featurization/models hold a list of these attributes per row. A
binary scheme that answered false adds no attribute to the list. featurization/inventory, and
featurization/synthetic where an OEM has synthetic candidates, have one row per vehicle and
attribute.
By default, a vehicle has the attributes of its configurable features only. A configurable
feature is one whose row in consolidated/features has is_configurable true. Setting
configurable_only to false on VehicleFeaturizationComponent gives a vehicle the attributes of
every feature.
Every vehicle of one model_id has the same standard equipment. An inventory record can list
fewer features than the vehicle has. With configurable_only false, such a record gives the
vehicle FALSE or NO_<type> for the type of a standard feature that the record leaves out. For
example, an Audi RS 3 record without its four-way power lumbar (7P1) gives the vehicle
NO_POWER_LUMBAR.
Candidate selection raises on a repeated row, so unique_attribute_rows is a blocking check.
unique_attribute_rows computes a 64-bit hash of each row's (inventory_id, attribute_type, attribute_value) key in the Polars streaming engine, sorts the hashes, and compares each hash with
the previous one. Its memory grows with the partition's row count, but it holds no hash table of
keys. A second read compares each repeated hash against the keys of its rows, so two keys whose
hashes collide do not fail the check.
When a vehicle has several values of one type, such as two wheel diameters,
featurization/inventory sorts the values and joins them with a comma into one value, such as
20,21. For each type that some vehicle in the partition has, a vehicle with no value of that type
gets FALSE for a BINARY type and NO_<type> for any other. The take rates of each type, binary
types included, therefore sum to 1. When synthetic_inventory is set, a vehicle also gets FALSE
or NO_<type> for each type that a row of featurization/models or a featurized feature has (see
Synthetic candidates). With configurable_only true, the default, only
the configurable ones among the featurized features add their types.
Every attribute that featurization/inventory builds itself is MULTICLASS. These attributes are
the sets and the crosses.
Groups
The groups are:
- each top-level category of the feature hierarchy, such as
ADAS, which has a set and a group price; - each value of a multiclass scheme at the root of the attribute hierarchy, such as
TECHNOLOGYorDESIGN, which is a facet group and has a group price only.
The attribute hierarchy, under schemes/attributes, classifies the attributes of the feature
hierarchy rather than features. Its root holds the facet scheme, which asks whether an attribute
is mainly technology or mainly design. Each materialization of featurization/inventory_measures
and featurization/synthetic_measures uses the attribute hierarchy to classify the definition of
each attribute that the feature hierarchy can assign:
- a binary attribute's definition is its scheme's question, focus and true answer;
- a multiclass value's definition is its scheme's question and the value's name, description and examples.
An attribute is in the group of each facet value that the attribute hierarchy assigns to its
definition. A facet is therefore a property of the attribute. For example, adaptive cruise control
is in TECHNOLOGY on every feature that has it, including a package. An attribute assigned
NEITHER is in no facet group.
These classifications go through the answer cache, as a feature's classification does. An attribute is therefore classified again only when its definition or the attribute hierarchy changes. No table stores an attribute's facet.
Only configurable features count in a group, whatever the value of configurable_only.
Separately, FeatureFeaturizationComponent does not
classify a feature whose name is missing or matches the component's code_name_pattern in full,
when its description is missing or only repeats the name. Audi's code_name_pattern matches a name
that is only a code, such as TWL:1VH. A feature that is not classified has no attributes, so it
belongs to no group.
One option code can have several rows on one model: the row of the standalone option, and a row for each package that contains it. Each distinct text is classified separately, so when the rows name the option differently they can get different attributes. A vehicle's attributes would then depend on whether the vehicle has the option standalone or in a package. The consolidated tier is where an OEM gives the rows one text; for Stellantis, see Taxonomy backfill.
The warning check one_attribute_set_per_option reports each option code on a model whose
classified configurable rows got more than one set of attributes. Its metadata also has the share of
classified configurable features that got no attributes.
A set is limited to top-level categories because a set is one categorical attribute. A set over every subcategory, or over a facet that spans every category, would have so many distinct values that each would cover few vehicles.
Sets
<GROUP>_SET holds the binary attributes under the category and NAME=VALUE for each
multiclass scheme under it, sorted and joined with commas. A vehicle with none of them gets an
empty set.
featurization/inventory holds both the sets and the binary attributes for every value of a
market's binary_representation. binary_representation chooses which of
the two the take-rates projection and the attribute weights read.
A multiclass scheme can set exclude_from_set. The feature hierarchy excludes its color and
finish schemes. It also excludes axle_ratio, because a vehicle's axle ratio varies with its
engine and its towing equipment, and gvwr_class for the same reason. It excludes
center_screen_size, because the screen size follows the trim and its packages, which the sets
already distinguish. On Audi's 2026-10-11 partition, adding upholstery_color to
INTERIOR_SET raised the median number of distinct sets per base model from 6.5 to 12.5. Adding upholstery_material
and interior_trim_category changed it little, so those schemes stay in the set.
Group prices
A group's price is the summed price of the vehicle's configurable features in the group, rounded to
the cent. A feature with no price counts as $0. The prices are measures; no attribute
holds them. A scheme that sets exclude_from_set still counts toward its category's
price.
Packages
A package often holds features of several groups. Its price is therefore split, and is not counted whole in each group that one of the package's own attributes belongs to.
A package's contents on a model are the option codes of the model's consolidated features whose
parent_package_code is the package. On a vehicle that has the package, a feature with one of those
codes is a content feature of the package. This holds even when the vehicle's feature_ids name the
code's standalone row, the consolidated row with no parent_package_code.
The package's price is split equally among:
- each content feature of the package that the vehicle has and that has an attribute in some group;
- each attribute of the package's own feature that is not in the
PACKAGEcategory and that none of those content features has.
The second kind covers a content that the package's description names but that has no consolidated
row whose parent_package_code is the package, such as hands-free highway driving in Audi's Q7
Premium Plus.
A content feature's share counts once in each of its groups, its facet groups included. An attribute's share counts in each of that attribute's groups, its facet group included. A content feature's own price is not counted. A content the vehicle does not have gets no share. For example, a package can offer two wheels, and a vehicle has only one of them.
The package's own feature adds its whole price to PACKAGE through its attributes in the PACKAGE
category, such as SPORT_PACKAGE. It adds nothing to any other group.
When a package has no content feature or attribute to split its price among, its own feature adds the whole price to each group that one of its attributes belongs to.
Few content features have a price of their own in the consolidated features table, so the split is equal and not weighted by price. On Audi's 2026-10-13 partition, 34 of the 2,381 contents with a standalone row had a price on that row.
All features price
A vehicle's all_features_price is the summed price of its configurable features.
VehicleFeaturizationComponent computes it from feature_ids and the consolidated features table
only, and does not read the vehicle's msrp. An inventory vehicle and a synthetic candidate with
the same features therefore get the same price. A vehicle's msrp comes from its inventory
source. On most OEMs a synthetic candidate has no msrp, so a price read from msrp would differ
between an inventory vehicle and a synthetic candidate with the same features.
A feature counts once per option code, and only when its consolidated row has no
parent_package_code. A package counts at its own price. A content of a package the vehicle has
adds nothing, even when the vehicle also has the content's standalone row. A feature with no price
adds $0. The price leaves out the model's base price and destination charge. Both are the same for
every vehicle of a model.
Measures
An attribute is a category that take rates, weights and crosses group vehicles by. A measure is a numeric value of one vehicle that the code reading the table computes with.
VehicleFeaturizationComponent writes the measures of the inventory vehicles to
featurization/inventory_measures and those of the synthetic candidates to
featurization/synthetic_measures. Each table has one row per vehicle, with inventory_id,
model_id, dealer_id, is_inventory and these measures:
all_features_price, aFloat64(see All features price).group_prices, a list of structs with the fieldsfeature_groupandprice. The list has one entry for each group, sorted byfeature_group, with the vehicle's group price. A group that none of the vehicle's features contributes to has a price of $0.
The blocking checks one_row_per_vehicle and finite_measures fail a partition with a repeated
inventory_id, or with a null or non-finite all_features_price or group price.
Candidate selection's
PriceDistributionScorer
reads them.
Synthetic candidates
When synthetic_inventory names a synthetic candidates asset, VehicleFeaturizationComponent
also writes each synthetic candidate's attributes to its table, with is_inventory false. A
synthetic candidate gets the sets of its groups from its feature_ids.
VehicleFeaturizationComponent writes featurization/inventory, and when synthetic_inventory
is set, also featurization/synthetic, each from an asset of its own:
featurization/inventoryholds the inventory vehicles. Its asset does not read the synthetic candidates, so demand, which reads it, does not depend on them.featurization/syntheticholds the synthetic candidates. Its asset does not readconsolidated/inventoryorfeaturization/inventory.
Each inventory vehicle is featurized and stored once. A reader of inventory vehicles alone, such as
attribute_stats, attribute_weights and order_set_evaluations, reads featurization/inventory.
A reader that needs every candidate concatenates featurization/inventory and
featurization/synthetic. candidates_output and its candidate variety checks do so when
candidates_output has synthetic_inventory set. Candidate selection does so through the
extra_namespaces of its candidate_attributes table.
In featurization/inventory and featurization/synthetic, a vehicle gets FALSE or NO_<type>
for each type that a row of featurization/models or a featurized feature has (see Attribute
encoding), so a candidate and an inventory vehicle are filled with the same
types. With configurable_only true, only the configurable ones among the featurized features add
their types. Without that fill, a candidate would get a NO_<type> row for a type that only another
synthetic candidate has, and the inventory vehicles would lack that row.
Crosses
CROSSES in ai_dagster.components.featurization.vehicles lists the pairs of attribute types
crossed into one attribute, such as PAINT_COLOR_X_UPHOLSTERY_COLOR with the value
WHITE|BLACK. A side the vehicle has no value for takes NO_<type>. The pairs are chosen by hand.
Each side of a pair is an attribute type of the vehicle's features or of the vehicle's model. A
cross cannot read a <GROUP>_SET attribute.