Just say hi back. That satisfies your social obligation. Anything else you want to do is up to you. I personally will make small talk for a short period of time and then politely excuse myself unless an opportunity for a deeper conversation presents itself. As an introvert, it took me awhile to get t