I get the impression from watching the show that the judge is ethically obligated to reject the guilty plea if he is not conviced that the person is really guilty.
If the person walks out of the court and says that they are innocent it seems incumbent on the judge to reject the plea.
I hope the judge drags her back into court and makes her either change her plea or give a detailed description of the crimes to which she is pleading guilty; make her either spell it out or go to trial.
You are right.
Though a judge cannot determine if someone is "guilty in fact", he must determine that the guilty plea is knowingly and voluntarily given and can ask a defendant who is pleading guilty to describe their crime. This process is called "allocution."
But sometimes the defendant does not want to admit guilt and that is when the "Alford plea" is used. The defendant does not say whether she is "in fact" guilty or inncoent but just that there is enough evidence for a jury to find her guilty were there to have been a trial, but in effect waives a trial.