Tool retrieval: catch 'add X to (my) contacts' / 'address book' phrasings
The literal phrase 'add to contacts' missed when there was a name between 'add' and 'to', e.g. 'add Pat to my contacts'. Anchor on the tail with 'to my contacts', 'to contacts', 'to address book' so word boundaries fire regardless of what sits in front.
This commit is contained in:
parent
6d1d626d87
commit
8a00f954a9
1 changed files with 4 additions and 0 deletions
|
|
@ -372,6 +372,10 @@ class ToolIndex:
|
|||
frozenset({"save contact", "add contact", "new contact", "update contact",
|
||||
"edit contact", "delete contact", "remove contact",
|
||||
"save this person", "add to contacts", "save to contacts",
|
||||
# "add <name> to (my) contacts" — words between 'add' and
|
||||
# 'contacts' break the literal phrase match above, so anchor
|
||||
# on the tail.
|
||||
"to my contacts", "to contacts", "to address book",
|
||||
# "save this for <person>" / "save it for <person>" — the user
|
||||
# is storing info on a known person without using the literal
|
||||
# word 'contact'. Catches the address/phone-paste pattern.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue