Step
A Step is a fundamental building block within a Thread that represents a single unit of interaction or operation.
Steps are versatile and can encompass various types of activities, such as sending a message, making a call to a large language model (LLM), or executing a custom function.
By organizing interactions into Steps, the Literal AI platform enables users to structure, visualize, and analyze the flow of conversations or processes in a granular and meaningful way.
Types of Steps
There are several types of Steps, each serving a distinct purpose.
A Thread with Steps and Tags.
Run
A run
step signifies the execution of an agent or a chain that takes multiple steps. Unlike other step types, it does not have to be part of a Thread.
This is useful if you are monitoring non conversational use cases.
Message
A message
step represents a message exchange within a Thread. There are two primary subtypes of message steps:
- User Message: This type of step is used to log messages sent by the user. It helps in tracking user inputs and requests.
- Assistant Message: This step logs messages generated by the assistant or application in response to user inputs.
Tool
A tool
step is used to document interactions with external tools or services. This step type is particularly useful for applications that interact with external APIs, databases, or services.
LLM
An llm
step is used to document interactions with large language models (LLMs). This step type is particularly useful for applications that leverage AI models, such as GPT-3, for generating responses, content, or performing analysis.
llm
require input messages. Attempts to create llm
steps without either generation.messages
(chat API) or generation.prompt
(completion API) yield a run
step.Implementing Steps
Possible "type"
s are: "run"
, "tool"
, "llm"
, "embedding"
, "retrieval"
, "rerank"
, "undefined"
, "user_message"
, "assistant_message"
, "system_message"
.
Visualize the Steps on Literal AI
Click here for an interactive example.
Output on the platform
Metadata
Metadata serves as a powerful tool for enriching objects with additional context, details, or configuration that can be instrumental in customizing and enhancing the functionality of each object. Specifically, the metadata field is available on Thread, Step, User, and Generation objects within the platform.
How to add metadata to a Run or a Step
Attachment
An attachment is a file that has been generated or processed by a Step. Learn more about attachments and multimodality here.
Tags
Just like Threads, you can add Tags to single Steps. For more info, see this section.
Was this page helpful?