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
6
votes
2 answers

ModuleNotFoundError: No module named 'milvus'

Goal: to run this Auto Labelling Notebook on AWS SageMaker Jupyter Labs. Kernels tried: conda_pytorch_p36, conda_python3, conda_amazonei_mxnet_p27. ! pip install farm-haystack -q # Install the latest master of Haystack !pip install…
DanielBell99
  • 896
  • 5
  • 25
  • 57
4
votes
1 answer

TypeError: __init__() missing 1 required positional argument: 'content'

I am using Haystack for searching query when i write documents in document store, Unfortunately This error occurred for me. Here is my code: if __name__ == "__main__": document_store = ElasticsearchDocumentStore( host='localhost', …
a.soltan
  • 53
  • 5
3
votes
1 answer

Haystack: save InMemoryDocumentStore and load it in retriever later to save embedding generation time

I am using InMemory Document Store and an Embedding retriever for the Q/A pipeline. from haystack.document_stores import InMemoryDocumentStore document_store = InMemoryDocumentStore(embedding_dim =768,use_bm25=True)…
sherin_a27
  • 153
  • 8
3
votes
1 answer

ModuleNotFoundError: No module named 'haystack.document_store.elasticsearch'; 'haystack.document_store' is not a package

I am building a Q&A webapp with elasticsearch. I have just successfully installed farm-haystack==1.3.0 and farm with requirements.txt. Now when I import the library, it pops up an error: from haystack.document_store.elasticsearch import…
yts61
  • 1,142
  • 2
  • 20
  • 33
3
votes
0 answers

BulkIndexError: ('2 document(s) failed to index.') - Elasticsearch + Python

At first I found some null values in my preprocessed data, so removed those. (Here's my Data Cleaning Code - and the respective outputs enclosed in '''Comments''') Cleaning and Preprocessing df_merged[df_merged.abstract_x !=…
2
votes
2 answers

How to chain multiple PromptNodes together in a Haystack GenerativeQAPipeline

I'm trying to chain together a simple question answering prompt to an elaboration prompt using Haystack. I had the following code working just fine: import os from haystack.document_stores import InMemoryDocumentStore from haystack.nodes import…
2
votes
1 answer

AttributeError: 'list' object has no attribute 'similarity' when using dense passage retriever (pinecone) in Haystack - Python

I'm getting the following error: "AttributeError: 'list' object has no attribute 'similarity'" When trying to compile my code. I'm running a NLP Q&A pipeline with Haystack. I've recently tried to implement the pinecone vector database, which is…
Sam
  • 25
  • 4
2
votes
0 answers

How to Add Metadata to Haystack Documents Using Pipeline

I'm modifying the Haystack tutorial notebook to make a basic extractive QA system. Everything works great, but now I want to link each answer back to its original .txt file. When printing the predicted answers with pprint, each answer has an…
ekohrt
  • 41
  • 4
2
votes
0 answers

No module named 'transformers.models.ernie_m.configuration_ernie_m'

So I am trying to use Haystack to run a model in Google Colab. I am using this tutorial and I am adapting it to my project. My problem is in the initialization of the reader: from haystack.nodes import FARMReader reader =…
2
votes
2 answers

haystack ElasticsearchDocumentStore unable to connect Elasticsearch

I am new to ElasticSearch as well as haystack and followed the Tutorial: Utilizing Existing FAQs for Question Answering to init the DocumentStore with code: import os import time from haystack.document_stores import ElasticsearchDocumentStore #…
cweih
  • 125
  • 1
  • 9
2
votes
0 answers

farm-haystack with FAISS on Mac (Monterey)

I had a hard time installing farm-haystack with FAISS on Mac. So, I decided to document the solution here for others. When trying to install pip install 'farm-haystack[docstores,faiss]' it failed with the following error xcrun: error: invalid active…
eboraks
  • 167
  • 1
  • 9
2
votes
1 answer

Docker implementation of Haystack on M1

I'm trying to create a dockerfile for a flask-based python app which relies heavily on haystack. The file reads as follows: FROM python:3.9 WORKDIR /app # setting the docker working directory COPY . / # copying all python files, requirements.txt…
Philo
  • 51
  • 5
2
votes
1 answer

How to specify a column for Prediction in Haystack?

I am using an OpenSearchDocumentStore to store my data an feed it to my Haystack pipeline, the data includes uuids and other information, that are not relevant for the prediction but need to stack in the DocumentStore (I was told). Now I wonder if…
2
votes
1 answer

Custom query with Deepstackai haystack

I am exploring deepset haystack and found it very interesting for multiple use cases like a chatbot, search engine, document search, etc But have not found any reference where I can create multiple indexes for different documents and search based on…
Varun
  • 5,001
  • 12
  • 54
  • 85
2
votes
2 answers

Access aws elastic search role based using python elastic search package

I am using deepset/haystack and communicating with elastic search. Using OpenDistroElasticsearchDocumentStore method works fine with username,pasword access to aws elastic search. Doesnt seem to work with role based access when deployed in ec2.…
1
2 3 4