Haystack 2.1.2
โก๏ธ Enhancement Notes
- Enforce JSON mode on OpenAI LLM-based evaluators so that they always return valid JSON output. This is to ensure that the output is always in a consistent format, regardless of the input.
๐ Bug Fixes
FaithfullnessEvaluator
andContextRelevanceEvaluator
now return0
instead ofNaN
when applied to an empty context or empty statements.- Azure generators components fixed, they were missing the
@component
decorator. - Updates the
from_dict
method ofSentenceTransformersTextEmbedder
,SentenceTransformersDocumentEmbedder
,NamedEntityExtractor
,SentenceTransformersDiversityRanker
andLocalWhisperTranscriber
to allowNone
as a valid value for device when deserializing from a YAML file. This allows a deserialized pipeline to auto-determine what device to use using theComponentDevice.resolve_device
logic. - Improves/fixes type serialization of PEP 585 types (e.g.
list[Document]
, and their nested version). This improvement enables better serialization of generics and nested types and improves/fixes matching oflist[X]
and List ` types in component connections after serialization. - Fixed (de)serialization of
NamedEntityExtractor
. Includes updated tests verifying these fixes whenNamedEntityExtractor
is used in pipelines. - The
include_outputs_from
parameter inPipeline.run
correctly returns outputs of components with multiple outputs.