> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modularmind.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompts

> Understanding the building blocks of workflow steps

export const CustomCard = ({children, bgColor = "bg-white dark:bg-zinc-900", darkBgColor, title, icon}) => {
  const isHexColor = bgColor.startsWith('#');
  const getBackgroundStyle = () => {
    if (isHexColor) {
      return {
        '--card-bg-light': bgColor,
        '--card-bg-dark': darkBgColor || '#27272a'
      };
    }
    return {};
  };
  return <div className={`${isHexColor ? 'bg-[var(--card-bg-light)] dark:bg-[var(--card-bg-dark)]' : bgColor} rounded-lg border border-zinc-950/10 dark:border-white/10 p-6 shadow-sm`} style={getBackgroundStyle()}>
      {(title || icon) && <div className="flex items-center gap-3 mb-4">
          {icon && <span className="text-2xl">{icon}</span>}
          {title && <h3 className="text-lg font-semibold text-zinc-950 dark:text-white">
              {title}
            </h3>}
        </div>}
      <div className="text-zinc-600 dark:text-zinc-400 leading-7">
        {children}
      </div>
    </div>;
};

export const ModularAccordionGroup = ({children, title}) => {
  return <div className="my-6">
      {title && <div className="mb-4 text-xl font-bold text-zinc-950 dark:text-white">
          {title}
        </div>}
      <div className="bg-zinc-100/50 dark:bg-zinc-800/30 rounded-xl p-3 border border-zinc-200 dark:border-zinc-700">
        <div className="bg-white dark:bg-zinc-900 rounded-lg p-4 shadow-sm">
          {children}
        </div>
      </div>
    </div>;
};

export const ModularAccordion = ({title, children}) => {
  const [isExpanded, setIsExpanded] = React.useState(false);
  return <div className="modular-accordion overflow-hidden transition-all duration-200 cursor-pointer border-b-2 border-dashed border-zinc-300 dark:border-zinc-600 last:border-b-0" onClick={() => setIsExpanded(!isExpanded)}>
      <div className="w-full px-5 py-4 bg-transparent text-left text-base font-semibold text-zinc-950 dark:text-white">
        <span className="block">{title}</span>
      </div>
      <div className="px-5">
        <div className={`overflow-hidden transition-all duration-300 ease-in-out ${isExpanded ? 'max-h-[2000px]' : 'max-h-[3.5em]'}`}>
          <div className={`text-zinc-600 dark:text-zinc-400 leading-7 text-[0.9375rem] ${!isExpanded ? 'line-clamp-2' : ''}`}>
            {children}
          </div>
        </div>
        <div className="pb-4"></div>
      </div>
    </div>;
};

## What is a Prompt?

Every step in your workflow is powered by a **prompt** — detailed instructions that tell an AI agent exactly what to do.

<Note>
  Think of a prompt as a **job description** for an AI agent. It contains all the context, instructions, and expectations for completing one specific task.
</Note>

## The Problem with Traditional Prompts

Traditionally, prompts are monolithic blocks of text:

*You are a research assistant. Search the web for CRM tools
suitable for small bakeries with 10-15 employees. Focus on
tools with inventory management, customer communication, and
order tracking. Budget is under \$500/month. Extract pricing,
key features, user ratings, and pros/cons. Format the results
as a structured table. Prioritize tools with high ratings and
good integration capabilities...
\[continues for several paragraphs]*

**Challenges:**

* Hard to read and understand
* Difficult to modify one part without breaking others
* Can't reuse pieces across workflows
* Overwhelming to edit for non-technical users

## Maia's Modular Approach

Maia breaks prompts into sections — discrete, editable sections that serve specific purposes. Each section can be expanded to view and edit its full content.

**Example:** Research prompt broken into sections

<CustomCard bgColor="#E8EBF3" darkBgColor="#1F2234">
  <ModularAccordionGroup title="Research CRM Tools for Small Bakeries">
    <ModularAccordion title="Context & Role">
      You are an expert B2B SaaS researcher with deep expertise in small business CRM tools, specifically focused on understanding the unique requirements of the bakery industry. Your background includes 10+ years analyzing software solutions for food service businesses, with particular emphasis on inventory management and customer relationship systems. You understand the challenges small bakeries face, including managing perishable inventory, handling custom orders, tracking customer preferences for special occasions, maintaining communication with both retail and wholesale clients, and balancing operational efficiency with personalized service. Approach this research with the mindset of a bakery owner who needs practical, cost-effective solutions that can scale with business growth.
    </ModularAccordion>

    <ModularAccordion title="Task Definition">
      Your objective is to find and compare the top 5 CRM tools available in the market that are specifically well-suited for small bakery operations. Focus your research on reputable sources including G2, Capterra, TrustRadius, Software Advice, and verified user reviews to ensure comprehensive coverage. Prioritize tools that have demonstrated success in the food service or retail bakery sector, with verified case studies or testimonials from similar businesses. Evaluate each tool's ease of implementation, learning curve for staff, integration capabilities with common bakery point-of-sale systems, and mobile accessibility for on-the-go management. Additionally, assess the quality and responsiveness of customer support, as this is critical for small businesses without dedicated IT staff.
    </ModularAccordion>

    <ModularAccordion title="Requirements & Constraints">
      The budget must stay under \$500 per month for a team size of 10-15 employees, with preference given to solutions offering flexible user-based pricing models. The CRM solution must include inventory management capabilities that can handle perishable goods with expiration date tracking, robust customer communication features supporting email, SMS, and automated birthday or special occasion reminders, and comprehensive order tracking functionality for both one-time and recurring orders. The system should support custom product configurations for specialty cakes and pastries, integrate with at least two major payment processors, and provide mobile apps for both iOS and Android platforms. Data security and GDPR compliance are mandatory requirements, and the solution should offer data export capabilities to prevent vendor lock-in.
    </ModularAccordion>

    <ModularAccordion title="Output Format">
      Present the results as a structured table sorted by rating (highest first), with each tool occupying one row. Each entry should include the tool name with an official website link, detailed pricing information breaking down costs by user tier and any additional fees, key features listed as bullet points with special emphasis on bakery-specific functionality, aggregate user ratings from multiple platforms with the number of reviews cited, and a balanced list of pros and cons with at least 3-4 items in each category. Include a separate column for "Best For" that describes the ideal bakery profile for each tool (e.g., "Best for wholesale-focused bakeries" or "Best for retail bakeries with multiple locations"). Add a final summary row that provides an overall recommendation based on the most common bakery business model.
    </ModularAccordion>
  </ModularAccordionGroup>
</CustomCard>

## Benefits of Modular Prompts

### **Surgical Editing**

Change one aspect without rewriting everything. Here's the same CRM research prompt with only the budget requirement modified:

<Tabs>
  <Tab title="Before">
    <CustomCard bgColor="#E8EBF3" darkBgColor="#1F2234">
      <ModularAccordionGroup title="Research CRM Tools for Small Bakeries">
        <ModularAccordion title="Context & Role">
          You are an expert B2B SaaS researcher with deep expertise in small business CRM tools, specifically focused on understanding the unique requirements of the bakery industry. Your background includes 10+ years analyzing software solutions for food service businesses, with particular emphasis on inventory management and customer relationship systems. You understand the challenges small bakeries face, including managing perishable inventory, handling custom orders, tracking customer preferences for special occasions, maintaining communication with both retail and wholesale clients, and balancing operational efficiency with personalized service. Approach this research with the mindset of a bakery owner who needs practical, cost-effective solutions that can scale with business growth.
        </ModularAccordion>

        <ModularAccordion title="Task Definition">
          Your objective is to find and compare the top 5 CRM tools available in the market that are specifically well-suited for small bakery operations. Focus your research on reputable sources including G2, Capterra, TrustRadius, Software Advice, and verified user reviews to ensure comprehensive coverage. Prioritize tools that have demonstrated success in the food service or retail bakery sector, with verified case studies or testimonials from similar businesses. Evaluate each tool's ease of implementation, learning curve for staff, integration capabilities with common bakery point-of-sale systems, and mobile accessibility for on-the-go management. Additionally, assess the quality and responsiveness of customer support, as this is critical for small businesses without dedicated IT staff.
        </ModularAccordion>

        <ModularAccordion title="Requirements & Constraints">
          The budget must stay under **\$500** per month for a team size of 10-15 employees, with preference given to solutions offering flexible user-based pricing models. The CRM solution must include inventory management capabilities that can handle perishable goods with expiration date tracking, robust customer communication features supporting email, SMS, and automated birthday or special occasion reminders, and comprehensive order tracking functionality for both one-time and recurring orders. The system should support custom product configurations for specialty cakes and pastries, integrate with at least two major payment processors, and provide mobile apps for both iOS and Android platforms. Data security and GDPR compliance are mandatory requirements, and the solution should offer data export capabilities to prevent vendor lock-in.
        </ModularAccordion>

        <ModularAccordion title="Output Format">
          Present the results as a structured table sorted by rating (highest first), with each tool occupying one row. Each entry should include the tool name with an official website link, detailed pricing information breaking down costs by user tier and any additional fees, key features listed as bullet points with special emphasis on bakery-specific functionality, aggregate user ratings from multiple platforms with the number of reviews cited, and a balanced list of pros and cons with at least 3-4 items in each category. Include a separate column for "Best For" that describes the ideal bakery profile for each tool (e.g., "Best for wholesale-focused bakeries" or "Best for retail bakeries with multiple locations"). Add a final summary row that provides an overall recommendation based on the most common bakery business model.
        </ModularAccordion>
      </ModularAccordionGroup>
    </CustomCard>
  </Tab>

  <Tab title="After (Only Changed One Section)">
    <CustomCard bgColor="#E8EBF3" darkBgColor="#1F2234">
      <ModularAccordionGroup title="Research CRM Tools for Small Bakeries">
        <ModularAccordion title="Context & Role">
          You are an expert B2B SaaS researcher with deep expertise in small business CRM tools, specifically focused on understanding the unique requirements of the bakery industry. Your background includes 10+ years analyzing software solutions for food service businesses, with particular emphasis on inventory management and customer relationship systems. You understand the challenges small bakeries face, including managing perishable inventory, handling custom orders, tracking customer preferences for special occasions, maintaining communication with both retail and wholesale clients, and balancing operational efficiency with personalized service. Approach this research with the mindset of a bakery owner who needs practical, cost-effective solutions that can scale with business growth.
        </ModularAccordion>

        <ModularAccordion title="Task Definition">
          Your objective is to find and compare the top 5 CRM tools available in the market that are specifically well-suited for small bakery operations. Focus your research on reputable sources including G2, Capterra, TrustRadius, Software Advice, and verified user reviews to ensure comprehensive coverage. Prioritize tools that have demonstrated success in the food service or retail bakery sector, with verified case studies or testimonials from similar businesses. Evaluate each tool's ease of implementation, learning curve for staff, integration capabilities with common bakery point-of-sale systems, and mobile accessibility for on-the-go management. Additionally, assess the quality and responsiveness of customer support, as this is critical for small businesses without dedicated IT staff.
        </ModularAccordion>

        <ModularAccordion title="Requirements & Constraints">
          The budget must stay under **\$200** per month for a team size of 10-15 employees, with preference given to solutions offering flexible user-based pricing models. The CRM solution must include inventory management capabilities that can handle perishable goods with expiration date tracking, robust customer communication features supporting email, SMS, and automated birthday or special occasion reminders, and comprehensive order tracking functionality for both one-time and recurring orders. The system should support custom product configurations for specialty cakes and pastries, integrate with at least two major payment processors, and provide mobile apps for both iOS and Android platforms. Data security and GDPR compliance are mandatory requirements, and the solution should offer data export capabilities to prevent vendor lock-in.
        </ModularAccordion>

        <ModularAccordion title="Output Format">
          Present the results as a structured table sorted by rating (highest first), with each tool occupying one row. Each entry should include the tool name with an official website link, detailed pricing information breaking down costs by user tier and any additional fees, key features listed as bullet points with special emphasis on bakery-specific functionality, aggregate user ratings from multiple platforms with the number of reviews cited, and a balanced list of pros and cons with at least 3-4 items in each category. Include a separate column for "Best For" that describes the ideal bakery profile for each tool (e.g., "Best for wholesale-focused bakeries" or "Best for retail bakeries with multiple locations"). Add a final summary row that provides an overall recommendation based on the most common bakery business model.
        </ModularAccordion>
      </ModularAccordionGroup>
    </CustomCard>
  </Tab>
</Tabs>

Notice how only the **Requirements & Constraints** section is changed (budget from \$500 to \$200), and the rest of the prompt stays intact.

### **Clarity and Organization**

Instead of hunting through paragraphs, you can expand and edit relevant sections:

<Frame>
  <img src="https://mintcdn.com/modularmind-0c3cf90a/p9ou4RR7AwUYGqVg/images/edit_prompt_section.jpg?fit=max&auto=format&n=p9ou4RR7AwUYGqVg&q=85&s=3c64ef58c8cb0dba30747bf303e3ed6f" alt="Edit modular prompt sections" className="my-6 rounded-lg border border-zinc-300 dark:border-zinc-600" width="958" height="484" data-path="images/edit_prompt_section.jpg" />
</Frame>

* Need to change what data is collected? → Edit **Task Definition**
* Want different formatting? → Edit **Output Format**
* Add requirements? → Edit **Requirements & Constraints**

<br />

<br />

<br />

<Card title="Next: Explore Maia's Capabilities" icon="wand-magic-sparkles" href="/capabilities/web-intelligence">
  Learn what Maia can do inside those workflow steps
</Card>
