mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-03 11:19:57 +00:00
Update faq model (#1401)
This commit is contained in:
parent
e4c3c3d423
commit
980d88a0f2
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user