home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.08k stars 29.15k forks source link

Changes in prioritisation of sentence matching in Assist have unwanted consequences #118692

Open jlpouffier opened 1 month ago

jlpouffier commented 1 month ago

The problem

The sentences to add items to a todo list in French are complex: https://github.com/home-assistant/intents/blob/main/sentences/fr/todo_HassListAddItem.yaml

This is because the article that a French speaker puts in front of the item to add (And before the add verb) depends on if the article is masculine, feminine, countable or not, plural or not.

So if a user wants to add

The sentences created long ago worked well in core-2024.5.5, as shown in this screenshot: CleanShot 2024-06-03 at 09 23 13

You can see the different articles being ignored, and the correct item being added to the list. (NOTE: I just rolled back to confirm this behavior)

Since 2024.6 (I am currently on core-2024.6.0b5, it is not the case anymore. The different articles are now matched with the item, as shown in this screenshot: CleanShot 2024-06-03 at 09 19 16

I think this is due to a change in how the literal chunks of text are prioritized in our matching logic.

@synesthesiam: Is this a problem in our logic? Or should we change our sentences?

Thx a lot

What version of Home Assistant Core has the issue?

core-2024.6.0b5

What was the last working version of Home Assistant Core?

core-2024.5.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

assist_pipeline

Link to integration documentation on our website

https://www.home-assistant.io/integrations/assist_pipeline/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @home-assistant/core, @synesthesiam, mind taking a look at this issue as it has been labeled with an integration (conversation) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `conversation` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign conversation` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


conversation documentation conversation source (message by IssueLinks)

home-assistant[bot] commented 1 month ago

Hey there @balloob, @synesthesiam, mind taking a look at this issue as it has been labeled with an integration (assist_pipeline) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `assist_pipeline` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign assist_pipeline` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


assist_pipeline documentation assist_pipeline source (message by IssueLinks)

synesthesiam commented 1 month ago

This is surprising to me. Sentences with more literal text chunks matched are prioritized, so I would expect the text matched by the wildcard to be less. I will need to test this more and figure out what's happening.