functions to support template programming
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).