mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-08-27 18:06:17 +00:00
Update Tutorial1_Basic_QA_Pipeline.ipynb (#1489)
* Update Tutorial1_Basic_QA_Pipeline.ipynb passing params to pipeline as dict * Add latest docstring and tutorial changes Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
ff1adb64c2
commit
d569e66bc7
@ -225,13 +225,15 @@ pipe = ExtractiveQAPipeline(reader, retriever)
|
|||||||
```python
|
```python
|
||||||
# You can configure how many candidates the reader and retriever shall return
|
# You can configure how many candidates the reader and retriever shall return
|
||||||
# The higher top_k_retriever, the better (but also the slower) your answers.
|
# The higher top_k_retriever, the better (but also the slower) your answers.
|
||||||
prediction = pipe.run(query="Who is the father of Arya Stark?", top_k_retriever=10, top_k_reader=5)
|
prediction = pipe.run(
|
||||||
|
query="Who is the father of Arya Stark?", params={"Retriever": {"top_k": 10}, "Reader": {"top_k": 5}}
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# prediction = pipe.run(query="Who created the Dothraki vocabulary?", top_k_reader=5)
|
# prediction = pipe.run(query="Who created the Dothraki vocabulary?", params={"Reader": {"top_k": 5}})
|
||||||
# prediction = pipe.run(query="Who is the sister of Sansa?", top_k_reader=5)
|
# prediction = pipe.run(query="Who is the sister of Sansa?", params={"Reader": {"top_k": 5}})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -349,7 +349,9 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"# You can configure how many candidates the reader and retriever shall return\n",
|
"# You can configure how many candidates the reader and retriever shall return\n",
|
||||||
"# The higher top_k_retriever, the better (but also the slower) your answers. \n",
|
"# The higher top_k_retriever, the better (but also the slower) your answers. \n",
|
||||||
"prediction = pipe.run(query=\"Who is the father of Arya Stark?\", top_k_retriever=10, top_k_reader=5)"
|
"prediction = pipe.run(\n",
|
||||||
|
" query=\"Who is the father of Arya Stark?\", params={\"Retriever\": {\"top_k\": 10}, \"Reader\": {\"top_k\": 5}}\n",
|
||||||
|
")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -358,8 +360,8 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# prediction = pipe.run(query=\"Who created the Dothraki vocabulary?\", top_k_reader=5)\n",
|
"# prediction = pipe.run(query=\"Who created the Dothraki vocabulary?\", params={\"Reader\": {\"top_k\": 5}})\n",
|
||||||
"# prediction = pipe.run(query=\"Who is the sister of Sansa?\", top_k_reader=5)"
|
"# prediction = pipe.run(query=\"Who is the sister of Sansa?\", params={\"Reader\": {\"top_k\": 5}})"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user