{"slug": "mapping-semantic-meaning-onto-the-night-sky", "title": "Mapping Semantic Meaning Onto the Night Sky", "summary": "A developer uses the analogy of galaxies in the night sky to explain how large language models (LLMs) work, mapping semantic space onto celestial structures. The analogy illustrates how prompts set entry points into semantic regions, and parameters like temperature control the 'hop distance' between tokens, affecting output determinism. The developer contrasts this with a dictionary analogy, noting that LLMs capture distributional semantics and contextual patterns.", "body_md": "If you were to look up into the night sky, what would you see? Countless points of light, scattered in every direction. Most of what you're looking at are stars. But some of those points are whole galaxies—vast collections of stars, spread across incomprehensible distances, compressed by that distance into a single pinprick of light. And what you can see with the naked eye is only a small fraction of what's actually out there.\n\nI want to use this as a way to offer you a way of thinking about how large language models work. Just an analogy, not literally what's happening inside the mathematics—that's not my forte. My hope is that it captures something true about the mechanics, and more importantly, it gives you a mental model you can actually use when you're working with these systems.\n\nAbout two years ago, I was wrestling with finding a way of explaining what an LLM does. My first analogy was that of a dictionary. The naive view was that a dictionary uses words to define other words, and an LLM holds a matrix of words with weights that describe their relationships to each other. So the parallel seemed natural: both systems work through relational structure.\n\nHowever, a dictionary gives you denotation—the surface-level meaning. It's a lookup tool for individual words, not a model of language itself. And critically, you have to already understand language before a dictionary is useful to you at all. The analogy didn't capture what was actually happening in the weight relationships—the distributional semantics, the contextual patterns that let an LLM generate coherent text.\n\nOk, so back to galaxies, when you look up at the night sky, you're not seeing distance—you're seeing direction. That galaxy over there, the one that looks like a point of light, could be millions of light-years away, but what matters for our analogy isn't how far it is. It's which way you're looking. And when you point yourself in that direction and venture toward it, you discover it's not a point at all. It's a vast, intricate structure. A whole semantic space.\n\nLike galaxies in the night sky, or even stars within a single galaxy, the semantic space an LLM inhabits is finite, but it's breathtakingly large. The vocabulary is bounded—there are only so many tokens the model knows. But within that bounded space, the possible paths, the possible combinations, the possible directions you could take through a single galaxy... they're effectively infinite from a practical standpoint. You could spend your entire life exploring one semantic region and never exhaust it.\n\nThat's how I think about what's happening inside a language model. Each galaxy in the night sky mapped onto a small portion of linguistic semantic space—a region of meaning. Your prompt is both the direction you choose to look, and also sets your entry point into that galaxy. Once you're in, you're free to navigate, however how you navigate can be shaped by a few things, most importantly of which are temperature and context.\n\nSo how do temperature and context shape your journey through that galaxy? Think of it this way: your prompt has given you an entry point. You're standing at the edge of the galactic disk, ready to move. Now you need to decide how to traverse it.\n\nTemperature controls your hop distance. You're trying to move from star to star through the galaxy. Each star represents a token, a possible next word. Some stars are closer than others—they're more probable given where you are. Low temperature means you take the shortest hops. You move from star to star along the most likely path, the ridge of probability. The model hugs the modal distribution. You get deterministic, predictable output.\n\nCrank up the temperature, and suddenly you're allowed to make bigger leaps. You can skip over the nearest stars and jump to ones farther out—less probable but still reachable. Those distant stars might connect to regions of the galaxy you'd never reach on the short-hop path. The output becomes more exploratory, more creative, but also less predictable.\n\nContext is different. Context doesn't change your hop distance. Instead, it whispers a direction. It says: \"You're free to hop as you like, but stay in this region. Make your leaps this way.\" Context sculpts which parts of the galaxy remain navigable. It narrows the space without necessarily restricting your hop size—you're still making leaps, but they're guided leaps.\n\nContext and Temperature; together, they're a two-lever system: context says \"navigate toward this region of the galaxy,\" temperature says \"how freely can you hop to get there.\"\n\nIn this thought experiment, not all galaxies are created equal, and this greatly affects how useful temperature and context are.. Some semantic spaces are small, densely packed, heavily weighted toward a single region. Others are vast, with multiple distinct regions and countless branching paths.\n\nSome semantic galaxies are dominated by their central structure. Imagine a galaxy where most of the mass is concentrated tightly around a supermassive black hole at the center—a small, dense disk with little structure extending outward. When your prompt points you toward the galactic center, you can't escape the black hole's gravitational pull. The galaxy's structure simply doesn't have room for alternatives. The prompt \"What is the capital of France?\" is going to send you into a very small galaxy dominated by a supermassive black hole called Paris—your entry point is going to point you directly at it. And here's the key: temperature and context barely matter in a galaxy like this. The gravitational dominance is so overwhelming that whether you take short hops or long leaps, whether context tries to steer you sideways, you're getting pulled toward the same inevitable answer. The mechanism itself constrains the outcome.\n\nNow imagine a galaxy more like our own—one with a large, distributed disk extending far from the center. Stars, nebulae, structure spread throughout. Yes, there's a supermassive black hole at the core, but it is small and the galactic disk stretches out beyond its influence. You can explore the outer regions, the spiral arms, distant pockets of activity. That's where temperature and context actually have power. Low temperature hugs the probable paths, high temperature explores distant regions, and context can steer you through entirely different neighborhoods. Your prompt might point you generally in a direction, but the galaxy has room for genuine divergence. That's more like \"The future of AI is...\"—vast, branching, with multiple regions worth exploring.\n\nSame mechanism. Completely different effect, because the underlying gravitational structure of the galaxy itself is fundamentally different.\n\nSo here's the mental model I've been sitting with. A semantic galaxy, shaped by its own gravitational landscape. Some queries pull you inevitably toward a single region. Others open onto vast, distributed space. Temperature and context are levers you can work with, but what they actually *do* depends entirely on the structure you're navigating.\n\nI don't know if this frame will stick, or if it'll hold up under scrutiny, or if it's even pointing at something real. But it's been useful to me—it's given me a way to think about why some prompts respond to tweaking and others don't. Why temperature matters sometimes and barely registers other times.\n\nMaybe it's useful to you too. Or maybe you'll take it apart, refine it, add something I'm missing. I'm genuinely curious where it goes.", "url": "https://wpnews.pro/news/mapping-semantic-meaning-onto-the-night-sky", "canonical_source": "https://dev.to/ryan_brinn/mapping-semantic-meaning-onto-the-night-sky-14l7", "published_at": "2026-07-10 15:57:33+00:00", "updated_at": "2026-07-10 16:13:39.128044+00:00", "lang": "en", "topics": ["large-language-models", "artificial-intelligence", "natural-language-processing"], "entities": [], "alternates": {"html": "https://wpnews.pro/news/mapping-semantic-meaning-onto-the-night-sky", "markdown": "https://wpnews.pro/news/mapping-semantic-meaning-onto-the-night-sky.md", "text": "https://wpnews.pro/news/mapping-semantic-meaning-onto-the-night-sky.txt", "jsonld": "https://wpnews.pro/news/mapping-semantic-meaning-onto-the-night-sky.jsonld"}}