You can use input index to refer to the previous messages said by the user. Create a variable combining as many of the previous messages as you wish to check.
In this example, the word “Matched” is displayed if the user says, “Hello. How are you? I am Steve”. This would normally count as 3 messages.
<category>
<pattern>TEST INPUT</pattern>
<template>
<think>
<set name="combined"><input index="4"/> <input index="3"/> <input index="2"/></set>
</think>
<condition name="combined">
<li value="hello how are you I am Steve">Matched</li>
<li>No match</li>
</condition>
</template>
</category>