Internship vs. Research Experience for Grad School

Hello,
I am an undergraduate sophomore computer science and philosophy major wondering about research and internship experience when applying for graduate school. After completing a software engineering internship at a tech company last summer (which was, on the whole, a great experience), I realized that I ultimately wanted more from job than just software development. I found that I enjoyed developing software most in the context of research: I cherish the technical knowledge, creativity, abstract thought, and theory of computer science more than just writing code. Additionally, I love combining my computer science research with my research in philosophy. Accordingly, I believe that a doctorate in computer science (or a related field) would be the best choice for me if I ultimately want to work as a researcher.

I have heard that undergraduate research opportunities are the best way to spend summers as far as graduate school admissions go, so I have applied to ~9 or so NSF REU positions related to computer science; I will also be looking at research opportunities for the summer at my own college. This was all fine until I received an internship offer from Google (the Engineering Practicum, specifically). I imagine the work environment there is one of the best, but I am not sure if I would ultimately like developing software even at that sort of company.

In the end, would top level graduate schools rather see me intern at a prestigious company such as Google, or will research in computer science always trump such an internship? Thanks.

The latter.

Also, if you do research, you’ll have a better chance to get good recommendation letters from your research mentors. To graduate admissions committees, they carry much more weigh than recommendation letters from people in the industry.