At first, Valve was going to make Cave Johnson's assistant a scientist named Greg, but they didn't want to hire a new voice actor just for a few lines of dialog. This lead to the creation of Caroline, since GlaDOS' voice actress could be used for this character as well.
There are unused sound files in Portal 2, with Caroline expressing concern from her to Johnson about her mind being digitized. This as eventually left out, because Johnson's side of the conversation was not recorded and it made it seem like rape.