Search engines powered by natural language understanding(NLU) that demonstrates the potential of using KNN with Amazon Elasticsearch Service compared to the traditional Amazon Elasticsearch Service ranking method. Amazon ES offers KNN search, which can enhance search in use cases such as product recommendations, fraud detection, and image, video, and some specific semantic scenarios like document and query similarity. With the use of cosine similarity, you can measure the orientation between two vectors, which makes it the ideal choice for some specific semantic search applications. With AWS architecture you are able to build enterprise-grade search engine with enhanced KNN ranking, with high availability and performance.
We take a pre-trained BERT model(distilbert-base-nli-stsb-mean-tokens) from Sentence-Transformers to generate feature vectors(aka. word embeddings) of each description of book corpus and store them as a KNN index in an Amazon ES domain.
- pre-trained BERT model
- Amazon SageMaker
- AWS Lambda
- Amazon Elasticsearch Service-version 7.7
- AWS Cloudformation
- AWS S3
- PyTorch
- Python-Python 3.6 or higher
- (TDB)