原书出处
Natural Language Processing in Action, Second Edition
Finally, you can prepare your app to answer questions! Let’s make it return the context of the answer too, not just the answer itself: >>> if question: ... res = pipe.run(query=question, params={ "Reader": {"top_k": 1}, "Retriever": {"top_k": 10}}) ... st.write(f"Answer: {res['answers'][0].answer}") ... st.write(f"Context: {res['answers'][0].context}") And your QA app is ready! Let’s give it a try. When you ask your retrieval-augmented LLM the question, “Who invented
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-10.html
EPUB SHA-256:0e9a35e49ca446e322e5524e53f39fb6bee5b2b23d9cda10ef052aca770b0b36