Semantic Similarity search (cosine similarity) for autocomplete is implemented.
A user query is embedded through the /embed endpoint and top 5 suggestions are retrieved from the faq_embeddings table (NOTE: top_k suggestion retrieval will be implemented next). The associated text is returned as a suggestion.
The get_semantic_similarity_match() is only called if combined results of get_exact_match() and get_fuzzy_match() return less than 5 results AND after every new "space" character in the question (user query) is added OR when a "?" character is added at the end of the question in the /autocomplete facade.
Implemented in autocomplete/app/main.py through get_semantic_similarity_match() and deployed through the /autocomplete/semantic_similarity_match/ endpoint.
Description
Semantic Similarity search (cosine similarity) for autocomplete is implemented.
A user query is embedded through the /embed endpoint and top 5 suggestions are retrieved from the faq_embeddings table (NOTE: top_k suggestion retrieval will be implemented next). The associated text is returned as a suggestion.
The get_semantic_similarity_match() is only called if combined results of get_exact_match() and get_fuzzy_match() return less than 5 results AND after every new "space" character in the question (user query) is added OR when a "?" character is added at the end of the question in the /autocomplete facade.
Implemented in autocomplete/app/main.py through get_semantic_similarity_match() and deployed through the /autocomplete/semantic_similarity_match/ endpoint.