Search code examples
pythonrenameopensearchnlp-question-answeringhaystack

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 there is a way or need to specify a special Inputtext "column" for the retriever and reader.


Solution

  • Other information that are not relevant for retrieval should stay in the meta field of Documents. For example you could create documents like:

    doc = Document(
        content="this is relevant for retrieval", 
        meta={"uuid": "1234",  "comment": "this won't be used for retrieval"}
    )