Which AI are you talking about? There isn't just one AI, it's an entire category of technology.
Just asking an LLM to answer a question a give you sources would be an incompetent way to use an LLM. The models will happily hallucinate anything that they don't have an answer for.
But most AI systems that are setup for searching and research use Retrieval Augmented Generation. There are non-AI parts of the system handle the document retrieval and source list preparation. The LLM only uses the reference tags and then a completely non-AI system creates the source list. The LLM can't hallucinate a source list because no competently designed system would trust the LLM to not hallucinate when they could simply program a system to handle that aspect without wasting LLM tokens on simple to solve problems.
So, for example, if you were to ask ask, 'Who won the 1984 Olympics' the system does a search of documents (or websites, as here) and then passes the results to the LLM which only summarizes the documents that were given to it in response to the user's question.
