An algorithm is a finite, well-defined sequence of steps that takes some input and produces some output. The word predates computing by a thousand years — it is named after the 9th-century Persian mathematician al-Khwarizmi — but the modern usage is squarely in software: sorting algorithms, search algorithms, recommendation algorithms, encryption algorithms.
In the AI context, "algorithm" usually means one of two things. It can refer to the learning algorithm — the procedure that adjusts a model's weights during training, like stochastic gradient descent or Adam. Or it can refer to the inference algorithm — how the model is sampled at runtime, like beam search or nucleus sampling for text generation.
Public discourse often blurs the two and treats "the algorithm" as a single black box that ranks your TikTok feed, decides your credit score and surfaces your search results. In reality, every product runs dozens of distinct algorithms wired together, with humans choosing which signals matter. A "biased algorithm" is almost always a system — data, model, evaluation, feedback loop — that produces biased outputs as a whole.
For a working engineer, the algorithmic literacy that pays off is narrow but deep:
- Big-O notation — how runtime grows with input size. The difference between O(n) and O(n²) is the difference between a feature that ships and one that times out.
- Data structures — arrays, hash maps, trees, graphs. Choosing the right one usually matters more than choosing the right algorithm.
- Search and retrieval — binary search, BFS, DFS, and in 2026 also vector search over embeddings.
- Optimisation — gradient descent and its cousins, the workhorses of every neural network.
In modern AI products, the algorithm is often the least novel part of the stack. The novel part is the data, the prompts and the orchestration. A founder building a vertical AI tool does not need to invent a new algorithm; they need to combine existing ones into a workflow that customers will pay for. That is the practical mindset shift the 2020s have demanded — algorithms became commodities, judgement and integration became the moat.