Fix Last-Talked-About when searching for directions (conflict: find_connection vs. find_platform)
tuetschek opened this issue · 3 comments
When the user searches for directions and requests the same origin and destination stops, the last-lalked-about feature of the tracker will assume find_platform
as possible:
User 1: chci jet z anděla na anděl
User 2: .
User DA confusion network:
1.000 inform(to_stop="Anděl")
1.000 inform(task="find_connection")
1.000 inform(from_stop="Anděl")
User best DA hypothesis:
1.000 inform(to_stop="Anděl")&inform(task="find_connection")&inform(from_stop="Anděl")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2015-03-13--17-14-16.404085-CET MainProcess : DEBUG
D3State Dialogue Act in:
1.000 inform(to_stop="Anděl")
1.000 inform(task="find_connection")
1.000 inform(from_stop="Anděl")
2015-03-13--17-14-16.459823-CET MainProcess : DEBUG
Context Resolution - Dialogue Act:
1.000 inform(to_stop="Anděl")
1.000 inform(task="find_connection")
1.000 inform(from_stop="Anděl")
2015-03-13--17-14-16.463276-CET MainProcess : DEBUG
Last Talked About Inference - Dialogue Act:
1.000 inform(to_stop="Anděl")
1.000 inform(task="find_connection")
1.000 inform(lta_task="find_platform")
1.000 inform(lta_task="find_connection")
1.000 inform(lta_task="find_connection")
1.000 inform(from_stop="Anděl")
The output still kinda makes sense, so it' not critical, but it is not ideal:
System DA: iconfirm(to_stop="Anděl")&iconfirm(from_stop="Anděl")&inform(platform="not_found")&inform(direction="Anděl")
2015-03-13--17-14-16.562856-CET MainProcess : INFO
SEARCHING: to(Praha, Anděl)
System: Dobře, ze zastávky Anděl do zastávky Anděl. Spoj do Anděl nebyl nalezen.
TTS-prep: 2015-03-13--17-14-16.577854-CET MainProcess : INFO
PlatformFinder from and to has not been found:
Anděl, Praha -- Anděl, Praha
Dobře, ze zastávky Anděl do zastávky Anděl. Spoj do Anděl nebyl nalezen.
I have just found out that this is much more serious since it occurs also with valid directions requests:
User 1: z klamovky na anděl
User 2: .
User DA confusion network:
1.000 inform(to_stop="Anděl")
1.000 inform(from_stop="Klamovka")
User best DA hypothesis:
1.000 inform(to_stop="Anděl")&inform(from_stop="Klamovka")
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2015-03-17--14-43-30.620534-CET MainProcess : DEBUG
D3State Dialogue Act in:
1.000 inform(to_stop="Anděl")
1.000 inform(from_stop="Klamovka")
2015-03-17--14-43-30.650679-CET MainProcess : DEBUG
Context Resolution - Dialogue Act:
1.000 inform(to_stop="Anděl")
1.000 inform(from_stop="Klamovka")
2015-03-17--14-43-30.665867-CET MainProcess : DEBUG
Last Talked About Inference - Dialogue Act:
1.000 inform(to_stop="Anděl")
1.000 inform(lta_task="find_platform")
1.000 inform(lta_task="find_connection")
1.000 inform(from_stop="Klamovka")
[...]
2015-03-17--14-43-30.693564-CET MainProcess : INFO
ALEX: Looking up platform for: Klamovka -- Anděl
2015-03-17--14-43-30.701266-CET MainProcess : INFO
SEARCHING: from(none, Klamovka)
System DA: iconfirm(to_stop="Anděl")&iconfirm(from_stop="Klamovka")&inform(platform="not_found")&inform(direction="Anděl")
System: Dobře, ze zastávky Klamovka do zastávky Anděl. Spoj do Anděl nebyl nalezen.
TTS-prep: Dobře, ze zastávky Klamovka do zastávky Anděl. Spoj do Anděl nebyl nalezen.
2015-03-17--14-43-30.756918-CET MainProcess : INFO
SEARCHING: to(none, Anděl)
2015-03-17--14-43-30.763344-CET MainProcess : INFO
PlatformFinder from and to has not been found:
Klamovka, none -- Anděl, none
I guess the most sensible thing to do would be to run both branches (find_connection and find_platform) and then make a decision about which one to use based on their output? (e.g. if one of them successfully completes its task, return its value)
Another possibility would be to introduce some pre-conditions for the tasks and prefer one method over the other using these? But this way introduces additional code for each task that needs to be synced with the tasks's actual code, and perhaps is good only for making irreversible changes.
What do you think?
I don't know... I find the behavior very confusing – how can this happen at all? I tried to look at the code but I really don't understand what's going on in LTA, that's why I haven't attempted to fix it.
I thought that nothing can trigger the find_platform
task unless you ask for it explicitly... i.e. mention "nástupiště" in your request.
I think that find_connection
should be the default unless explicitly asked otherwise. Why is that not possible?