If you need a hint when the problem is finished, the docs currently refer to that as providing "Feedback". You can learn more about that functionality here:
If you need a hint before the student is done with the problem, I'm a little surprised the existing "extended hint" functionality doesn't do it for you. In case you're running an older version, most of the code related to text input problems is here:
https://github.com/edx/edx-platform/tree/master/common/lib/capa/capa
If you only need this for a handful of problems, you might also try using the hint function instead. If you want to go this route let me know and I'll pull up some examples for you. The hint function is not well documented yet.