You would use it like this:
<category>
<pattern>I LIVE IN *</pattern>
<template>
I have never visited <set name="it"><set name="topic"><person/></set></set> before.
</template>
</category>
Human: I live in Japan.
Bot: I have never visited it before. (Bot sets “it” and “topic” to Japan)
Human: What is “it”?
Bot: It refers to Japan.
Human: What is the topic?
Bot: We are talking about Japan.
It is important the “it” tag goes on the outside. if you had this:
<set name="topic"><set name="it"><person/></set></set>
It would have set the topic to the word “it”.
Another example:
<category>
<pattern>MY BROTHER IS *</pattern>
<template>
Is <set name="he"><person/></set> really?
</template>
</category>
<category>
<pattern>WHO IS HE</pattern>
<template>
He is <get name="he"/>.
</template>
</category>
Human: My brother is called Fred.
Bot: Is he really?
Human: Who is he?
Bot: He is called Fred.
This is a simplified example, as you would ideally check the value of “he” before displaying it to the user. Had the user asked “Who is he?” first, the bot would have replied, “He is .”