Haystack 1.0 adds Table QA, pipeline-level evaluation, per-node debug propagation, and standardized primitive objects.
$ git clone --branch v1.0.0 https://github.com/deepset-ai/haystack.git # already have the repo? check out this version: $ git checkout v1.0.0
eval_result = pipeline.eval(
labels=labels,
params={"Retriever": {"top_k": 5}},
)
metrics = eval_result.calculate_metrics()
pipeline.print_eval_report(eval_result) retriever = TableTextRetriever(
document_store=document_store,
query_embedding_model="deepset/bert-small-mm_retrieval-question_encoder",
passage_embedding_model="deepset/bert-small-mm_retrieval-passage_encoder",
table_embedding_model="deepset/bert-small-mm_retrieval-table_encoder",
embed_meta_fields=["title", "section_title"]
)
reader = TableReader(
model_name_or_path="google/tapas-base-finetuned-wtq",
max_seq_len=512
) - ›New
TableTextRetrieverclass enables dense retrieval over mixed text and table corpora using three transformer encoders (query_embedding_model,passage_embedding_model,table_embedding_model). - ›New
TableReaderclass built on TAPAS performs Question Answering over table Document objects, returning single-cell answers or aggregation results; acceptsmodel_name_or_pathandmax_seq_lenarguments. - ›New Pipeline.eval() method accepts Label or
MultiLabelobjects and returns anEvaluationResultcontaining per-node, per-sample predictions in a PandasDataFrame. - ›New EvaluationResult.calculate_metrics() method computes retrieval and reader metrics from a stored
EvaluationResult. - ›New Pipeline.print_eval_report() method prints a human-readable summary of an
EvaluationResult.
+4 moreshow less
- ›Pipeline run() now accepts a top-level
debug: Trueparameter that propagates each node's input and output into the pipeline result for inspection. - ›Introduces Document, Answer, Label,
MultiLabel, and Span primitive classes as standardized inputs/outputs across all nodes, enabling IDE autocompletion and structured REST API responses. - ›New package layout exposes all Document Stores from
haystack.document_stores, all node classes fromhaystack.nodes, all pipeline classes fromhaystack.pipelines, and utilities fromhaystack.utils. - ›FARM modeling code migrated into the new
haystack/modelingpackage, removing the external FARM dependency.
- !The Document field
textis renamed tocontent; code writing or readingdoc['text']or Document(text=...) must switch tocontent. - !Reader nodes now return Answer objects instead of plain dicts; code unpacking keys like
answer['score']oranswer['probability']must be updated to the Answer object structure. - !Label constructor argument
questionis renamed toquery, andanswernow requires an Answer object instead of a plain string. - !The
/queryREST API response field names for offsets have changed to match the new Answer primitive format; clients parsing offset fields from v0.x responses must be updated. - !Import paths are reorganized:
haystack.document_store(singular) becomeshaystack.document_stores(plural), andhaystack.pipeline(singular) becomeshaystack.pipelines(plural); old-style imports still work but are deprecated.