executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
similarity-and-searchGuides Gensim similarity indexes, soft cosine, WMD, term similarity, and approximate-neighbor retrieval.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task needs to index transformed vectors or compare corpus/query vectors with cosine, soft cosine, WMD, or term-similarity methods.
MatrixSimilarity, SparseMatrixSimilarity, or
Similarity.AnnoyIndexer or NmslibIndexer.SoftCosineSimilarity, SparseTermSimilarityMatrix,
WordEmbeddingSimilarityIndex, or LevenshteinSimilarityIndex.num_features to the exact transformed vector dimension.Similarity for large corpora/shards; use MatrixSimilarity only when
the full matrix comfortably fits in memory.Read references/workflows.md for index-selection
recipes, references/api-reference.md for verified
signatures, and references/optional-indexes-and-metrics.md
for Annoy/NMSLIB/WMD/soft-cosine caveats.
MatrixSimilarity(corpus, num_best=None, dtype=numpy.float32, num_features=None, chunksize=256, corpus_len=None).SparseMatrixSimilarity(corpus, num_features=None, num_terms=None, num_docs=None, num_nnz=None, num_best=None, chunksize=500, dtype=numpy.float32, maintain_sparsity=False, normalize_queries=True, normalize_documents=True).Similarity(output_prefix, corpus, num_features, num_best=None, chunksize=256, shardsize=32768, norm='l2').SoftCosineSimilarity(corpus, similarity_matrix, num_best=None, chunksize=256, normalized=None, normalize_queries=True, normalize_documents=True).SparseTermSimilarityMatrix(source, dictionary=None, tfidf=None, symmetric=True, dominant=False, nonzero_limit=100, dtype=numpy.float32).WordEmbeddingSimilarityIndex(keyedvectors, threshold=0.0, exponent=2.0, kwargs=None).LevenshteinSimilarityIndex(dictionary, alpha=1.8, beta=5.0, max_distance=2).Run scripts/similarity_query_smoke.py to
check that the environment can transform a tiny corpus and perform similarity
queries with both in-memory and sharded indexes.
../corpora-and-vector-spaces/SKILL.md.../topic-modeling-and-transformations/SKILL.md.KeyedVectors, route to
../embeddings-and-phrases/SKILL.md.../data-and-cli-utilities/SKILL.md.MatrixSimilarity for small corpora where simplicity matters.SparseMatrixSimilarity when the vectors are sparse and you want an in-memory sparse representation.Similarity when the index must be sharded or the corpus may exceed memory.SoftCosineSimilarity when semantically related terms should contribute to similarity.WordEmbeddingSimilarityIndex when you already have learned embeddings and want term similarity.LevenshteinSimilarityIndex for string-edit similarity over a fixed dictionary.Read references/troubleshooting.md for vector
space mismatch, missing num_features, dense index memory pressure, output
prefix/shard files, empty queries, optional dependency failures, and WMD cost.