Haystack v1.11.0 adds CohereEmbeddingEncoder, headline extraction from Markdown/PDF, TextIndexingPipeline, and document_store parameter on all retrievers.
$ git clone --branch v1.11.0 https://github.com/deepset-ai/haystack.git # already have the repo? check out this version: $ git checkout v1.11.0
from haystack.nodes import MarkdownConverter
converter = MarkdownConverter(extract_headlines=True)
docs = converter.convert(file_path="report.md", meta=None)
print(docs[0].meta['headlines'])
# [{'headline': 'Introduction', 'start_idx': 0, 'level': 1}, ...] results = retriever.retrieve(
query="What is the capital of France?",
document_store=alternate_document_store
) - ›Adds
CohereEmbeddingEncodertoEmbeddingRetriever, supporting Cohere modelssmall,medium, andlargefor document and query embeddings via API key. - ›Adds
extract_headlinesparameter toMarkdownConverterandParsrConverter; extracted headlines are stored indocument.meta['headlines']as a list of dicts withheadline,start_idx, andlevelfields. - ›Adds
document_storeparameter to all BaseRetriever.retrieve() and BaseRetriever.retrieve_batch() implementations, allowing the document store to be specified at query time. - ›Introduces
TextIndexingPipelinefor straightforward text indexing workflows. - ›Adds
__contains__method to Span for membership testing.
+2 moreshow less
- ›Adds exponential backoff decorator applied to OpenAI requests to handle rate limiting automatically.
- ›Adds indexing pipeline type support.
- !
Milvus1DocumentStoreis removed; Milvus versions below 2.x are no longer supported.Milvus2DocumentStorehas been renamed toMilvusDocumentStore— code referencing either old name will break. - !A duplicated meta
namefield that was previously added to document content before embedding in theupdate_embeddingsworkflow has been removed; embeddings generated before this change may differ.