Skip to main content

Experimental components and features for the Haystack LLM framework.

Project description

PyPI - Version PyPI - Python Version Tests Project release on PyPi Hatch project Checked with mypy

Haystack experimental package

The haystack-experimental package provides Haystack users with access to experimental features without immediately committing to their official release. The main goal is to gather user feedback and iterate on new features quickly.

Installation

For simplicity, every release of haystack-experimental will ship all the available experiments at that time. To install the latest experimental features, run:

$ pip install -U haystack-experimental

Install from the main branch to try the newest features:

pip install git+https://github.com/deepset-ai/haystack-experimental.git@main

[!IMPORTANT] The latest version of the experimental package is only tested against the latest version of Haystack. Compatibility with older versions of Haystack is not guaranteed.

Experiments lifecycle

Each experimental feature has a default lifespan of 3 months starting from the date of the first non-pre-release build that includes it. Once it reaches the end of its lifespan, the experiment will be either:

  • Merged into Haystack core and published in the next minor release, or
  • Released as a Core Integration, or
  • Dropped.

Experiments catalog

Active experiments

Name Type Expected End Date Dependencies Cookbook Discussion
OpenAIChatGenerator Chat Generator Component November 2025 None Open In Colab Discuss
MarkdownHeaderLevelInferrer Preprocessor January 2025 None None Discuss
Agent; Confirmation Policies; ConfirmationUIs; ConfirmationStrategies; ConfirmationUIResult and ToolExecutionDecision HITLBreakpointException Human in the Loop December 2025 rich None Discuss
LLMSummarizer Document Summarizer January 2025 None None Discuss
InMemoryChatMessageStore; ChatMessageRetriever; ChatMessageWriter Chat Message Store, Retriever, Writer February 2025 None Open In Colab Discuss

Adopted experiments

Name Type Final release
ChatMessage refactoring; Tool class; tool support in ChatGenerators; ToolInvoker Tool Calling support 0.4.0
AsyncPipeline; Pipeline bug fixes and refactoring AsyncPipeline execution 0.7.0
LLMMetadataExtractor Metadata extraction with LLM 0.7.0
Auto-Merging Retriever & HierarchicalDocumentSplitter Document Splitting & Retrieval Technique 0.8.0
Agent Simplify Agent development 0.8.0
SuperComponent Simplify Pipeline development 0.8.0
Pipeline Pipeline breakpoints for debugging 0.12.0
ImageContent; Image Converters; multimodal support in OpenAIChatGenerator and AmazonBedrockChatGenerator; ChatPromptBuilder refactoring; SentenceTransformersDocumentImageEmbedder; LLMDocumentContentExtractor; new Routers Multimodality 0.12.0
QueryExpander Query Expansion Component 0.14.3
MultiQueryEmbeddingRetriever MultiQueryEmbeddingRetriever 0.14.3
MultiQueryTextRetriever MultiQueryTextRetriever 0.14.3
EmbeddingBasedDocumentSplitter Document Splitting 0.15.2

Discontinued experiments

Name Type Final release Cookbook
OpenAIFunctionCaller Function Calling Component 0.3.0 None
OpenAPITool OpenAPITool component 0.3.0 Notebook
EvaluationHarness Evaluation orchestrator 0.7.0 None

Usage

Experimental new features can be imported like any other Haystack integration package:

from haystack.dataclasses import ChatMessage
from haystack_experimental.components.generators import FoobarGenerator

c = FoobarGenerator()
c.run([ChatMessage.from_user("What's an experiment? Be brief.")])

Experiments can also override existing Haystack features. For example, users can opt into an experimental type of Pipeline by just changing the usual import:

# from haystack import Pipeline
from haystack_experimental import Pipeline

pipe = Pipeline()
# ...
pipe.run(...)

Some experimental features come with example notebooks that can be found in the Haystack Cookbook.

Documentation

Documentation for haystack-experimental can be found here.

Implementation

Experiments should replicate the namespace of the core package. For example, a new generator:

# in haystack_experimental/components/generators/foobar.py

from haystack import component


@component
class FoobarGenerator:
    ...

When the experiment overrides an existing feature, the new symbol should be created at the same path in the experimental package. This new symbol will override the original in haystack-ai: for classes, with a subclass and for bare functions, with a wrapper. For example:

# in haystack_experiment/src/haystack_experiment/core/pipeline/pipeline.py

from haystack.core.pipeline import Pipeline as HaystackPipeline


class Pipeline(HaystackPipeline):
    # Any new experimental method that doesn't exist in the original class
    def run_async(self, inputs) -> Dict[str, Dict[str, Any]]:
        ...

    # Existing methods with breaking changes to their signature, like adding a new mandatory param
    def to_dict(self, new_param: str) -> Dict[str, Any]:
        # do something with the new parameter
        print(new_param)
        # call the original method
        return super().to_dict()

Contributing

Direct contributions to haystack-experimental are not expected, but Haystack maintainers might ask contributors to move pull requests that target the core repository to this repository.

Telemetry

As with the Haystack core package, we rely on anonymous usage statistics to determine the impact and usefulness of the experimental features. For more information on what we collect and how we use the data, as well as instructions to opt-out, please refer to our documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haystack_experimental-0.16.0.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haystack_experimental-0.16.0-py3-none-any.whl (67.2 kB view details)

Uploaded Python 3

File details

Details for the file haystack_experimental-0.16.0.tar.gz.

File metadata

  • Download URL: haystack_experimental-0.16.0.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for haystack_experimental-0.16.0.tar.gz
Algorithm Hash digest
SHA256 ea24551354c8554c1cf806815b25c34ea21c788e1c14923d97a88e5137b295df
MD5 5d5e679d3bee538aff61d5fedd682fb8
BLAKE2b-256 5e01c6e51bc9c0594d465a581f585932570a75757d772fac9a1c3903d92f03c8

See more details on using hashes here.

File details

Details for the file haystack_experimental-0.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for haystack_experimental-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 071a8232d7df65b99a67d8b525a462da3149b84ce2e8ae23a1ce17768c67890d
MD5 d38a327982c2576d233d69102f1d2c66
BLAKE2b-256 0abf74b82bf2b8dfca2c418b229760635c5a623a10afed4acbb252873441136b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page