A foundational model is a broadly trained, reusable machine learning model that can support multiple downstream tasks. A prebuilt model of a general domain, such as English text or everyday images, can turn unstructured data into a form useful for exploration or further modeling. section 6.1.4 section 7.2
Many foundational models generate embeddings: ordered vectors of floating-point numbers representing where data items lie in the model’s conceptual space. For exploratory data analysis, choose a model appropriate to the data, generate embeddings for all or a reasonable subset of the items, and use them to investigate relationships. Apply the model with care; its general-domain training may not suit every dataset. section 6.1.4
Exploring text and creating features
The all-MiniLM-L12-v2 sentence transformer can embed text from Shakespeare’s plays to investigate similarity and novelty. Related themes can then be represented as a concept graph. The same general approach can turn unstructured data into features for another modeling process. section 7.2
Figure 6.4 Heat map of nearest neighbor connections in Shakespeare’s plays using all-MiniLM-L12-v2
The heat map illustrates nearest-neighbor connections between plays found using sentence embeddings. section 6.1.4
Before using a foundational model in a delivery pipeline:
- Check its licensing conditions, tell the customer which model is used, and register it in the appropriate repositories and catalogs. section 5.5.1
- Track the model version across pipelines and environments. Embeddings generated with one model generally match poorly against those generated with another. section 5.5.1
- Consider an on-load hash check in model-serving code to verify that the intended model is loaded in development, test, and production. section 5.5.1




















