Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Trace with Weights & Biases Weave

Use the Weights & Biases (W&B) Weave service for tracing and monitoring your LLM apps.


About This Task​

Haystack Enterprise Platform integrates with the W&B Weave, a powerful tool for tracking and evaluating LLM-based applications. After connecting Haystack Platform to W&B with your W&B API key, you can add the WeaveConnector component to your pipelines. This component collects your pipeline's traces and sends them to W&B for analysis.

Prerequisites​

You need an API key from Weights & Biases. You also need to install W&B Weave. For details, see the W&B Weave documentation.

Use W&B Weave​

  1. Connect Haystack Enterprise Platform to Weights & Biases through the Integrations page. You can set up the connection for a single workspace or for the whole organization:
Add Weave Integration

Add Workspace-Level Integration​

  1. Click your profile icon and choose Settings.
  2. Go to Workspace>Integrations.
  3. Find the provider you want to connect and click Connect next to them.
  4. Enter the API key and any other required details.
  5. Click Connect. You can use this integration in pipelines and indexes in the current workspace.

Add Organization-Level Integration​

  1. Click your profile icon and choose Settings.
  2. Go to Organization>Integrations.
  3. Find the provider you want to connect and click Connect next to them.
  4. Enter the API key and any other required details.
  5. Click Connect. You can use this integration in pipelines and indexes in all workspaces in the current organization.
  1. Add the WeaveConnector component to your pipeline, but do not connect it to any other component.
  2. Set the pipeline_name parameter in WeaveConnector to your pipeline's name. The value you provide for pipeline_name will be used as the name of your Weave tracing project in W&B.

The W&B tracing project is automatically created when you query the pipeline for the first time. You can view it on the W&B dashboard under Projects. Using a pipeline name helps you easily identify which pipeline the traces belong to, especially when managing multiple projects.

Example​

This is an example of an agent with WeaveConnector. The component is in the pipeline, but it's not connected to any other component. That's enough to send the pipeline traces to Weights & Biases:

components:
Agent:
type: haystack.components.agents.agent.Agent
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.5
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
tools:
- type: haystack.tools.pipeline_tool.PipelineTool
data:
name: search_internal_it
description: >-
Search Acme Corp's internal IT documentation. Use this tool for
questions about internal
IT policies, procedures, and processes—such as requesting software licenses, getting VPN
access, IT support escalation, new employee IT setup, or any company-specific IT how-tos.
input_mapping:
filters:
- retriever.filters_bm25
- retriever.filters_embedding
files:
- multi_file_converter.sources
query:
- chat_summary_llm.question
output_mapping:
chat_summary_llm.last_message: updated_query
meta_field_grouping_ranker.documents: documents
qa_llm.messages: messages
pipeline:
pipeline_output_type: chat
components:
retriever:
type: haystack_integrations.components.retrievers.opensearch.open_search_hybrid_retriever.OpenSearchHybridRetriever
init_parameters:
document_store:
type: haystack_integrations.document_stores.opensearch.document_store.OpenSearchDocumentStore
init_parameters:
embedding_dim: 768
hosts:
index: internal-it-docs
max_chunk_bytes: 104857600
return_embedding: false
method:
mappings:
settings:
create_index: true
http_auth:
use_ssl:
verify_certs:
timeout:
top_k: 20
embedder:
type: deepset_cloud_custom_nodes.embedders.nvidia.text_embedder.DeepsetNvidiaTextEmbedder
init_parameters:
normalize_embeddings: true
model: intfloat/e5-base-v2
fuzziness: 0
ranker:
type: deepset_cloud_custom_nodes.rankers.nvidia.ranker.DeepsetNvidiaRanker
init_parameters:
model: tomaarsen/Qwen3-Reranker-0.6B-seq-cls
top_k: 8
meta_field_grouping_ranker:
type: haystack.components.rankers.meta_field_grouping_ranker.MetaFieldGroupingRanker
init_parameters:
group_by: file_id
subgroup_by:
sort_docs_by: split_id
multi_file_converter:
type: haystack.core.super_component.super_component.SuperComponent
init_parameters:
input_mapping:
sources:
- file_classifier.sources
is_pipeline_async: false
output_mapping:
tabular_joiner.documents: documents
pipeline:
components:
file_classifier:
type: haystack.components.routers.file_type_router.FileTypeRouter
init_parameters:
mime_types:
- text/plain
- application/pdf
- text/markdown
- text/html
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.presentationml.presentation
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- text/csv
text_converter:
type: haystack.components.converters.txt.TextFileToDocument
init_parameters:
encoding: utf-8
pdf_converter:
type: haystack.components.converters.pdfminer.PDFMinerToDocument
init_parameters:
line_overlap: 0.5
char_margin: 2
line_margin: 0.5
word_margin: 0.1
boxes_flow: 0.5
detect_vertical: true
all_texts: false
store_full_path: false
markdown_converter:
type: haystack.components.converters.txt.TextFileToDocument
init_parameters:
encoding: utf-8
html_converter:
type: haystack.components.converters.html.HTMLToDocument
init_parameters:
extraction_kwargs:
output_format: markdown
target_language:
include_tables: true
include_links: true
docx_converter:
type: haystack.components.converters.docx.DOCXToDocument
init_parameters:
link_format: markdown
pptx_converter:
type: haystack.components.converters.pptx.PPTXToDocument
init_parameters: {}
xlsx_converter:
type: haystack.components.converters.xlsx.XLSXToDocument
init_parameters: {}
csv_converter:
type: haystack.components.converters.csv.CSVToDocument
init_parameters:
encoding: utf-8
splitter:
type: haystack.components.preprocessors.document_splitter.DocumentSplitter
init_parameters:
split_by: word
split_length: 250
split_overlap: 30
respect_sentence_boundary: true
language: en
tabular_joiner:
type: haystack.components.joiners.document_joiner.DocumentJoiner
init_parameters:
join_mode: concatenate
sort_by_score: false
connections:
- sender: file_classifier.text/plain
receiver: text_converter.sources
- sender: file_classifier.application/pdf
receiver: pdf_converter.sources
- sender: file_classifier.text/markdown
receiver: markdown_converter.sources
- sender: file_classifier.text/html
receiver: html_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.wordprocessingml.document
receiver: docx_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.presentationml.presentation
receiver: pptx_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
receiver: xlsx_converter.sources
- sender: file_classifier.text/csv
receiver: csv_converter.sources
- sender: text_converter.documents
receiver: splitter.documents
- sender: pdf_converter.documents
receiver: splitter.documents
- sender: markdown_converter.documents
receiver: splitter.documents
- sender: html_converter.documents
receiver: splitter.documents
- sender: pptx_converter.documents
receiver: splitter.documents
- sender: docx_converter.documents
receiver: splitter.documents
- sender: xlsx_converter.documents
receiver: tabular_joiner.documents
- sender: csv_converter.documents
receiver: tabular_joiner.documents
- sender: splitter.documents
receiver: tabular_joiner.documents
chat_summary_llm:
type: haystack.components.generators.chat.llm.LLM
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
system_prompt:
user_prompt: >-
{% message role="user" %}

You are part of a chatbot.

You receive a question (Current Question) and a chat
history.

Use the context from the chat history and reformulate the
question so that it is suitable for retrieval augmented
generation.

If X is followed by Y, only ask for Y and do not repeat X
again.

If the question does not require any context from the chat
history, output it unedited.

Don't make questions too long, but short and precise.

Stay as close as possible to the current question.

Only output the new question, nothing else!


{{ question }}


New question:

{% endmessage %}
required_variables: "*"
streaming_callback:
qa_llm:
type: haystack.components.generators.chat.llm.LLM
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
system_prompt: ""
user_prompt: >-
{% message role="user" %}

You are a technical expert.

You answer questions truthfully based on provided documents.

Ignore typing errors in the question.

For each document check whether it is related to the
question.

Only use documents that are related to the question to
answer it.

Ignore documents that are not related to the question.

If the answer exists in several documents, summarize them.

Only answer based on the documents provided. Don't make
things up.

Just output the structured, informative and precise answer
and nothing else.

If the documents can't answer the question, say so.

Always use references in the form [NUMBER OF DOCUMENT] when
using information from a document, e.g. [3] for Document [3]
.

Never name the documents, only enter a number in square
brackets as a reference.

The reference must only refer to the number that comes in
square brackets after the document.

Otherwise, do not use brackets in your answer and reference
ONLY the number of the document without mentioning the word
document.


These are the documents:

{%- if documents|length > 0 %}

{%- for document in documents %}

Document [{{ loop.index }}] :

Name of Source File: {{ document.meta.file_name }}

{{ document.content }}

{% endfor -%}

{%- else %}

No relevant documents found.

Respond with "Sorry, no matching documents were found,
please adjust the filters or try a different question."

{% endif %}


Question: {{ question.text }}

Answer:

{% endmessage %}
required_variables: "*"
streaming_callback:
connections:
- sender: retriever.documents
receiver: ranker.documents
- sender: multi_file_converter.documents
receiver: meta_field_grouping_ranker.documents
- sender: ranker.documents
receiver: meta_field_grouping_ranker.documents
- sender: chat_summary_llm.last_message
receiver: retriever.query
- sender: chat_summary_llm.last_message
receiver: ranker.query
- sender: chat_summary_llm.last_message
receiver: qa_llm.question
- sender: meta_field_grouping_ranker.documents
receiver: qa_llm.documents
max_runs_per_component: 100
metadata: {}
is_pipeline_async: false
inputs_from_state: {}
outputs_to_string: {}
outputs_to_state: {}
_meta:
name: search_internal_it
description: >-
Search Acme Corp's internal IT documentation. Use this tool for
questions about internal
IT policies, procedures, and processes—such as requesting software licenses, getting VPN
access, IT support escalation, new employee IT setup, or any company-specific IT how-tos.
tool_id:
pipeline_version_id: 5916d707-f550-4b0a-a4d1-6be06a471f98
- type: haystack.tools.pipeline_tool.PipelineTool
data:
name: search_vendor_docs
description: >-
Search vendor software documentation. Use this tool for questions
about how to use
specific applications and products—such as Zoom features, Microsoft 365, setting up
email on mobile, or any other software how-to questions.
input_mapping:
filters:
- retriever.filters_bm25
- retriever.filters_embedding
files:
- multi_file_converter.sources
query:
- chat_summary_llm.question
output_mapping:
chat_summary_llm.last_message: updated_query
meta_field_grouping_ranker.documents: documents
qa_llm.messages: messages
pipeline:
pipeline_output_type: chat
components:
retriever:
type: haystack_integrations.components.retrievers.opensearch.open_search_hybrid_retriever.OpenSearchHybridRetriever
init_parameters:
document_store:
type: haystack_integrations.document_stores.opensearch.document_store.OpenSearchDocumentStore
init_parameters:
embedding_dim: 768
hosts:
index: vendor-documents
max_chunk_bytes: 104857600
return_embedding: false
method:
mappings:
settings:
create_index: true
http_auth:
use_ssl:
verify_certs:
timeout:
top_k: 20
embedder:
type: deepset_cloud_custom_nodes.embedders.nvidia.text_embedder.DeepsetNvidiaTextEmbedder
init_parameters:
normalize_embeddings: true
model: intfloat/e5-base-v2
fuzziness: 0
ranker:
type: deepset_cloud_custom_nodes.rankers.nvidia.ranker.DeepsetNvidiaRanker
init_parameters:
model: tomaarsen/Qwen3-Reranker-0.6B-seq-cls
top_k: 8
meta_field_grouping_ranker:
type: haystack.components.rankers.meta_field_grouping_ranker.MetaFieldGroupingRanker
init_parameters:
group_by: file_id
subgroup_by:
sort_docs_by: split_id
multi_file_converter:
type: haystack.core.super_component.super_component.SuperComponent
init_parameters:
input_mapping:
sources:
- file_classifier.sources
is_pipeline_async: false
output_mapping:
tabular_joiner.documents: documents
pipeline:
components:
file_classifier:
type: haystack.components.routers.file_type_router.FileTypeRouter
init_parameters:
mime_types:
- text/plain
- application/pdf
- text/markdown
- text/html
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.presentationml.presentation
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- text/csv
text_converter:
type: haystack.components.converters.txt.TextFileToDocument
init_parameters:
encoding: utf-8
pdf_converter:
type: haystack.components.converters.pdfminer.PDFMinerToDocument
init_parameters:
line_overlap: 0.5
char_margin: 2
line_margin: 0.5
word_margin: 0.1
boxes_flow: 0.5
detect_vertical: true
all_texts: false
store_full_path: false
markdown_converter:
type: haystack.components.converters.txt.TextFileToDocument
init_parameters:
encoding: utf-8
html_converter:
type: haystack.components.converters.html.HTMLToDocument
init_parameters:
extraction_kwargs:
output_format: markdown
target_language:
include_tables: true
include_links: true
docx_converter:
type: haystack.components.converters.docx.DOCXToDocument
init_parameters:
link_format: markdown
pptx_converter:
type: haystack.components.converters.pptx.PPTXToDocument
init_parameters: {}
xlsx_converter:
type: haystack.components.converters.xlsx.XLSXToDocument
init_parameters: {}
csv_converter:
type: haystack.components.converters.csv.CSVToDocument
init_parameters:
encoding: utf-8
splitter:
type: haystack.components.preprocessors.document_splitter.DocumentSplitter
init_parameters:
split_by: word
split_length: 250
split_overlap: 30
respect_sentence_boundary: true
language: en
tabular_joiner:
type: haystack.components.joiners.document_joiner.DocumentJoiner
init_parameters:
join_mode: concatenate
sort_by_score: false
connections:
- sender: file_classifier.text/plain
receiver: text_converter.sources
- sender: file_classifier.application/pdf
receiver: pdf_converter.sources
- sender: file_classifier.text/markdown
receiver: markdown_converter.sources
- sender: file_classifier.text/html
receiver: html_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.wordprocessingml.document
receiver: docx_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.presentationml.presentation
receiver: pptx_converter.sources
- sender: file_classifier.application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
receiver: xlsx_converter.sources
- sender: file_classifier.text/csv
receiver: csv_converter.sources
- sender: text_converter.documents
receiver: splitter.documents
- sender: pdf_converter.documents
receiver: splitter.documents
- sender: markdown_converter.documents
receiver: splitter.documents
- sender: html_converter.documents
receiver: splitter.documents
- sender: pptx_converter.documents
receiver: splitter.documents
- sender: docx_converter.documents
receiver: splitter.documents
- sender: xlsx_converter.documents
receiver: tabular_joiner.documents
- sender: csv_converter.documents
receiver: tabular_joiner.documents
- sender: splitter.documents
receiver: tabular_joiner.documents
chat_summary_llm:
type: haystack.components.generators.chat.llm.LLM
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
system_prompt:
user_prompt: >-
{% message role="user" %}

You are part of a chatbot.

You receive a question (Current Question) and a chat
history.

Use the context from the chat history and reformulate the
question so that it is suitable for retrieval augmented
generation.

If X is followed by Y, only ask for Y and do not repeat X
again.

If the question does not require any context from the chat
history, output it unedited.

Don't make questions too long, but short and precise.

Stay as close as possible to the current question.

Only output the new question, nothing else!


{{ question }}


New question:

{% endmessage %}
required_variables: "*"
streaming_callback:
qa_llm:
type: haystack.components.generators.chat.llm.LLM
init_parameters:
chat_generator:
init_parameters:
model: gpt-5.4
type: haystack.components.generators.chat.openai_responses.OpenAIResponsesChatGenerator
system_prompt: ""
user_prompt: >-
{% message role="user" %}

You are a technical expert.

You answer questions truthfully based on provided documents.

Ignore typing errors in the question.

For each document check whether it is related to the
question.

Only use documents that are related to the question to
answer it.

Ignore documents that are not related to the question.

If the answer exists in several documents, summarize them.

Only answer based on the documents provided. Don't make
things up.

Just output the structured, informative and precise answer
and nothing else.

If the documents can't answer the question, say so.

Always use references in the form [NUMBER OF DOCUMENT] when
using information from a document, e.g. [3] for Document [3]
.

Never name the documents, only enter a number in square
brackets as a reference.

The reference must only refer to the number that comes in
square brackets after the document.

Otherwise, do not use brackets in your answer and reference
ONLY the number of the document without mentioning the word
document.


These are the documents:

{%- if documents|length > 0 %}

{%- for document in documents %}

Document [{{ loop.index }}] :

Name of Source File: {{ document.meta.file_name }}

{{ document.content }}

{% endfor -%}

{%- else %}

No relevant documents found.

Respond with "Sorry, no matching documents were found,
please adjust the filters or try a different question."

{% endif %}


Question: {{ question.text }}

Answer:

{% endmessage %}
required_variables: "*"
streaming_callback:
connections:
- sender: retriever.documents
receiver: ranker.documents
- sender: multi_file_converter.documents
receiver: meta_field_grouping_ranker.documents
- sender: ranker.documents
receiver: meta_field_grouping_ranker.documents
- sender: chat_summary_llm.last_message
receiver: retriever.query
- sender: chat_summary_llm.last_message
receiver: ranker.query
- sender: chat_summary_llm.last_message
receiver: qa_llm.question
- sender: meta_field_grouping_ranker.documents
receiver: qa_llm.documents
max_runs_per_component: 100
metadata: {}
is_pipeline_async: false
inputs_from_state: {}
outputs_to_string: {}
outputs_to_state: {}
_meta:
name: search_vendor_docs
description: >-
Search vendor software documentation. Use this tool for questions
about how to use
specific applications and products—such as Zoom features, Microsoft 365, setting up
email on mobile, or any other software how-to questions.
tool_id:
pipeline_version_id: c164dc6d-3b28-406e-8766-a47b19cbee65
system_prompt: >-
{% message role="system" %}

You are an IT helpdesk assistant for Corp. You help employees solve IT
problems and answer questions about IT processes and software.

You have two tools:

- search_internal_it: Use this for questions about Acme Corp's internal
IT policies and procedures—requesting software, getting VPN access, IT
support processes, internal how-tos.

- search_vendor_docs: Use this for questions about how to use software
products—Zoom, Microsoft 365, and other applications.

When a question involves both internal processes and software (for
example, "I can't connect to Teams because my VPN is blocking it"), use
both tools before answering.

Base your answer only on the information you find. Cite which documents
you used. If you can't find the answer in either knowledge base, say so
clearly and tell the employee to contact the IT helpdesk directly at
helpdesk@acmecorp.internal.

{% endmessage %}
user_prompt:
required_variables:
exit_conditions:
state_schema: {}
max_agent_steps: 100
streaming_callback:
raise_on_tool_invocation_failure: false
tool_invoker_kwargs:
confirmation_strategies:

WeaveConnector:
type: haystack_integrations.components.connectors.weave.weave_connector.WeaveConnector
init_parameters:
pipeline_name: helpdesk-agent
weave_init_kwargs:

max_runs_per_component: 100

metadata: {}

inputs:
messages:
- Agent.messages
filters: []
files: []

outputs:
answers:
documents:
messages: Agent.last_message

In Pipeline Builder, you simply drag the component from the Connectors group, drop it on the canvas, and pass the name of the pipeline you want to trace in the pipeline_name parameter. WeaveConnector is not connected to any component.