Questions in the general studies paper in Prelims and Mains are related to Humanities background. But it is neither necessary nor advisable to take Humanities. Graduation should be based on your taste. It can be related to any stream. For graduation, select any stream you like to study for 3-4 years. You are free to choose any optional subject for UPSC Mains. It may not be the one you studied for graduation.