Updated on 2024-10-12 GMT+08:00

How Do I Use a Rule Corpus?

As a supplement to common corpuses, rule corpuses are used to identify users' intents based on rules. They have the following features:

  • The configuration is simple, explicit, and flexible, which greatly reduces the threshold for configuring corpuses.
  • When there are a large number of intents, misidentification can be effectively prevented.

Procedure

  1. The intent management page is displayed.

  2. Create an intent or open an existing intent, click the Rule Corpus tab, and click Add to add a rule corpus.

  3. The tag on the left of the corpus indicates whether the rule format is correct. If the rule format is incorrect, an error message is displayed.

  4. The Exact Match button on the right of the corpus can be used to determine whether to perform exact match for the corpus.
  5. (Optional) Click Add again to add another rule corpus. Click on the right of the corpus to delete the corpus. Double-click the corpus text to edit the corpus.
  6. Test the rule corpus. Chat with the chatbot by text to check whether the configured rule takes effect. When the rule takes effect, the intent confidence displayed in the chat window is an integer greater than or equal to 1.

    When both common corpuses and rule corpuses are configured, the system preferentially matches rule corpuses. If no rule is matched, the system matches common corpuses.