Another method, I might add, is to get a lot of AI cores you don't need and head to a target faction's free port/market without a military building. Handing them over gives you tons of relations if you bring enough.
Places I go to boost relations with AI core handovers are :
Port Tsee Franchise Station (Tri Tachyon - Mayasura) and Tibicena (Tri Tachyon - Magec) both are free ports so no transponder = nobody cares.
Mairaath (Persean League - Mayasura) it doesn't have a patrol HQ so you can simply go in and give AI cores to authorities.
Citadel Arcadia (Hegemony - Arcadia) Hegemony doesn't have free ports, but with 2 asteroid belts near Arcadia you can hide from patrols even with big fleets to drop off cores.
Tartessus (Luddic Church - Eos Exodus) Usually doesn't have patrols around but patrols launched from Hesperus in-system go around points of interest. Transverse jumping directly lets you freely drop off cores.
Cruor (Sindrian Diktat - Askonia) No military building and close enough to asteroids to sneak away.