InnovationEngine icon indicating copy to clipboard operation
InnovationEngine copied to clipboard

Provide a Regular Expression alternative to expected_similarity

Open rgardler-msft opened this issue 2 years ago • 0 comments

Currently we test for success of a command using <!-- expected_similarity=0.6 -->. This allows us to fuzzy match almost any output. This is quick to create since the author need only paste in a result block and guesstimate the numeric similarity value.

However, this can result in very verbose documents. The problem is rooted in the fact that the output of some commands is a long JSON document, but we might only be interested in a single key/value pair within that document, for example "provisioningState": "Succeeded".

We should provide an alternative trigger for results blocks which does not actually use the content in the document itself but instead uses a regular expression to generate a true/false value based on the match. For example <-- expected_similarity=.*\"provisioningState\": \"Succeeded\" -->

rgardler-msft avatar Feb 14 '23 01:02 rgardler-msft