A sentence having one principal clause and one or more subordinate clauses is called a complex sentence.
Example:
I know + that he will come.
P.C S.C
He believes that you are a physician.
P.C S.C
Now we see the question tag in a complex sentence:
Rule1: If you want to make a tag question on a complex sentence – generally the tag question is formed on the principal clause/main clause.
That is, the tag question is not formed on the Subordinate-clause.
Example:
Unless you come here, I will not go. _________?
Subordinate clause Principal Clause
Unless you come here I will not go, will you?
Wait here, until I come back, ____?
Principal Clause — Subordinate clause
Wait here, until I come back, will you?
Similarly,
When he went at home, he had known everything, hadn’t he?
Rule2: If the subject of the main clause is the first person ‘I’ and the following verb is hope/believe/think/know/wish/suppose, then the question tag is formed on the subordinate clause.
Example:
I know he is a talent man, isn’t he?
I wish that John will do well in the exam, won’t John?
I believe that Rimy will never do harm to others, will Rimy?
Rule 3: If there is no conjunction in the complex sentence, you have to form tag question on the second clause.
Example:
I think you had better leave this place, hadn’t you?
I hope you will do better in life, won’t you?
I know you have done this mistake, haven’t you?