Summary
Propose a new cookbook that walks through an end-to-end Haystack 2.x RAG path on Future AGI:
Haystack RAG pipeline → traceAI-haystack instrumentation → traces in Observe → at least one eval on answer / grounding quality
This was originally opened on the platform repo as future-agi/future-agi#1648. @hadarishav asked to move it here since cookbooks live in this docs repo. Happy to own the PR once scope looks good.
Why this cookbook
- Haystack already has auto-instrumentation docs (
/docs/integrations/traceai/haystack, /docs/tracing/auto/haystack) and a traceAI-haystack package, but there is no cookbook parallel to LlamaIndex PDF RAG or LangChain RAG.
- Framework users typically land on cookbooks first; the integration page covers how to instrument, not how to go from first pipeline run to first useful eval.
- Closes the loop Future AGI advertises (observe → evaluate → improve) for the Haystack ecosystem specifically.
Proposed page
| Field |
Proposal |
| Path |
src/pages/docs/cookbook/haystack-rag.mdx |
| URL |
/docs/cookbook/haystack-rag |
| Sibling analogues |
llamaindex-pdf-rag.mdx, rag-langchain.mdx, evaluate-rag.mdx |
| Related existing docs |
/docs/integrations/traceai/haystack, /docs/tracing/auto/haystack |
Frontmatter (draft)
title: "Haystack RAG with Future AGI Observability and Evaluation"
description: "Build a Haystack 2.x RAG pipeline, instrument it with traceAI-haystack, view traces in Observe, and evaluate answer grounding and relevance."
Scope (v1)
In scope
- Minimal Haystack 2.x RAG
- Retriever + generator (in-memory document store preferred so readers can run without external infra).
- Small static corpus (a few short docs) checked into the cookbook or linked from a companion notebook/repo.
- Instrumentation
fi-instrumentation + traceAI-haystack (HaystackInstrumentor) wired to Future AGI (cloud and/or self-host notes).
- Env vars:
FI_API_KEY, FI_SECRET_KEY, LLM provider key.
- Observe
- Steps to find the project, open a trace, and inspect retriever / LLM spans.
- Evaluation
- At least one built-in RAG-relevant eval (e.g. context adherence / answer relevance / groundedness-style metric), either inline eval tags on the tracer or a small post-run
Evaluator path, matching patterns used in existing cookbooks.
- Docs quality
- Prerequisites, install, copy-pasteable Python, expected UI outcomes, troubleshooting table, next-steps links to Haystack integration + RAG eval cookbooks.
- Register the page in navigation / cookbook index.
Out of scope for v1 (unless you prefer otherwise)
- Dataset export from traces for offline batch evals
- Citation / reference-range deep dive (related Haystack work: deepset-ai/haystack#11623)
- Multi-agent Haystack pipelines, production vector DBs, Gradio/Streamlit UI
Acceptance criteria
References
Questions for maintainers
- Preferred path / slug:
haystack-rag vs haystack-pdf-rag vs under cookbook/quickstart/?
- Target surface: Future AGI cloud only for v1, or also call out self-host OTLP endpoint?
- Eval style to match: inline
eval_tags on register() (LangChain RAG style) vs separate Evaluator / experiment flow?
- Any cookbook playbook / frontmatter schema (products, frameworks, difficulty, last-tested-with, etc.) I should follow for new pages right now?
- Should companion code live only in the MDX, or also under
future-agi/cookbooks (as with some LlamaIndex pages)?
Offer
I can open a PR against dev with a first draft once you confirm path + eval style. Starting point will be a minimal in-memory Haystack RAG + HaystackInstrumentor + one grounding/relevance eval, then iterate on review feedback.
Summary
Propose a new cookbook that walks through an end-to-end Haystack 2.x RAG path on Future AGI:
Haystack RAG pipeline →
traceAI-haystackinstrumentation → traces in Observe → at least one eval on answer / grounding qualityThis was originally opened on the platform repo as future-agi/future-agi#1648. @hadarishav asked to move it here since cookbooks live in this docs repo. Happy to own the PR once scope looks good.
Why this cookbook
/docs/integrations/traceai/haystack,/docs/tracing/auto/haystack) and atraceAI-haystackpackage, but there is no cookbook parallel to LlamaIndex PDF RAG or LangChain RAG.Proposed page
src/pages/docs/cookbook/haystack-rag.mdx/docs/cookbook/haystack-ragllamaindex-pdf-rag.mdx,rag-langchain.mdx,evaluate-rag.mdx/docs/integrations/traceai/haystack,/docs/tracing/auto/haystackFrontmatter (draft)
Scope (v1)
In scope
fi-instrumentation+traceAI-haystack(HaystackInstrumentor) wired to Future AGI (cloud and/or self-host notes).FI_API_KEY,FI_SECRET_KEY, LLM provider key.Evaluatorpath, matching patterns used in existing cookbooks.Out of scope for v1 (unless you prefer otherwise)
Acceptance criteria
References
Questions for maintainers
haystack-ragvshaystack-pdf-ragvs undercookbook/quickstart/?eval_tagsonregister()(LangChain RAG style) vs separateEvaluator/ experiment flow?future-agi/cookbooks(as with some LlamaIndex pages)?Offer
I can open a PR against
devwith a first draft once you confirm path + eval style. Starting point will be a minimal in-memory Haystack RAG +HaystackInstrumentor+ one grounding/relevance eval, then iterate on review feedback.