Mindloom’s classification model is a single serialized artifact —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/G9-LATAM-Team-58/llms.txt
Use this file to discover all available pages before exploring further.
model.joblib — that bundles every component of the prediction pipeline into one compact file. At roughly 0.24 MB, it contains trained scikit-learn objects, a fitted UMAP reducer, K-means clustering, and all the metadata the inference service needs to classify content, extract keywords, generate map coordinates, and produce explainability signals — all without touching a database or the network.
Model Artifact
The artifact is stored in OCI Object Storage and downloaded by the inference service at startup. It is a Pythondict serialized with joblib, containing the following keys:
| Key | Type | Description |
|---|---|---|
classifier | LogisticRegression | Main classifier operating on E5 + SVD-reduced TF-IDF features |
label_encoder | LabelEncoder | Maps integer indices ↔ category name strings |
keyword_vectorizer | TfidfVectorizer | Bilingual TF-IDF used for keyword extraction |
baseline_vectorizer | TfidfVectorizer | TF-IDF used as input to SVD and explainability |
baseline_classifier | LogisticRegression | Explainability baseline model |
svd | TruncatedSVD | Compresses TF-IDF features to a fixed number of components |
kmeans | KMeans | Assigns cluster IDs to new content at request time |
umap_reducer | UMAP | Projects content to 2D map coordinates at request time |
meta | dict | Version, embedding model name, dimensions, prefixes, metrics, categories |
The embedding model weights are not stored inside
model.joblib. Only its name is stored in meta["embedding_model"]. The ~470 MB transformer weights are baked into the Docker image at build time. This keeps the artifact under 0.25 MB regardless of retraining.Feature Dimensions
Themeta dict exposes two distinct dimension values that are frequently confused:
dim(384) — the raw embedding dimension. This is what gets stored in the database vector column and used for similarity search.feature_dim(884) — the number of features the classifier expects. This isdim + svd_components(384 + 500).
Embedding Model
Mindloom usesintfloat/multilingual-e5-small, a compact bilingual encoder that produces 384-dimensional dense vectors for both English and Spanish text.
Architecture
384-dimensional output vectors, bilingual (EN + ES), L2-normalized float32
E5 Prefixes
"passage: " for documents at index time; "query: " for search queriesnormalize_embeddings=True) because the database uses VECTOR_DISTANCE with cosine similarity, which assumes unit-norm vectors.
Classification Pipeline
When a piece of content arrives at/predict, the model runs the following pipeline:
Encode with E5
The body text is encoded with the
"passage: " prefix using intfloat/multilingual-e5-small, producing a 384-dimensional L2-normalized float32 vector.Build TF-IDF features
The body text is also transformed by the
baseline_vectorizer (TF-IDF), then passed through TruncatedSVD to reduce dimensionality. The result is L2-normalized to match the embedding scale.Concatenate features
The 384-dim E5 vector and the SVD-reduced TF-IDF vector are concatenated into a single
feature_dim-wide feature vector (e.g., 884 values). This hybrid representation is what the classifier actually consumes.Classify
LogisticRegression.predict_proba() is called on the concatenated features. The class with the highest probability is selected.Categories
The model recognizes 8 thematic categories, read fromlabel_encoder.classes_ at runtime:
Backend
Frontend
Móvil
Datos e IA
DevOps y Cloud
Bases de datos
Seguridad
Fundamentos
Keyword Extraction
The_top_terms() function uses keyword_vectorizer (TF-IDF) to score terms in the submitted body text and returns the top 5 terms with a non-zero weight:
Explainability
The_get_explanation() function provides a separate explainability signal by multiplying TF-IDF weights by the baseline_classifier’s coefficients for the predicted class:
UMAP and K-means
Bothkmeans and umap_reducer are stored as fitted model objects, not as precomputed arrays. This means the inference service can assign cluster IDs and 2D coordinates to documents it has never seen before, directly at request time:
kmeans and umap_reducer always receive the raw embedding (dim=384), not the classifier’s 884-wide feature vector. This keeps cluster assignments and map coordinates in the same geometric space that the database uses for vector similarity search.Model Versioning
Model versioning is handled via a pointer file in OCI Object Storage. The filemodels/latest.txt contains the path prefix of the active model version (e.g., models/v1/). The inference service reads this pointer at startup and then downloads the referenced model.joblib.
model.joblib to models/vN/model.joblib, then update models/latest.txt to models/vN/. The next container restart picks up the new version automatically — no Docker image rebuild or redeployment required.