notice

This is unreleased documentation for Rasa Open Source Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

rasa.core.evaluation.marker

AndMarker Objects

@MarkerRegistry.configurable_marker
class AndMarker(OperatorMarker)

Checks that all sub-markers apply.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

negated_tag

| @staticmethod
| negated_tag() -> Text

Returns the tag to be used in a config file for the negated version.

OrMarker Objects

@MarkerRegistry.configurable_marker
class OrMarker(OperatorMarker)

Checks that at least one sub-marker applies.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

NotMarker Objects

@MarkerRegistry.configurable_marker
class NotMarker(OperatorMarker)

Checks that at least one sub-marker applies.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

expected_number_of_sub_markers

| @staticmethod
| expected_number_of_sub_markers() -> Optional[int]

Returns the expected number of sub-markers (if there is any).

SequenceMarker Objects

@MarkerRegistry.configurable_marker
class SequenceMarker(OperatorMarker)

Checks that all sub-markers apply consecutively in the specified order.

The sequence marker application follows two rules: (1) Given a sequence of sub-markers m_0, m_1,...,m_n, the sequence marker applies at the i-th event if all sub-markers successively applied to some previous events and the last sub-marker applies at the current i-th events. (2) If the sequence marker applies at the i-th event, then for it's next application the events up to the i-th event will be ignored.

__init__

| __init__(markers: List[Marker], negated: bool = False, name: Optional[Text] = None) -> None

Instantiate a new sequence marker.

Arguments:

  • markers - the sub-markers listed in the expected order
  • negated - whether this marker should be negated (i.e. a negated marker applies if and only if the non-negated marker does not apply)
  • name - a custom name that can be used to replace the default string conversion of this marker

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

OccurrenceMarker Objects

@MarkerRegistry.configurable_marker
class OccurrenceMarker(OperatorMarker)

Checks that all sub-markers applied at least once in history.

It doesn't matter if the sub markers stop applying later in history. If they applied at least once they will always evaluate to True.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

negated_tag

| @staticmethod
| negated_tag() -> Optional[Text]

Returns the tag to be used in a config file for the negated version.

expected_number_of_sub_markers

| @staticmethod
| expected_number_of_sub_markers() -> Optional[int]

Returns the expected number of sub-markers (if there is any).

relevant_events

| relevant_events() -> List[int]

Only return index of first match (see parent class for full docstring).

ActionExecutedMarker Objects

@MarkerRegistry.configurable_marker
class ActionExecutedMarker(ConditionMarker)

Checks whether an action is executed at the current step.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

negated_tag

| @staticmethod
| negated_tag() -> Optional[Text]

Returns the tag to be used in a config file for the negated version.

validate_against_domain

| validate_against_domain(domain: Domain) -> bool

Checks that this marker (and its children) refer to entries in the domain.

Arguments:

  • domain - The domain to check against

IntentDetectedMarker Objects

@MarkerRegistry.configurable_marker
class IntentDetectedMarker(ConditionMarker)

Checks whether an intent is expressed at the current step.

More precisely it applies at an event if this event is a UserUttered event where either (1) the retrieval intent or (2) just the intent coincides with the specified text.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

negated_tag

| @staticmethod
| negated_tag() -> Optional[Text]

Returns the tag to be used in a config file for the negated version.

validate_against_domain

| validate_against_domain(domain: Domain) -> bool

Checks that this marker (and its children) refer to entries in the domain.

Arguments:

  • domain - The domain to check against

SlotSetMarker Objects

@MarkerRegistry.configurable_marker
class SlotSetMarker(ConditionMarker)

Checks whether a slot is set at the current step.

The actual SlotSet event might have happened at an earlier step.

positive_tag

| @staticmethod
| positive_tag() -> Text

Returns the tag to be used in a config file.

negated_tag

| @staticmethod
| negated_tag() -> Optional[Text]

Returns the tag to be used in a config file for the negated version.

validate_against_domain

| validate_against_domain(domain: Domain) -> bool

Checks that this marker (and its children) refer to entries in the domain.

Arguments:

  • domain - The domain to check against.