Haystack v0.7.0 adds summarization pipelines, a demo UI, batch/generator document streaming, and filter support for DensePassageRetriever.
$ git clone --branch v0.7.0 https://github.com/deepset-ai/haystack.git # already have the repo? check out this version: $ git checkout v0.7.0
from haystack.pipeline import SearchSummarizationPipeline from haystack.summarizer import TransformersSummarizer summarizer = TransformersSummarizer(model_name_or_path="google/pegasus-xsum") pipe = SearchSummarizationPipeline(summarizer=summarizer, retriever=retriever) results = pipe.run(query="What caused the California wildfires?")
document_store.update_embeddings(retriever=retriever, batch_size=10000)
- ›Adds
batch_sizeparameters to mostDocumentStoremethods (write_documents(), update_embeddings(), get_all_documents()) to load documents in chunks and reduce memory footprint on large datasets. - ›Adds get_all_documents_generator() method to stream documents one-by-one from a document store, enabling low-memory iteration over datasets exceeding 1 million documents.
- ›Adds
TransformersSummarizerclass supporting models like PEGASUS, usable standalone via summarizer.predict(documents=docs, generate_single_summary=False) or as a pipeline node. - ›Adds
SearchSummarizationPipelinepredefined pipeline that chains retrieval and summarization in a single pipe.run() call. - ›Adds a simple demo UI for interactively testing search pipelines, inspecting API responses, and adjusting basic config params.
+2 moreshow less
- ›Adds filter support for
DensePassageRetrievercombined withInMemoryDocumentStore. - ›Adds support for a custom embedding field in
InMemoryDocumentStore.
- !The
index_buffer_sizeargument is removed from FAISSDocumentStore.__init__(); replace it with the newbatch_sizeargument on methods like write_documents(), update_embeddings(), and get_all_documents(). - !The
PreProcessorargumentsplit_strideis renamed tosplit_overlap; any code passingsplit_stride=Nmust be updated tosplit_overlap=N.