Before you know what to reply, you need to identify the message being conveyed, and not exactly WHAT is written.
So start by simplifying the language. Combining words that have the same meaning and thus standardizing those words.
For example, if I write "You are an incredible person!", The system can identify that it is an exclamation, it identifies the subject (the robot itself) and identifies the adjective "Incredible", so it can draw the conclusion that it is receiving a compliment, then the robot must be "Polite" to respond accordingly.
So start by creating a vocabulary in the database, classifying verbs, adjectives, nouns and subjects ... then start to identify them.
I think it's a good start.
I hope I was helpfull.