Take "herb," for example. In some dialects, the "h" is vocalized, while in others, it's silent. Both "an herb" and "a herb" are valid. Your choice in your writing conveys identity. An author who opts for "a herb" helps paint a vague picture of the individual behind the words, perhaps someone from England.
You could make your own personal table, but it would be for you and only you.
Also, although there is a concrete rule, it's not something we're thinking about as we talk--using the wrong article just feels wrong. Most of us aren't consciously "running an algorithm," as you put it; the correct article just comes out.
Most people will find that they develop the same skill with writing over time. The subset of people who have trouble developing that skill and learn best by memorizing a table of words is going to be quite small. I would never write "a LLM" in the same way that I would never say "an history" out loud.