In this article, you will learn how to use probing classifiers, UMAP visualization, and SHAP values to interpret and analyze the quality of text embeddings generated by large language models.

Topics we will cover include:

How to generate text embeddings from movie reviews using Scikit-LLM and a local Ollama model, and train a probing logistic regression classifier to evaluate their quality.

How to use UMAP dimensionality reduction to visually inspect the semantic structure captured by LLM-generated embeddings.

How to apply SHAP values to identify which latent embedding dimensions have the greatest influence on a classifier’s predictions.