Question: is yes i am a sentence?
Answer: It's grammatically incorrect. “Yes, I am” means you are something or you're doing something. “Yes I am a devout Catholic”, “Yes I am going to the store”, etc. “I'm” also means “I am”, of course, but in “I'm”, the thing you are, or are doing, has not been implied by a question.