Skip to content

Redefine Roles

v1.0.0

The Redefine Roles LOP remaps the role column of messages passing through it. Each of the three standard roles (user, assistant, system) can be independently reassigned to any other role, making it easy to swap perspectives, merge role types, or reshape conversation history before it reaches a downstream operator.

This is a lightweight passthrough operator. It reads an incoming conversation table, applies the role mappings defined on the Redefine Roles parameter page, and writes the result to its output. Messages with roles other than user, assistant, or system pass through unchanged. When Bypass is enabled, the input is copied directly to the output with no modifications.

  • Conversation Table (Input 1): A table DAT with at least role and message columns. Optional columns id and timestamp are preserved if present.
  • Conversation Table: The same conversation with roles remapped according to the current parameter settings. All other columns are copied through unchanged.

This is useful when you want to replay a conversation from the opposite perspective, or when handing off between agents that expect different role assignments.

  1. Place a Redefine Roles LOP in your network.
  2. Wire a conversation table into its input.
  3. On the Redefine Roles page, set Set User Role to assistant.
  4. Set Set Assistant Role to user.
  5. Leave Set System Role as system.
  6. The output table now has user and assistant roles swapped.

Some models or workflows treat system messages differently. You can fold them into the assistant role so the model sees them as part of its own context.

  1. On the Redefine Roles page, set Set System Role to assistant.
  2. Leave Set User Role as user and Set Assistant Role as assistant.
  3. All original system messages now appear as assistant messages in the output.

When passing a conversation from one agent to another, the second agent may need the first agent’s assistant messages to appear as user messages (since they represent instructions to the second agent).

  1. Wire the output of the first Agent LOP into the Redefine Roles input.
  2. Set Set Assistant Role to user.
  3. Wire the Redefine Roles output into the second Agent LOP.
  4. The second agent now sees the first agent’s responses as user instructions.
  • Swapping perspectives for multi-agent pipelines where one agent’s output becomes another’s input.
  • Reassigning system messages to assistant or user for models that handle roles differently.
  • Preprocessing conversation history before sending it to a Chat or Agent LOP.
  • Experimenting with how role assignments affect model behavior.
Set User Role (Setuser) op('redefine_roles').par.Setuser Menu
Default:
user
Options:
user, assistant, system
Set Assistant Role (Setassistant) op('redefine_roles').par.Setassistant Menu
Default:
user
Options:
user, assistant, system
Set System Role (Setsystem) op('redefine_roles').par.Setsystem Menu
Default:
user
Options:
user, assistant, system
Header
v1.0.02024-11-06

Initial release