1

I was following this tutorial from pinecone.io about using Haystack's print_answers

And as you can see in the later part of the tutorial, the output carries a lot of string. These string like output is not subscript-able and thus I'm not able to index or slice them

enter image description here



How can I select the text from the output, and display only a desired part, e.g. only this part of the output enter image description here


Blog Link: Long Form Question Answering in Haystack
Sample Code Notebook: Google Colab NB

1 Answers1

1

You can get the Answer with this command: result['answers'][0].answer.

However, that tutorial is quite outdated. I suggest a more recent tutorial with a similar topic and better performance: Creating a Generative QA Pipeline with Retrieval-Augmentation.