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; BreakpointConfirmationStrategy; HITLBreakpointException Human in the Loop via Breakpoints December 2025 None 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
Mem0MemoryStore MemoryStore April 2025 mem0ai None --

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
Confirmation Policies; ConfirmationUIs; BlockingConfirmationStrategy; ConfirmationUIResult; ToolExecutionDecision Human in the Loop 0.16.0

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.19.0.tar.gz (45.3 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.19.0-py3-none-any.whl (63.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for haystack_experimental-0.19.0.tar.gz
Algorithm Hash digest
SHA256 194f9074f9184a20d2f4efa7b5082dd33118bc886f87937d13e33616cd549067
MD5 0ce97332515487f8be1ca9ee58bb9e8a
BLAKE2b-256 71a302eb86716f4856072feb852555f2d23855bb20c993264dcf4e83dfe87a8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for haystack_experimental-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebe1691a4b8d06f934bad792ff95fb4b6858a2ae08f08519e9cf35b7b439b4bd
MD5 189feb9be903bc4bc5e122469f1ea205
BLAKE2b-256 58c46719e1b03b72ab31729b556a47fe3df1ab7fa233b1d01182f0c5ddadfda6

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