# Utter with condition not working as expected

**URL:** <https://forum.rasa.com/t/utter-with-condition-not-working-as-expected/64777>\
**Category:** Rasa Open Source\
**Created:** [December 9, 2024, 3:56pm UTC](https://forum.rasa.com/t/utter-with-condition-not-working-as-expected/64777 "2024-12-09T15:56:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![OzzYzzO](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ozzyzzo/32/24831_2.png) [@OzzYzzO](https://forum.rasa.com/u/OzzYzzO)\
**Post date:** [December 9, 2024, 3:56pm UTC](https://forum.rasa.com/t/utter-with-condition-not-working-as-expected/64777/1 "2024-12-09T15:56:33Z")

</div>

Hello.

I’m working on a bot that answers when users ask for the definition of specific concepts. It searches for the concept within a file containing pairs of concepts and definitions and then provides the response.

I want:

1. If there isn’t any ‘concept’ entity in the intent → The bot must utter “I’m sorry. I couldn’t understand the requested concept” or “I couldn’t realize what concept you are looking for.”
2. If there is a ‘concept’ entity in the intent, but it wasn’t found in the definitions file → The bot must utter “There is no definition matching the concept {concept} in my database.” or “I couldn’t find {concept} in my database.”

The problem is that the bot always includes the concept in the utterance. The domain file fragment is below.

```auto
responses:

  utter_definition_not_found:
  # utterance for missing or not recognized entities
  - condition:
    - type: slot
      name: concept
      value: # also tried with value: None or value: not_found (previously setting slot value within a custom action)
    text: |
      I'm sorry. I couldn't understand the requested concept.
  - condition:
    - type: slot
      name: concept
      value: # also tried with value: None or value: not_found (previously setting slot value within a custom action)
    text: |
      I couldn't realize what concept you are looking for.
  - text: |
    There is no definition matching the concept {concept} in my database.
  - text: |
    I couldn't find {concept} in my database.

slots:
  concept:
    type: text
    influence_conversation: false
    mappings:
    - type: from_entity
      entity: concept

```

Thanks in advance!

---

_[View the full topic](https://forum.rasa.com/t/utter-with-condition-not-working-as-expected/64777)._
