Stacks are ordered collections of prompts in ModularMind. They allow you to build complex instructions or workflows by combining multiple prompt cards in a specific sequence. When you run a stack, all the prompts within it are merged in order and sent to the selected AI model for processing.

Why stacks are useful?

  • Modularity: Stacks allow you to break down complex tasks in,to smaller, manageable pieces. This makes it easier to edit, update, and reuse parts of your workflows.
  • Easy editing: Instead of dealing with a long, monolithic prompt, you can edit individual sections of your instruction set quickly and easily.
  • Reusability: Frequently used prompts can be combined in different ways, allowing you to create new workflows efficiently.
  • Flexibility: Replace specific prompts within a stack to adapt existing workflows for new use cases. This saves time and promotes consistency across similar tasks.
  • Organization: Stacks help you visually organize your thought process and workflow, making it easier to understand and manage complex AI interactions.
  • Experimentation: Easily try different prompt combinations by adding, removing, or reordering cards within a stack to optimize your results.

Usage

You can create a stack by dragging a prompt from your library onto the board. Alternatively, right-click on the board and create a new prompt to automatically start a new stack.

After creating a stack, you can change its title by double clicking on the stack’s name in the board and quickly edit. Alternatively, you can click on the stack and this will open the stack details panel where you can edit the stack’s title.

Adding Prompts to a Stack

You can add more prompts to your stack by dragging a prompt from your library onto the existing stack. If you want to insert a prompt on the go, one that is not in your library, you can click on the stack on the board and this will open the stack details panel. Here you can add a new prompt to the stack by using the Add Prompt to Stack button at the bottom of the panel. You can also insert a prompt to the stack’s list, you can drag and drop a prompt from your library into the stack details panel.

Inserting a prompt to the stack

Replacing Prompts in a Stack

You can replace a prompt in the stack by dragging a new prompt from your library onto the existing prompt in the stack. This will replace the existing prompt with the new one.

Replacing a prompt in the stack

Reordering Prompts in a Stack

You can reorder prompts in a stack by dragging and dropping them within the stack details panel. This allows you to change the sequence of prompts quickly.

Duplicate a Stack

You can duplicate a stack by hovering over the stack on the board and clicking on or dragging the duplicate button. This will create an exact copy of the stack, including all the prompts within it.

Duplicating a stack

Running a Stack

To run a stack, hover over the stack on the board and click on the RUN button. This will send all the prompts within the stack to the selected AI model for processing and display the results within an output card.

Running a stack

Best Practices

  • Keep individual prompts focused on specific tasks or pieces of information.
  • Use clear naming conventions for your prompts to easily identify their purpose within a stack.
  • Duplicate stacks for common workflows so you can quickly replace a prompt as needed.

By mastering the use of stacks in ModularMind, you’ll be able to create powerful, flexible AI workflows that can significantly enhance your productivity and the quality of your AI interactions.