CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-farm-haystack

LLM framework to build customizable, production-ready LLM applications with pipelines connecting models, vector DBs, and data processors.

Pending
Overview
Eval results
Files

pipelines.mddocs/

Pipeline System

Pre-built and custom pipeline templates for orchestrating component workflows including QA, search, generation, and indexing pipelines.

Core Imports

from haystack import Pipeline
from haystack.pipelines import ExtractiveQAPipeline, GenerativeQAPipeline, DocumentSearchPipeline

Base Pipeline

from haystack import Pipeline
from haystack.nodes.base import BaseComponent
from typing import Dict, List, Any, Optional

class Pipeline:
    def __init__(self):
        """Initialize an empty pipeline."""
    
    def add_node(self, component: BaseComponent, name: str, inputs: List[str]) -> None:
        """
        Add a component to the pipeline.
        
        Args:
            component: Component instance to add
            name: Unique name for the component in pipeline
            inputs: List of input names this component receives from
        """
    
    def run(self, query: Optional[str] = None, file_paths: Optional[List[str]] = None,
            labels: Optional[List] = None, documents: Optional[List] = None,
            meta: Optional[Dict[str, Any]] = None, **kwargs) -> Dict[str, Any]:
        """
        Run the pipeline with given inputs.
        
        Args:
            query: Query string for QA/search pipelines
            file_paths: File paths for indexing pipelines
            labels: Labels for evaluation pipelines
            documents: Documents for processing
            meta: Additional metadata
            
        Returns:
            Dictionary with pipeline results
        """

Extractive QA Pipeline

from haystack.pipelines import ExtractiveQAPipeline
from haystack.nodes.reader.base import BaseReader
from haystack.nodes.retriever.base import BaseRetriever

class ExtractiveQAPipeline(Pipeline):
    def __init__(self, reader: BaseReader, retriever: BaseRetriever):
        """
        Initialize extractive QA pipeline.
        
        Args:
            reader: Reader component for answer extraction
            retriever: Retriever component for document retrieval
        """

Generative QA Pipeline

from haystack.pipelines import GenerativeQAPipeline

class GenerativeQAPipeline(Pipeline):
    def __init__(self, generator, retriever):
        """
        Initialize generative QA pipeline.
        
        Args:
            generator: Generator component for answer generation
            retriever: Retriever component for document retrieval
        """

Document Search Pipeline

from haystack.pipelines import DocumentSearchPipeline

class DocumentSearchPipeline(Pipeline):
    def __init__(self, retriever: BaseRetriever):
        """
        Initialize document search pipeline.
        
        Args:
            retriever: Retriever component for document search
        """

Install with Tessl CLI

npx tessl i tessl/pypi-farm-haystack

docs

agents.md

core-schema.md

document-stores.md

evaluation-utilities.md

file-processing.md

generators.md

index.md

pipelines.md

readers.md

retrievers.md

tile.json