list read-back asks the seeds; add and clear keep their tables (V-522)
internal/router/list.go was the last file on the sweep, and the answer is a split rather than one mechanism. What the four paths need is different, and the V-529 comment in the file already had half of the argument. Reading a list back needs one bit — is this about the list — so topicList joins the subjects in cmd/mavend/topics.go and queryList calls turnIsAbout. listQueryPrefixes stays as the offline floor. Which list he named is a noun in the dictionary either way, through the new router.ListNamedIn, which scans the whole utterance: the seeds claim a read-back without eating a prefix, so "что мне нужно в аптеке" has nothing for takeListTag to read the front of. The other three keep their phrase tables, and the header says why. Add and remove have to know WHERE the item starts, and a cosine over a whole utterance does not say which byte the milk begins at. Clear deletes the list, so a false claim loses rows he cannot get back — that is not the trade a margin makes. Measured on TestONNXTopics, four held-out cases added: 27/27, no case regressed. Two existing margins moved by under a hundredth because the new seeds became the runner-up, both still far clear of topicMargin.
This commit is contained in:
@@ -26,6 +26,7 @@ func TestTopicFloorAnswersWithoutSeeds(t *testing.T) {
|
||||
{"какие устройства в сети?", topicNetwork, isNetworkQuery, true},
|
||||
{"что требует внимания?", topicAttend, isAttentionQuery, true},
|
||||
{"что нового в лентах?", topicFeed, feedFloor, true},
|
||||
{"что в списке покупок?", topicList, listFloor, true},
|
||||
{"почему небо синее", topicWeather, isWeatherQuery, false},
|
||||
{"я дома", topicHome, isHomeQuery, false},
|
||||
{"интернет не работает", topicNetwork, isNetworkQuery, false},
|
||||
@@ -93,6 +94,12 @@ func TestONNXTopics(t *testing.T) {
|
||||
// The greeting. It has to lose to topicOther, or fall thin enough that
|
||||
// ParseFeedQuery — which declines a vague noun with no topic — answers.
|
||||
{"что нового?", topicOther, feedFloor},
|
||||
{"что мне надо купить в магазине", topicList, listFloor},
|
||||
{"прочитай мне список", topicList, listFloor},
|
||||
{"что там в аптеке нужно взять", topicList, listFloor},
|
||||
// A task read-back is not a list read-back, and the two collide on
|
||||
// "что у меня".
|
||||
{"какие у меня сейчас задачи", topicOther, listFloor},
|
||||
}
|
||||
|
||||
h := &reactiveHandler{recall: recallWiring{embedder: emb}}
|
||||
|
||||
Reference in New Issue
Block a user