Bug in autosuggest: the behaviour defined in the /autocomplete/ facade doesn't return suggestions when exact match and fuzzy match "fail", and last query character is not a " " or a "?". With the current implementation, when writing new characters that are not a " " or a "?", the autosuggest list disappears when exact match and fuzzy search are not called.
With the current autocomplete behaviour (exact match + fuzzy match in parallel (async)), if there are less than 5 autosuggest suggestions, AND the last query character is a " " (space) OR a "?", THEN run semantic similarity match.
Eg. "Que signifie " will return a list of autosuggestions, whereas "Que signifie a" will not return a list.
Steps to Reproduce
# navigate to eak-copilot root
git checkout main
docker-compose up --build
# navigate to localhost:8010/docs and run /init_faq_vectordb
# navigate to localhost:3000
# enter a prompt such as "Que signifie " and compare with "Que signifie a"
Expected Behavior
The autosuggest list is still displayed.
Actual Behavior
The autosuggest list disappears.
Possible Solution
Possibly cache the autosuggestions and only update when a new " " or "?" character is present at the end of the query string.
Description
Bug in autosuggest: the behaviour defined in the /autocomplete/ facade doesn't return suggestions when exact match and fuzzy match "fail", and last query character is not a " " or a "?". With the current implementation, when writing new characters that are not a " " or a "?", the autosuggest list disappears when exact match and fuzzy search are not called.
With the current autocomplete behaviour (exact match + fuzzy match in parallel (async)), if there are less than 5 autosuggest suggestions, AND the last query character is a " " (space) OR a "?", THEN run semantic similarity match.
Eg. "Que signifie " will return a list of autosuggestions, whereas "Que signifie a" will not return a list.
Steps to Reproduce
Expected Behavior
The autosuggest list is still displayed.
Actual Behavior
The autosuggest list disappears.
Possible Solution
Possibly cache the autosuggestions and only update when a new " " or "?" character is present at the end of the query string.
@tabee