The word "right" can be appended to a statement to turn it into a question. For example, "You are going" is a declarative statement. But, "You are going, right?" is a question. This is somewhat informal. It indicates that the person asking expects a certain answer. If he had no idea whether you were going or not, he would ask, "Are you going?" Asking, "You are going, right?" indicates that he expects a "yes" answer.
What makes the example question in your post difficult is not that it ends with "right", but that it is phrased as a negative.
Suppose the question was phrased without "right". Like your first example. "You don't know that, do you?" If you say "Yes", does that mean "yes, you are correct, I don't know", or does it mean, "yes, I do know"? Such negative questions are a classic problem in English.
Suppose someone used "right" to a positively-worded question. "You are going, right?" The presence of "right" doesn't change your answer. You would still say "yes" if you are going and "no" if you are not.