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

# Complex Prompt Patterns

> Master sophisticated prompt patterns for complex business scenarios with practical examples and real-world applications.

This guide will help you create effective prompts that get exactly what you need from AI, even for complex business tasks. We'll cover practical patterns, real examples, and solutions to common challenges.

## Before You Start

Before getting started with these complex techniques, make sure you're comfortable with the [RISE framework](/en/guides/prompt-engineering/expert-level/writing-complex-prompts#the-rise-framework). Think of RISE as your foundation - these complex patterns build on top of it.

## The Three Essential Patterns

Think of these patterns as different "approaches" for getting specific types of results from AI. Each one works well for different kinds of tasks.

**When You Need Deep Analysis** <br />
This works well when you need detailed reports, thorough assessments, or careful analysis of complex information.

```
**Role:** You are a [domain expert] specializing in [specific area].

**Instructions:** Complete a thorough analysis of [subject] by:
1. **First**, identifying key factors and metrics
2. **Then**, evaluating what these mean and any trends  
3. **Finally**, providing practical recommendations

**Source:** [Specific documents/data with any limitations]

**Expectations:** [How you want the analysis structured]
```

**When You Need to Create Something** <br />
This approach works well for writing, designing, planning, and developing content.

```
**Role:** You are a [creative professional] with expertise in [relevant field].

**Instructions:** Create [specific deliverable] by:
1. **First**, understanding what's needed and any constraints
2. **Then**, developing different concepts or approaches
3. **Finally**, refining and presenting the best solution

**Source:** [Reference materials, guidelines, brand standards]

**Expectations:** [Detailed format, style, and delivery requirements]
```

**When You Need to Compare Options** <br />
Use this when you need to evaluate choices, analyze competitors, or make important decisions.

```
**Role:** You are an [analytical expert] helping with decision-making.

**Instructions:** Compare [items/options] systematically by:
1. **First**, establishing what criteria matter most
2. **Then**, assessing each option against these criteria
3. **Finally**, recommending the best choice with clear reasoning

**Source:** [Comparison materials and decision criteria]

**Expectations:** [Structured comparison with clear recommendation]
```

<Note>
  **Working with Sources:** Whether you attach files directly or retrieve them from a Space's Uploaded Files, Omnifact's **Privacy Filter** automatically masks sensitive information before the AI processes it. You don't need to waste time manually redacting names or financial data from your sources.
</Note>

## Real-World Examples

Let's look at how these patterns work in real business situations:

<Tabs>
  <Tab title="Legal Contract Review">
    ```
    **Role:** You are a contracts specialist reviewing vendor agreements for compliance and risk assessment.

    **Instructions:** Analyze the attached vendor contract and create a comprehensive risk assessment. Work through this systematically:
    1. First, identify all key terms, obligations, deadlines, and financial commitments
    2. Then, flag any terms that deviate from standard business practices or create unusual risk
    3. Finally, assess overall business and legal risks with specific recommendations

    **Source:** Use only the attached contract document. Note any sections that are unclear, missing, or require additional clarification.

    **Expectations:** 
    - Format: Executive risk assessment memo with clear sections
    - Key Contract Terms (dates, amounts, obligations, termination clauses)
    - Risk Analysis (High/Medium/Low ratings with explanations)
    - Deviations from Standard Terms (specific concerns highlighted)
    - Recommended Actions (prioritized by risk level and urgency)
    - Use professional legal review tone but keep accessible to business stakeholders
    ```
  </Tab>

  <Tab title="Marketing Analysis">
    ```
    **Role:** You are a senior marketing strategist preparing performance insights for executive leadership.

    **Instructions:** Analyze our Q3 digital marketing campaign data and create an actionable performance report. Break this analysis down as follows:
    1. First, evaluate overall campaign performance against established KPIs and budget
    2. Then, identify which channels, content types, and audience segments performed best and worst
    3. Finally, develop specific, data-driven recommendations for Q4 optimization

    **Source:** Use the attached campaign analytics report and compare performance against the original campaign objectives and budget documents.

    **Expectations:**
    - Format: Executive-ready presentation summary with supporting data
    - Campaign Performance Overview (goals vs. actual results with key metrics)
    - Channel Performance Deep-dive (ROI, engagement, conversion data)
    - Audience Insights (demographic and behavioral analysis)
    - Content Performance Analysis (top and bottom performing assets)
    - Q4 Strategic Recommendations (specific, budget-conscious, actionable items)
    - Use data-driven marketing language while keeping insights accessible to C-suite
    ```
  </Tab>

  <Tab title="Financial Budget Analysis">
    ```
    **Role:** You are a senior financial analyst preparing a budget variance report for department heads and CFO.

    **Instructions:** Analyze the Q3 budget variance data and create a comprehensive variance analysis report. Structure your analysis as follows:
    1. First, calculate and categorize all significant budget variances (>5% or >$10K)
    2. Then, investigate and explain the root causes of major variances
    3. Finally, project year-end impact and recommend corrective actions

    **Source:** Use the attached Q3 actual vs. budget report and prior quarter variance reports for context. Reference the original budget assumptions document where relevant.

    **Expectations:**
    - Format: Formal financial analysis memo with executive summary
    - Variance Summary Dashboard (key metrics and major variances highlighted)
    - Detailed Variance Analysis (organized by department/category)
    - Root Cause Analysis (operational factors driving variances)
    - Year-End Projections (updated forecasts based on trends)
    - Recommended Actions (immediate and strategic responses)
    - Use formal financial reporting language with clear explanations for non-financial managers
    ```
  </Tab>
</Tabs>

## Getting Better Results

Think of prompt engineering like learning to cook - it takes practice and experimentation. Here's how to improve:

* **Practice regularly** with real business scenarios
* **Learn from results** and adjust your prompts accordingly
* **Mix and match techniques** for different situations
* **Build expertise** in your specific business areas
* **Share knowledge** with your team

Before using any complex prompt, check that:

* ✅ You've provided all necessary context
* ✅ Your instructions are clear and in order
* ✅ The output format matches what you need
* ✅ The analysis depth is appropriate for your needs

<Tip>Remember: The goal isn't to make prompts more complex - it's to make them more precise. Focus on getting exactly what you need for your business decisions.</Tip>

## Troubleshooting Common Issues

<AccordionGroup>
  <Accordion title="When AI Seems Confused">
    **What you might see:** Irrelevant responses, requests for clarification, generic output <br /> <br />
    **How to fix it:**

    * Make your role definition more specific
    * Break down complex instructions into smaller steps
    * Add more context about your business situation
    * Include an example of what you're looking for <br />
  </Accordion>

  <Accordion title="When Output Is Too Generic">
    **What you might see:** Boilerplate responses, lack of specific insights, obvious recommendations <br /> <br />
    **How to fix it:**

    * Add more specific requirements
    * Include relevant business context
    * Specify exactly what level of detail you need
    * Ask for specific examples or numbers
  </Accordion>

  <Accordion title="When Format Doesn't Match Needs">
    **What you might see:** Wrong structure, inappropriate tone, missing sections <br /> <br />
    **How to fix it:**

    * Be more specific about format requirements
    * Include section headers and expected content
    * Specify who the output is for
    * Add length guidelines
  </Accordion>

  <Accordion title="When Analysis Lacks Depth">
    **What you might see:** Surface-level insights, missing important factors, weak recommendations <br /> <br />
    **How to fix it:**

    * Add more expertise areas to the role
    * Break down the analysis into more steps
    * Provide more source material
    * Ask for specific types of analysis
  </Accordion>
</AccordionGroup>

## Building Your Pattern Library

Create a collection of your most effective prompts:

1. **Identify patterns** in your work that need AI assistance
2. **Develop templates** using the patterns in this guide
3. **Test and refine** with real business scenarios
4. **Document variations** for different situations
5. **Share with colleagues** to build team capabilities

<Tip>
  Use [Example Prompts](/en/platform/core-features/spaces/creating-spaces#creating-effective-example-prompts) in your Spaces to create a living library of your most effective prompt templates.
</Tip>
