Home

Prompt Block

This is an executable type used in Stencila Schema for previewing rendered prompts.

It exists to show how a prompt will resolve for a particular instruction type, target node, or document position before or during an editing workflow. This makes prompt selection and rendering inspectable within the document model itself.

Key properties include instructionType, nodeTypes, relativePosition, query, target, and rendered content.

This type is marked as unstable and is subject to change.

Analogues

The following external types, elements, or nodes are similar to a PromptBlock:

  • rendered prompt preview: Approximate analogue for inspecting the final prompt sent to a model, though Stencila models it as an executable document node tied to editing context.

Properties

The PromptBlock type has these properties:

NameDescriptionTypeInherited from
instructionTypeThe type of instruction the being used forInstructionType-
nodeTypesThe type of nodes the prompt is being used forString*-
relativePositionThe relative position of the node being edited, described etc.RelativePosition-
queryA user text query used to infer the target promptString-
targetAn identifier for the prompt to be renderedString-
directoryThe home directory of the promptString-
contentThe executed content of the promptBlock*-
executionModeUnder which circumstances the node should be executed.ExecutionModeExecutable
compilationDigestA digest of the content, semantics and dependencies of the node.CompilationDigestExecutable
compilationMessagesMessages generated while compiling the code.CompilationMessage*Executable
executionDigestThe compilationDigest of the node when it was last executed.CompilationDigestExecutable
executionDependenciesThe upstream dependencies of this node.ExecutionDependency*Executable
executionDependantsThe downstream dependants of this node.ExecutionDependant*Executable
executionTagsTags in the code which affect its execution.ExecutionTag*Executable
executionCountA count of the number of times that the node has been executed.IntegerExecutable
executionRequiredWhether, and why, the code requires execution or re-execution.ExecutionRequiredExecutable
executionStatusStatus of the most recent, including any current, execution.ExecutionStatusExecutable
executionInstanceThe id of the kernel instance that performed the last execution.StringExecutable
executionEndedThe timestamp when the last execution ended.TimestampExecutable
executionDurationDuration of the last execution.DurationExecutable
executionMessagesMessages emitted while executing the node.ExecutionMessage*Executable
idThe identifier for this item.StringEntity

Related

The PromptBlock type is related to these types:

Bindings

The PromptBlock type is represented in:


This documentation was generated from PromptBlock.yaml by docs_types.rs.

© 2026 Stencila