Validating cited marker IDs in code before rendering the sources list catches one of the most embarrassing RAG bugs—a model emitting [4] when only three chunks were passed in the prompt. Stripping or flagging out-of-range markers before the UI displays them keeps every clickable link honest.
One extra step worth pairing with numbered inline markers is preserving the section anchor alongside the page URL. Dropping a user onto the top of a 3,000-word policy page forces them to Ctrl+F to verify the sentence, whereas a section heading or fragment link makes verification immediate.