You can use the code in https://github.com/krea-ai/prompt-search to do so. You first want to compute the CLIP embeddings of each prompt, index them using something like K-Nearest Neighbors (so you can get search for similarities fast), and then, given an input prompt, you will be able to find other indexed prompts that share their semantics.
This is a very interesting point. It's like using Fourier Transforms/Laplace Transforms to do operations or comparisons that are way easier in those spaces.