Questions tagged [haystack]

Use this tag for questions related to Haystack NLP framework.

Haystack is an end-to-end open source framework for creating NLP powered search systems. The pipelines that you create with it are customizable, production ready and well integrated with cutting edge projects like HuggingFace, Milvus and Elasticsearch. On top of keyword search, Haystack provides all the tools necessary to perform tasks like question answering or semantic document search so that your users can start querying in natural language.

To learn more about the framework follow the documentation link, or have a look at the GitHub repository.

46 questions
1
vote
1 answer

How to extract sub-string from Haystack's print_answers

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…
1
vote
0 answers

import error elasticsearch in haystack python

i am just trying to learn Haystack. I am trying a develop a usecase but i am getting error in the starting import itself. I tried many ways. i even downloaded elasticsearch.zip file. I really dont know what to do. import os from…
1
vote
0 answers

Haystack PDFToTextConverter: getText() got an unexpected keyword argument 'textpage'

I tried the haystack beginner tutorial. It works fine. Now I try to use a local pdf on my PC instead of the articles from the Game of Thrones Wikipedia and I always get an error. This is the code from haystack.nodes import PDFToTextConverter from…
geoidiot
  • 107
  • 2
  • 12
1
vote
1 answer

Haystack: PromptNode takes too much time to load the model

I use the below code based on the tutorials from Haystack: lfqa_prompt = PromptTemplate("deepset/question-answering-with-references", output_parser=AnswerParser(reference_pattern=r"Document\[(\d+)\]")) prompt_node =…
user3164187
  • 1,382
  • 3
  • 19
  • 50
1
vote
0 answers

FARMReader is timeout

It get stuck in FARMReader for long (30+ mins) and time out. Any reason? reader = FARMReader(model_name_or_path="deepset/roberta-base-squad2",use_gpu=True) retriever = ElasticsearchRetriever(document_store= document_store) pipe =…
1
vote
1 answer

Cuda memory error while running haystack prompt node with gpu

I am having Cuda ran out of memory issue while running this code: prompt_node = PromptNode(model_name_or_path = 'google/flan-t5-xl', default_prompt_template=lfqa_prompt, use_gpu=True, max_length=300) I tried to solve the issue with Cuda. I am using…
sherin_a27
  • 153
  • 8
1
vote
1 answer

In Python, how to yield the results of the call to another class's function?

Very little experience of Python, struggling with the best pattern here. I have a generator function, and I would like this function to yield the return value of another function until exhausted. This is using the streaming feature of Haystack's…
serlingpa
  • 12,024
  • 24
  • 80
  • 130
1
vote
0 answers

Segmentation fault: 11 when loading Haystack DensePassageRetriever

I am trying to run this Question Answering model using this doc https://haystack.deepset.ai/tutorials/12_lfqa, but running into segmentation fault as below. I am using Python 3.9.17. May laptop has 64 GB RAM, and when I checked the Activity Monitory…
1
vote
1 answer

ModuleNotFoundError: No module named 'haystack.nodes'

I am following the tutorial from haystacks website for Extractive QA system. I am trying to convert PDF to Text. Link to the blog is here : (https://www.deepset.ai/blog/automating-information-extraction-with-question-answering) I pip installed…
1
vote
1 answer

How do I install Haystack without CUDA?

I have integrated the Haystack vector search library into my Django application, and now I'm going through and attempting to turn the project into a Docker container. Everything is working okay, but I have noticed that when I build my Docker…
miller9904
  • 109
  • 9
1
vote
0 answers

Error while running haystack models in CPU

INFO:haystack.modeling.utils:Using devices: CPU - Number of GPUs: 0 Using devices: CPU - Number of GPUs: 0 '<' not supported between instances of 'torch.device' and 'int' I am trying to run a QA model in my local machine which I took from…
1
vote
1 answer

FARM-Haystack Install downgrade Pytorch Causes CUDA Incompatibility

When running Haystack with GPU I am getting the following error. After digging into it, I realize that Haystack is downgrading Pytorch to a version that isn't compatible with my CUDA. NVIDIA GeForce RTX 3060 with CUDA capability sm_86 is not…
eboraks
  • 167
  • 1
  • 9
1
vote
1 answer

NotImplementedError: 'split_respect_sentence_boundary=True' is only compatible with split_by='word'

I have the following lines of code from haystack.document_stores import InMemoryDocumentStore, SQLDocumentStore from haystack.nodes import TextConverter, PDFToTextConverter,PreProcessor from haystack.utils import clean_wiki_text,…
1
vote
2 answers

Haystack's ElasticsearchDocumentStore() cannot connect running ElasticSearch container

I am using ElasticSearch version 8.5.1 and the latest python library of ElasticSearch concurrent with version 8.5.1. Also, my Python version is 3.10.4. I was trying to follow this tutorial but clearly some of the software have changed a few things…
Kadri
  • 31
  • 8
1
vote
0 answers

Getting error while doing Extractive Question Answering using the Haystack

I am trying to implement the Extractive QA using the ExtractiveQAPipeline from Haystack. I did the following steps: created the ElasticSearchDocuemntStore, then converted files to documents using convert_files_to_docs, written these documents to…