The important thing to remember is that it actually has zero access to information, because that's not how LLMs work.
At their core, they're vector databases, and they're trying to probabilistically come up with the next most likely token in a stream of tokens found in the DB. You can manipulate the stream by injecting text such as the content of existing files (which becomes more tokens) into the stream, but it never actually understands any of it.
That's why hallucinations are inherently unavoidable. It's really all just hallucinations. It's just that you can sometimes get useful text from their hallucinations if they happen to comport with reality.