I am currently an undergraduate in Computer Science, and I am seriously thinking about getting a PhD (I have to apply next year, and I like to do my homeworks way beforehand).
Last year I worked as an assistant researcher in a group at my university. Everybody was really pleased with my work and they said they would be very happy to have me as their student, including the head of the group (he was also one of the professors of some undergraduate courses).
The problem is, while my School is quite good, and I wouldn't mind at all to pursue my degree in this group, I would like to try other opportunities. This would imply requesting a letter of recommendation from him.
Is there any way to suggest that I want to try to apply somewhere else (quite objectively a better grad school, in a different country) and, if that fails, I would like to stay in his group, without being rude? How would this be perceived?