My children were still small when I started this and I explained to them what I wanted them to say and why it was important to say it. Then, over the next few days, every time they responded with an eager "Yes, Mom!" when I asked them to do something, I would give them a ticket. With loving reminders and an insistent expectation that they would respond in the appropriate way, my children slowly developed this habit.
Although our training period has ended I still try to respond out loud when I hear a good "Yes, Mom!" by saying something like "Wow! I love hearing that!" or "Awesome! Thank you so much!" At times when I don't hear it as often as I'd like, then we repeat the training process until it becomes a habit again. Sometimes, to throw in some fun, we even add a salute!