My embeddings are 1536 or 3072 dimensions. Storage and search are expensive, and some indexes have dimension limits. How can I make them smaller?

Find answers to your programming questions.
My embeddings are 1536 or 3072 dimensions. Storage and search are expensive, and some indexes have dimension limits. How can I make them smaller?
My dataset has categorical columns like 'city' and 'product type'. Can I use PCA on them?
I've seen all three used for dimensionality reduction. What's the difference, and when should I use each?
I have a 2D embedding and want a scatter plot colored by label, with a legend.
My PC1 values are the negative of what I got last week (or what R / another library gives). Which one is correct?
I have millions of rows (or a large TF-IDF matrix) and PCA crashes with a MemoryError or a TypeError about sparse input.
I reduced my data with PCA. Can I get back to the original feature space? How much information did I lose?
I ran fittransform on my training data and then again on my test data. My model's predictions make no sense." / "I got a feature-count mismatch error when I pas