Here's my theory (similar to what Vondrack said)...
The AI is very rarely "Polite" or "Gracious" with you unless one of the following:
1) You have a ROP with said AI.
2) You are actively in an alliance with said AI.
3) You have a MPP with said AI.
I'm guessing that the AI will return to its previous disposition when these agreements are over. But, in Artifex's case, it's a little different. I'm guessing that the AI will still be "Polite" or "Gracious" as long as you are fulfilling the terms of the alliance (whether it is active or not).
All conjecture.