Haystack is an open-source, end-to-end framework for building modular, production-ready LLM applications. With SambaNova, you can power Haystack pipelines with state-of-the-art models.

Prerequisites

  • A SambaCloud account and API key
  • Python 3.8 or higher

Installation and setup

  1. Create a virtual environment
python -m venv .venv
source .venv/bin/activate
  1. Install Haystack
pip install haystack-ai
  1. Set your SambaNova API key
export api_key="your_sambanova_api_key"

Example use cases

  • Answer questions from a webpage
  • Build Retrieval-Augmented Generation (RAG) pipelines
  • Orchestrate modular LLM components with SambaNova models

Example notebooks

You can explore example notebooks to see how to build different LLM pipelines with SambaCloud and Haystack.
  • Webpage Q&A Guide: Build a pipeline that answers questions from a webpage
  • RAG guide: Implement Retrieval-Augmented Generation (RAG) with Haystack and SambaCloud
See the Haystack example notebook.