I have agreed to do undergraduate research in a lab, but then I found another lab that seems more appealing. What are my obligations? I am an undergraduate student in a European University (for privacy reasons, I will not reveal any personal information that may identify me).

I am interested in research, and a month ago - or so - I have contacted a Professor from Department "X" at my university, asking whether I could be integrated in any research group at the Department. The Professor set an appointment with me, showed me the installations, the labs, the material, ... I really liked Department "X", but their research is not what I was expecting. At Department "X", they work on the field that I like, but it's not what I was expecting: here's an analogy - I wanted to study snakes, but instead of actually studying the snakes' behaviour/their genes, at Department "X" they study the effect of external factors on snakes.

Still, because at my university I wasn't aware of anyone else studying snakes - or any other animal -, I said I was interested. I've been given a few articles to read, to catch up on the latest news about snakes, and also the methodology to study snakes. She (the Professor) is expecting me to work there soon.

The problem is that I have met a Professor, who works at Lab "Y". At Lab "Y", their research is top-level, probably one of the best labs in the country. During a talk with the Professor from Lab "Y", I mentioned my interest in animals, specially snakes, and the Professor told me about his job at Lab "Y". They do not specifically work with snakes, although they also do research on snakes sometimes. The research at this lab is much more specific and they have papers in the best journals in the field (unlike Department "X", which - although their research is not that bad - is much inferior to Lab "Y").

Now I am not sure what to do. I feel like I am obligated to work at Department "X" - after all, I have made a commitment with them. Furthermore, because it's a department from the university, it is close to me, I can go there in my free time easily, and I actually hope I will be able to teach a few classes about snakes if I stay with them. However, if I choose Lab "Y", I will be in another environment, where top-level research is made. On the other hand, the lab is around 1 hour (by public transports) from my house (it is not at the university).

For that reason, I would like to hear some advice from experienced academics like you.
Unless you have formally signed some sort of agreement to work in the lab of Prof. X, you do not have what amounts to an actual obligation to work in that lab. If you so choose, you could say that you've found a better offer and work in the lab of Prof. Y.

Now, it should be pointed out that even though you've made a commitment to Prof. X's lab, if you choose to honor it (and personally, I would lean toward doing so), it should also be noted that such a promise does not mean you are committed to work in Prof. X's lab exclusively. It is entirely common for undergraduates to bounce around between different positions until they find something they like. Most faculty understand this, and so it shouldn't be a big deal in the long run if you decide to work in Prof. X's lab for six months to a year before trying out Prof. Y's lab.