Which movies have the most realistic artificial intelligence?
Just A Rather Very Intelligent System (J.A.R.V.I.S.) in Iron Man (and related films, such as The Avengers) is something (a personal assistant) that people are already trying to develop, so JARVIS is a quite realistic artificial intelligence. Examples of existing personal assistants are Google Assistant (integrated into Google Home devices), Cortana, Siri and Alexa. There are other virtual assistants, but, unfortunately, there aren't many reliable open-source ones. Note that JARVIS is way more intelligent and capable than the other mentioned personal assistants.

Similarly, HAL 9000, in 2001: A Space Odyssey, is a sentient artificial intelligence which can be considered a personal assistant.