For a sentence like:
list issues assigned to Kevin labeled urgent
I would like to extract two entities, one “assignment” entity with value “Kevin” and another “label” entity with value “urgent”.
I’ve been feeding the model examples like:
list [open](open_status) issues [assigned to Amy]{"entity": "assignment", "value": "Amy"} [labeled prototype]{"entity": "label", "value": "background"}
and it’s extracting the “assignment” entity as “assigned to Kevin” rather than just “Kevin”. I’m not sure whether this is a matter of not having given the model enough examples, or whether I should be using a regex – is there a way to extract match groups from the regex?
Basically I just want the model to return the object of certain “trigger” words like “assigned to” and “labeled”.
Is there a way to do this canonically?