Experimental components and features for the Haystack LLM framework.
Project description
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
[!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
The latest version of the package contains the following experiments:
Name | Type | Expected experiment end date | Dependencies |
---|---|---|---|
EvaluationHarness |
Evaluation orchestrator | October 2024 | None |
OpenAIFunctionCaller |
Function Calling Component | October 2024 | None |
OpenAPITool |
OpenAPITool component | October 2024 | jsonref |
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 and resources that can be found in the examples
folder.
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(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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file haystack_experimental-0.1.1.tar.gz
.
File metadata
- Download URL: haystack_experimental-0.1.1.tar.gz
- Upload date:
- Size: 31.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64cc58d54b9cf9a2957616e4cb44a10c12e36ab640ebe0c38e7cc70300cb6726 |
|
MD5 | 05becbb8d50e43577c70a5cc7ecc39b2 |
|
BLAKE2b-256 | 59e0ddb0c17cc85885f94701cec419afddca1fd4ffd5cbe3688552f2ecbfe6c6 |
File details
Details for the file haystack_experimental-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: haystack_experimental-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c11fa89c0754dafd3ec25220c02e459d784acda7a9c047e3297e1b11f35ebb06 |
|
MD5 | 9abd6fbec2197704af276eeea582655f |
|
BLAKE2b-256 | 413670025edde09c13f15df103dae07c2bd9972fdf8bcbb51208a62cb08da5ed |