Knowing some moves in a fight is good, but not all moves are ideal against every opponent. Professional fighters will spend weeks, if not months, analyzing videos of their scheduled opponents in order to learn as much as they can about they way they move. In self defense, that option is not available.
Most physical altercations tend to happen very quickly. Sometimes you're ambushed and none of what I'm about to say is even relevant in that situation. However, if you've watched enough street fight videos (world star, anybody?), then you may have noticed a few seconds of posturing before the first punch is thrown. In those few seconds, you can learn a lot.
So, how do you gauge the skill of some random opponent? The basic answer is: you throw fakes and see how he (or she, I suppose) reacts. Now, if your opponent is a golden gloves boxer and you throw a big ol' fake, leaving yourself open for a quick 1-2 combo, then you're probably going to get knocked out just for that. Instead, start with the subtlest movement: a quick bend in the front knee, a jutting of the shoulder...something that an experienced fighter would recognize. Then look for a similarly subtle (or not-so-subtle) reaction. If you see one, then you'd better play conservatively because the opponent knows something things. If you get no reaction, then give a slightly more overt fake (while still maintaining good defensive posture in case they try to counter-punch against your fake). Repeat this process until you finally get a reaction. After three or four progressively more overt fakes, you should be able to figure out how experienced the opponent is, roughly.
The whole process should only take you 3-5 seconds. Beyond that, punches are probably going to be coming your direction anyway!
Finally, there is a bit of an art to doing believable fakes. You have to move in such a way that the opponent believes that you're actually going to strike. If the opponent is very experienced, they might see through your fake and not react, which might give you a false sense of superiority. So watch out!