Skip to main content

Overview

Blocks write their results to the DataBus using the output field. SemanticTest supports three different output formats to give you flexibility in how data is stored.

1. String Format (Simple)

Store the entire block output in a single named slot:
What happens:
  • Block’s entire output object is stored in the response slot
  • Access it later with ${response.status}, ${response.body}, etc.
DataBus after execution:
When to use:
  • Most common format
  • Simple and clear
  • Keep all related data together

2. Object Format (Mapping)

Map specific output fields to different slots:
What happens:
  • Block’s parsed field goes to userData slot
  • Block’s error field goes to parseError slot
DataBus after execution:
When to use:
  • Split block output into separate slots
  • Different parts need different names
  • Avoid deeply nested data access

3. Default Format (No Output Field)

If you don’t specify output, the block ID is used:
What happens:
  • Output is stored in a slot named after the block ID
  • Access it with ${fetchUser.status}, ${fetchUser.body}, etc.
DataBus after execution:
When to use:
  • Quick prototyping
  • Block ID is already descriptive
  • Less typing

Comparison

Full Pipeline Example

DataBus state:

Best Practices

Common Patterns

HTTP Request and Parse

Stream Parsing with Split Output

Validation Results

Output Field Reference

Different blocks produce different output fields. Check each block’s documentation:
BlockCommon Output Fields
HttpRequeststatus, body, headers
JsonParserparsed, error
StreamParsertext, toolCalls, chunks, metadata
ValidateContentpassed, failures, score, checks
ValidateToolspassed, failures, score, actualTools, expectedTools
LLMJudgescore, reasoning, shouldContinue, nextPrompt, details
Loop_loopTo, _maxLoops, _terminate
MockDataWhatever you configure

Next Steps

Input Formats

Learn how to pass data to blocks

Assertions

Validate your test results