Skip to content

Add parse list of intervals to parse_anomaly_response #43

@sarahmish

Description

@sarahmish

Parse anomaly response filters the output of the LLM to show only:

  • a list of values that the LLM claimed as anomalous "[23, 34, 657]".
  • we should also support the ability for it to parse a list of intervals "[[23, 43], [640, 657]]".

In the current implementation of parse_anomaly_response, the method uses re.search which returns only the first match.

match = re.search(pattern, text)

However, we want to return all the detected ranges, not only the first one. Proposing to change this to re.finditer which will return all matches in an iterable.

Lastly, this is a function that is only for prompting techniques. We can mode it there instead of transformations module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions