watsonx Assistant

watsonx Assistant

Conversational AI for fast and friendly customer care

 View Only

Managing a pattern entity with slots.

  • 1.  Managing a pattern entity with slots.

    Posted yesterday

    Hello, for my application, I created an @order_number entity that has a regex pattern \b\d{5,10}\b. The entity was inserted into a slot that identifies the order number and saves it in $order. 
    The process works perfectly so far. 
    However, I wanted to handle possible user errors (for example, if the order ID is too short or too long compared to what the regex expects) by informing the user: 'The format is incorrect. The order ID should have no less than five digits and no more than 10.' 
    I simply inserted a NOT FOUND in the slot to capture this possibility, but it is never picked up. I tried creating a separate pattern entity for incorrect formats. I used it as a condition first in NOT FOUND and then in HANDLING and in multiple conditions in the same slot node, but it never enters the correction node (unlike the entity with synonyms).
    Is it possible that there are some limitations in the use of patterns in slots with handling compared to synonyms, or does it not like the conditions I am writing? 
    I should also point out that I have never seen any errors. Instead of routing to the node I wanted and responding with 'the format is incorrect', Watson keeps asking me 'what is the order number?'.



    ------------------------------
    Federica Bertel
    ------------------------------