How AI Citations Actually Work, From Query to Footnote

AI citations are not the model knowing you. They are a retrieval and grounding pipeline. How ChatGPT, Perplexity, Claude and Gemini actually pick sources.