Sentence Transformers after work: embed a few lines and rank neighbors by cosine similarity. Educational only. Not investment advice.
You searched for sentence transformers embeddings tutorial. After a full day of work, you do not need a 400-page manual—you need a why-first path that fits one evening: understand the angle (embed a few sentences and rank by cosine similarity), run a tiny example, and know what not to claim.
This hub article is educational only. Not investment advice. It will not pick stocks, size positions, or promise edge.
Tool focus: sentence-transformers.
import numpy as np
# toy vectors standing in for model.encode([...])
docs = ["rate cut odds rise", "oil inventory builds", "rate cut odds rise sharply"]
# pretend embeddings
E = np.array([[0.9, 0.1], [0.1, 0.9], [0.92, 0.08]])
E = E / np.linalg.norm(E, axis=1, keepdims=True)
q = E[0]
sims = E @ q
print(list(zip(docs, sims.round(3))))
Run it in a throwaway venv. If an import is missing, install only what you need for tonight—do not boil the ocean.
You can explain embed a few sentences and rank by cosine similarity in two sentences, show one chart or printout, and list one risk. That is enough progress for an after-work session.
Tomorrow, connect this tool to the adjacent skill (data hygiene, validation, or a simple dashboard)—still educational, still not investment advice.
Educational only. Not investment advice.
pip show) so you can reproduce tomorrow.scratch/ folder; do not mix experiments with production paths.