It's Just Vectors

Embeddings are what make generative AI computable. They’re the step where language becomes mathematics: “coffee” and “espresso” become vectors close enough to compare, “automobile” lands somewhere different, and suddenly similarity is a calculation rather than a judgement.

This series works through those mechanics by building them. You’ll implement eight CLI commands in Go: cosine similarity, centroid analysis, anomaly detection, semantic search, query steering with vector arithmetic, and PCA visualisation. Writing the code yourself is what makes the difference between knowing that embeddings work and understanding why they work.

The full implementation is at rikdc/semantic-search-experiments. No ML background needed. Basic Go and enough linear algebra to follow “sum of products” will do. The rest is just loops.

2 posts in this series

Part 1 18 Mar 2026

Vectors, Cosine Similarity, and the embed analyze Command

Appendix A 18 Mar 2026

Appendix: Vector Math Primer