Naming Conventions for AI Models and Services: A Practical Engineering Guide

    This guide explains how to name AI models, services, and cloud resources so that names stay readable, sortable, and traceable. It covers version number structure, keeping environment and release-stage metadata out of artifact names, naming templates for routes and resources, consistent logging fields, common anti-patterns, and steps for enforcing a naming standard in an existing project.

    1. Why Naming Is an Engineering Problem

    Many teams treat model and service names as quick labels. They only notice the problem when something breaks in production and the name cannot tell them the version, purpose, or deployment location. A name has three jobs: it lets people understand what something is, it lets programs parse it, and it lets incidents be traced back to their source. When a name is written carelessly, all three jobs suffer.

    The problem is sharper in AI. A single base model can produce fine-tuned, quantized, and lightweight variants, and each one differs in quality, resource consumption, and compatibility. Without naming rules, working out which exact version is running in production can take a long time.

    2. Three Core Principles

    1. Readability: The name should directly express the category, specification, and purpose, so a user can grasp its meaning without consulting documentation.
    2. Sortability: Version information uses a fixed number of digits and is ordered from most to least significant, so objects sort correctly by version or in lexicographic order.
    3. Traceability: The name contains, or can be mapped to, a unique identifier such as a build number or date, which links it to a specific training artifact or code commit.

    These principles do not require longer names. A name should be short enough to print completely in a log line, yet specific enough to distinguish similar objects.

    3. Model Version Number Design

    A version number usually has three parts. The major version marks a breaking change in the interface or capability boundary. The minor version marks new capabilities that remain compatible. The patch number marks bug fixes or small updates after weight fine-tuning.

    AI models have several additional dimensions, including the training data snapshot date, the quantization method, and the size tier. We recommend splitting these dimensions into separate fields rather than packing them into one unstructured string. The following is an example structure:

    1. <series>-<tier>-v<major>.<minor>.<patch>[-<quantization>][-<release-date>]
    2. Example: example-series-small-v2.1.0-int8-20261101

    To let programs parse these names reliably, you can validate them with a regular expression:

    1. import re
    2. PATTERN = re.compile(
    3. r"^(?P<series>[a-z][a-z0-9]*)-(?P<tier>small|medium|large)"
    4. r"-v(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"
    5. r"(?:-(?P<quant>[a-z][a-z0-9]*))?"
    6. r"(?:-(?P<date>\d{8}))?$"
    7. )
    8. def parse_model_name(name: str) -> dict:
    9. match = PATTERN.match(name)
    10. if not match:
    11. raise ValueError(f"Model name does not match the naming convention: {name}")
    12. info = match.groupdict()
    13. info["major"] = int(info["major"])
    14. info["minor"] = int(info["minor"])
    15. info["patch"] = int(info["patch"])
    16. return info

    Two design choices matter here. First, the date comes last, so different builds of the same version can be ordered by date. Second, the quantization field must start with a letter, which prevents it from being confused with the date field during regex matching.

    4. Environment and Release-Stage Labels

    Environments (development, staging, production) and release stages (alpha, beta, release candidate, stable) often end up in names. For example, a team might put “prod” directly into a model name. This creates a problem: the same build artifact cannot be promoted from one environment to another, so it has to be rebuilt and renamed.

    A safer approach is to let the name describe only the artifact itself, and manage environment and stage as metadata through configuration or release records:

    Dimension Example values Where it is stored
    Environment dev, staging, prod Deployment configuration
    Release stage alpha, beta, rc, stable Release records or tags
    Artifact version v2.1.0-int8-20261101 The artifact name itself

    With this separation, an artifact keeps the same name when it moves from testing to production. Only the deployment pointer changes. To roll back, you point the deployment back to the previous artifact, without needing to work out which name corresponds to which build.

    5. Service and API Route Naming

    API paths should be resource-centric. Resources are represented by nouns, and operations are expressed by HTTP methods rather than verbs in the path. The version can go in the path or in a request header, but the choice must be consistent across the whole platform. Here is an example:

    1. POST /v2/inference/jobs Create an inference job
    2. GET /v2/inference/jobs/{job_id} Get job status
    3. GET /v2/models/{model_id} Get model metadata

    A few basic rules apply to route naming:

    • Use lowercase letters only in paths, with hyphens between words.
    • Avoid internal codenames. External callers should understand a path’s purpose from the path alone.
    • Put the version number only in the version segment, not mixed into resource names.
    • Keep singular and plural forms of a resource consistent. Do not use job in one place and jobs in another.

    6. Resource and Configuration Naming

    Resources such as object storage buckets, message queues, configuration keys, and container service names can also follow a shared template. A common template looks like this:

    1. {project}-{environment}-{purpose}-{region}-{index}
    2. Example: docs-search-prod-cn-north-01

    The value of a template is that resource names can be generated and validated by scripts rather than relying on people to remember the rules. The following function shows how to validate a name before creating the resource:

    1. import re
    2. RESOURCE_PATTERN = re.compile(
    3. r"^[a-z][a-z0-9]{1,20}-(dev|staging|prod)-[a-z][a-z0-9-]{1,30}-[a-z0-9-]{2,12}-\d{2}$"
    4. )
    5. def build_resource_name(project: str, env: str, purpose: str,
    6. region: str, index: int) -> str:
    7. name = f"{project}-{env}-{purpose}-{region}-{index:02d}"
    8. if not RESOURCE_PATTERN.match(name):
    9. raise ValueError(f"Resource name does not comply with the naming convention: {name}")
    10. return name

    Resource names should never include sensitive information, such as key fragments, personal names, or internal ticket numbers. Once that information appears in a resource name, it can spread through logs and monitoring data.

    7. Consistent Naming in Logs and Tracing

    Logs, monitoring, and alerts are where naming problems show up most clearly. If one service calls a concept model and another calls it modelId, search and aggregation stop working across services.

    We recommend agreeing on one structured logging schema for all services:

    1. {
    2. "ts": "2026-11-25T05:55:01Z",
    3. "service": "inference-gateway",
    4. "env": "prod",
    5. "model": "example-series-large-v2.1.0-int8-20261101",
    6. "request_id": "req_7f3a9c",
    7. "latency_ms": 842,
    8. "status": "ok"
    9. }

    This schema has three key points. First, the model field uses the full artifact name, so incident investigators can match it directly to build records. Second, request_id follows the entire call chain, which makes it possible to connect events across services. Third, fixed field names let dashboards and alert rules be reused over time without adapting them for each service.

    8. Common Anti-Patterns

    The following practices are common in real projects, and each has a better alternative:

    • Vague labels: Names such as “final”, “latest”, or “official2”. These cannot be sorted, and after some time nobody can tell which came first. Replace them with structured names that include a version number and date.
    • Overwriting releases: Reusing one name for different build artifacts. This makes earlier versions impossible to trace. Generate a unique name for every build.
    • Inconsistent date formats: Using 2026/11/25, 20261125, and 25-11 in the same project. Use one format throughout. We recommend YYYYMMDD, which is unambiguous and sorts correctly.
    • Hard-coding the environment in names: This prevents artifacts from being promoted between environments. Store environment information in configuration instead.
    • Mixed casing: Paths, configuration keys, and strings in code that do not match each other make lookups error-prone. Standardize on lowercase in the convention.

    9. Rollout Steps

    Turning a naming convention from a document into an enforced practice usually involves the following steps:

    1. Inventory the current state: List the names and purposes of existing models, services, and resources, and flag the ones that do not follow the convention.
    2. Write the convention document: Define the version number structure, route rules, resource templates, and log fields, and include the regular expressions used for validation.
    3. Add checks to the workflow: Run the validation logic in code review or the continuous integration pipeline, so noncompliant names cannot pass.
    4. Handle new and old objects separately: New objects follow the convention strictly. Existing objects migrate gradually through a mapping table. During the migration, both old and new names must resolve to the same artifact.
    5. Record the mapping: At release time, record the name, build number, code version, and owner in the release record, so any name can be traced back to its source.
    6. Audit regularly: Scan naming quarterly, remove retired objects, and correct new items that deviate from the convention.

    Rollout checklist:

    • Names express the category, specification, and purpose
    • Version numbers follow a fixed structure and sort correctly
    • Environment and release stage are managed as metadata, not included in artifact names
    • API paths are resource-centric, and the versioning strategy is consistent across the platform
    • Resource names are generated from templates and validated with regular expressions
    • Log field names are the same across all services
    • Every name maps to a unique build record