Update faq model (#1401)

This commit is contained in:
Branden Chan 2021-09-01 18:39:06 +02:00 committed by GitHub
parent e4c3c3d423
commit 980d88a0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -162,7 +162,7 @@
"document_store = ElasticsearchDocumentStore(host=\"localhost\", username=\"\", password=\"\",\n",
" index=\"document\",\n",
" embedding_field=\"question_emb\",\n",
" embedding_dim=768,\n",
" embedding_dim=384,\n",
" excluded_meta_data=[\"question_emb\"])"
]
},
@ -182,7 +182,7 @@
"execution_count": null,
"outputs": [],
"source": [
"retriever = EmbeddingRetriever(document_store=document_store, embedding_model=\"deepset/sentence_bert\", use_gpu=True)"
"retriever = EmbeddingRetriever(document_store=document_store, embedding_model=\"sentence-transformers/all-MiniLM-L6-v2\", use_gpu=True)"
],
"metadata": {
"collapsed": false,

View File

@ -35,7 +35,7 @@ def tutorial4_faq_style_qa():
document_store = ElasticsearchDocumentStore(host="localhost", username="", password="",
index="document",
embedding_field="question_emb",
embedding_dim=768,
embedding_dim=384,
excluded_meta_data=["question_emb"],
similarity="cosine")
@ -43,7 +43,7 @@ def tutorial4_faq_style_qa():
# Instead of retrieving via Elasticsearch's plain BM25, we want to use vector similarity of the questions (user question vs. FAQ ones).
# We can use the `EmbeddingRetriever` for this purpose and specify a model that we use for the embeddings.
#
retriever = EmbeddingRetriever(document_store=document_store, embedding_model="deepset/sentence_bert", use_gpu=True)
retriever = EmbeddingRetriever(document_store=document_store, embedding_model="sentence-transformers/all-MiniLM-L6-v2", use_gpu=True)
# Download a csv containing some FAQ data
# Here: Some question-answer pairs related to COVID-19