Experiment to test how well USE can work to do Question and Answers from articles.
npm i
npm run train
npm run predictCan we use the Universal Sentence Encoder to find answers to questions?
If we encode both paragraphs and questions using USE, then we can provide better answers to questions by comparing the embeddings than by using simple text comparison like ElasticSearch.
- Pull down data for articles from Wikipedia
- Run the paragraphs through USE
- Save those embeddings
- Have a set of questions to ask those articles
- Run those questions through USE
- Find the most similar vector to the question embedding from the article embeddings
- Use that paragraph as the answer to the question.
Still TODO:
-
Set up Elasticsearch
-
Put each paragraph as an entry into Elasticsearch
-
Do a text search using the question against Elasticsearch
-
Compare results
- Go through both articles and rank the possible paragraphs that can answer the questions. Give them scores from 10 to 1 (if there are 10 answers).
- Rank the answers given by the two systems using the scores.
- Compare the overall rankings of both systems.