Text this: Impact of retrieval augmented generation and large language model complexity on undergraduate exams created and taken by AI agents