you can be kind to people, just make sure not to lead them on. if you are interacting with people as a job, your normal level of kindness is shown to a larger range of people's interpretations. think of it like puzzle pieces: you are one single fit that is forced to brush against hundreds of other fits; there will be some other person who thinks it is a match without even brushing along because of what they think your fit looks like. don't be too friendly and remember that some questions are more personal to some than others, which will make you come across as more interested than you actually are.
don't let me stop you from saving yourself annoyance though, i am only justifying the librarian's actions for those who act the same. it is always your decision on how to interact with others and you don't need to justify it.