diff --git a/docs/_src/tutorials/tutorials/1.md b/docs/_src/tutorials/tutorials/1.md index cbdee1b74..b00234bcd 100644 --- a/docs/_src/tutorials/tutorials/1.md +++ b/docs/_src/tutorials/tutorials/1.md @@ -225,13 +225,15 @@ pipe = ExtractiveQAPipeline(reader, retriever) ```python # 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. -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 -# prediction = pipe.run(query="Who created the Dothraki vocabulary?", top_k_reader=5) -# prediction = pipe.run(query="Who is the sister of Sansa?", 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?", params={"Reader": {"top_k": 5}}) ``` diff --git a/tutorials/Tutorial1_Basic_QA_Pipeline.ipynb b/tutorials/Tutorial1_Basic_QA_Pipeline.ipynb index 5efb48d58..5c0a365c3 100644 --- a/tutorials/Tutorial1_Basic_QA_Pipeline.ipynb +++ b/tutorials/Tutorial1_Basic_QA_Pipeline.ipynb @@ -349,7 +349,9 @@ "source": [ "# 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", - "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": {}, "outputs": [], "source": [ - "# prediction = pipe.run(query=\"Who created the Dothraki vocabulary?\", top_k_reader=5)\n", - "# prediction = pipe.run(query=\"Who is the sister of Sansa?\", top_k_reader=5)" + "# 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?\", params={\"Reader\": {\"top_k\": 5}})" ] }, { @@ -425,4 +427,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}