ResearchModels 🇷🇺 11.08.2026 17:02

What Tarot, Viterbi, and LLMs Have in Common: How an Algorithm Chooses One Meaning Out of Many

The article presents a teaching model that interprets a sequence of Tarot cards as a search for the most coherent meaningful path, drawing an analogy with algorithms like Viterbi and beam search used in speech recognition, machine translation, and language models. The model treats each card as a function mapping context and native meaning to a space of interpretations, then finds the best global path. It contrasts greedy selection, Viterbi, beam search, and other methods, and discusses extensions using factor graphs, CRFs, semantic embeddings, and LLM reranking.
The article on Habr explores how Tarot card interpretation can be modeled as selecting the best coherent meaning path from multiple candidates, analogous to algorithms like Viterbi and beam search. The author starts with the idea that a card acts as a mapping function from context and native meaning to a set of possible interpretations, but argues that the unit of search should be a full semantic path, not a single interpretation. A concrete example with five states (Stagnation, Rethinking, Resources, Action, Transition) and three cards (Hanged Man, Magician, Chariot) shows that a greedy approach chooses a suboptimal path compared to Viterbi's global optimum. The formal model is a conditional inhomogeneous Markov chain, where Viterbi decoding finds the exact maximum path in O(n*S^2) time. However, when the score depends on the whole history or free text, optimal substructure is lost, and beam search is used as an approximate method, with diverse beam search also discussed. The article compares Viterbi, beam search, diverse beam, A*, MCTS, and LLM reranking, and mentions factor graphs and linear-chain CRFs as more general formulations. It also notes that real meanings may not fit discrete states, so semantic embedding vectors and LLM reranking can be used, and it suggests directions for turning the illustration into research on AI-supported Tarot practice.
Abbreviations
HMM = Hidden Markov Model — скрытая марковская модель
CRF = Conditional Random Field — условное случайное поле
NLP = Natural Language Processing — обработка естественного языка
LLM = Large Language Model — большая языковая модель
MAP = Maximum a Posteriori — максимум апостериорной вероятности
Source: Habr — хаб NLP — original
Our earlier posts on this topic ↓
Fresh news