What response is expected to Chinese people's "Have you eaten?"? "Have you eaten?" (你吃了/吃了吗/吃饭没有 etc) sounds like a Chinese equivalent of "how are you?". However, I don't know what is the correct way to respond to the question.

What do Chinese people expect me to answer when they ask it? Should I just answer it literally?

I first thought they ask me to go in lunch together. But it is definitely not true... So if they want to ask me out, do they use a different approach or do I have to discern if they ask me out or just use the phrase as a greeting?
You can just answer it literally. Usually, I will response: 吃过了（or 还没有），你呢？

If people want to ask you out, they will go further with additional questions/requests: 我们一起去吃饭吧？