If you're trying to do this within the same command, you can do it like this:
Start Loop While : [DictationComplete] Equals False
Start Dictation Mode (Clearing Dictation Buffer)
Start Loop While : [{DICTATION}] Equals ''
End Loop
Stop Dictation Mode
Begin Text Compare : [{DICTATION}] Contains 'Yes'
Write '[Purple] Yes' to log
Set Boolean [DictationComplete] to True
Else If Text Compare : [{DICTATION}] Contains 'No'
Write '[Purple] No' to log
Set Boolean [DictationComplete] to True
Else
Say, 'Please say "Yes" or "No"'
End Condition
End Loop
You can remove the "Else" section and it'll just silently reset the dictation buffer, if you prefer.
Note that with this example, you're counting on the speech engine properly recognizing very short words like "Yes" and "No"(which I've found is true even when using them as command names); You may find it easier to use longer ones like "Affirmative" and "Negative".