Sounds like Johnny Mnemonic (1995).
From Wikipedia:
Johnny Mnemonic is a 1995 cyberpunk film directed by Robert Longo in his directorial debut. The film stars Keanu Reeves and Dolph Lundgren. The film is based on the story of the same name by William Gibson. Keanu Reeves plays the title character, a man with a cybernetic brain implant designed to store information. The film portrays Gibson's dystopian view of the future with the world dominated by megacorporations and with strong East Asian influences.
In 2021, society is driven by a virtual Internet, which has created a degenerate effect called "nerve attenuation syndrome" or NAS. Megacorporations control much of the world, intensifying the class hostility already created by NAS.
Johnny is a "mnemonic courier" who discreetly transports sensitive data for corporations in a storage device implanted in his brain at the cost of his childhood memories.
[...]
Johnny starts witnessing brief images of a female projection of an artificial intelligence (AI) who attempts to aid Johnny, but he dismisses her.
[...]
aided by the female AI, Johnny is able to decrypt the data and at the same time recover his childhood memories.