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

# Persona Selection by Use Case

> Choose the right Mavera persona for your audience, product, and research goal — with a practical matrix and code

## When to Use This

You need to **pick a persona** (or a set of personas) for responses, focus groups, or Mave research. Choosing the right persona drastically improves relevance: a Gen Z Consumer and a B2B Decision Maker will give very different answers to the same question.

This cookbook gives you:

* A **use-case → persona matrix** for common scenarios
* **Code** to list, filter, and select personas programmatically
* Guidance on **single vs multi-persona** strategies
* When to use **pre-built vs custom** personas

***

## Persona Categories (Quick Reference)

| Category         | Best For                                                       | Example Personas                                                   |
| ---------------- | -------------------------------------------------------------- | ------------------------------------------------------------------ |
| **Generational** | Consumer insights, brand messaging, product positioning by age | Gen Z Consumer, Millennial Professional, Gen X Parent, Baby Boomer |
| **Professional** | B2B research, enterprise software, sales enablement            | B2B Decision Maker, Startup Founder, Enterprise CTO                |
| **Lifestyle**    | Consumer behavior, purchase drivers, sustainability, budget    | Health-Conscious Consumer, Eco-Warrior, Budget Shopper             |
| **Industry**     | Vertical-specific research, domain expertise                   | Healthcare Professional, Finance Expert, Tech Enthusiast           |
| **Expert**       | Strategic analysis, competitive intelligence, market research  | Market Analyst, Brand Strategist, UX Researcher                    |

***

## Use-Case → Persona Matrix

Use this table to pick personas for your scenario. "Primary" = best first choice; "Alternates" = good for comparison or multi-persona runs.

| Use Case                           | Primary Persona(s)                      | Alternates                         | Why                                                                    |
| ---------------------------------- | --------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------- |
| **Consumer product launch**        | Gen Z Consumer, Millennial Professional | Gen X Parent                       | Generational personas reflect different buying priorities and channels |
| **B2B SaaS positioning**           | B2B Decision Maker, Enterprise CTO      | Startup Founder                    | B2B personas focus on ROI, security, and integration                   |
| **Sustainability / ESG messaging** | Eco-Warrior, Gen Z Consumer             | Millennial Professional            | These segments care most about environmental claims                    |
| **Healthcare / pharma**            | Healthcare Professional                 | Finance Expert, B2B Decision Maker | Industry context for compliance and clinical language                  |
| **Finance / fintech**              | Finance Expert, Budget Shopper          | B2B Decision Maker                 | Mix of institutional and retail perspectives                           |
| **Ad creative testing**            | Gen Z Consumer, Millennial Professional | Gen X Parent                       | Generational differences in creative preferences                       |
| **Brand authenticity**             | Gen Z Consumer, Eco-Warrior             | Millennial Professional            | These audiences value authenticity highly                              |
| **Feature prioritization**         | UX Researcher, Tech Enthusiast          | B2B Decision Maker                 | Expert + user perspectives                                             |
| **Competitive analysis**           | Market Analyst, Brand Strategist        | B2B Decision Maker                 | Strategic, market-aware viewpoints                                     |
| **Focus group (diverse)**          | Gen Z + Millennial + Gen X + B2B        | Mix generational + professional    | Coverage across segments for NPS, Likert, open-ended                   |
| **Ad copy for young adults**       | Gen Z Consumer                          | Millennial Professional            | Tone, channels, and language differ                                    |
| **Enterprise software sales**      | Enterprise CTO, B2B Decision Maker      | —                                  | Security, scalability, and procurement focus                           |

***

## Programmatic Persona Discovery

Fetch all personas and filter by category, name, or custom logic. Use this when building dynamic UIs or automating persona selection.

<CodeGroup>
  ```python Python theme={"dark"}
  import requests

  API_KEY = "mvra_live_your_key_here"
  HEADERS = {"Authorization": f"Bearer {API_KEY}"}
  BASE = "https://app.mavera.io/api/v1"

  def list_personas(category=None, search=None):
      """List personas, optionally filtered by category or name search."""
      resp = requests.get(f"{BASE}/personas", headers=HEADERS)
      resp.raise_for_status()
      personas = resp.json()["data"]

      if category:
          personas = [p for p in personas if p.get("category") == category]
      if search:
          search_lower = search.lower()
          personas = [p for p in personas if search_lower in p.get("name", "").lower()]

      return personas

  # Use-case helpers
  def personas_for_consumer_research():
      """Best personas for consumer product/messaging research."""
      return list_personas()  # Then filter by category
      # Or hardcode known IDs if your catalog is stable:
      # categories = ["Generational", "Lifestyle"]
      # return [p for p in list_personas() if p["category"] in categories]

  def personas_for_b2b():
      """Best personas for B2B/SaaS research."""
      return [p for p in list_personas() if p.get("category") == "Professional"]

  def get_persona_by_name(name):
      """Get a persona by exact or partial name match."""
      all_p = list_personas()
      for p in all_p:
          if name.lower() in p.get("name", "").lower():
              return p
      return None

  # Example: pick personas for a focus group
  personas = list_personas(category="Generational")
  persona_ids = [p["id"] for p in personas[:4]]  # Gen Z, Millennial, Gen X, Boomer
  print("Focus group persona IDs:", persona_ids)
  ```

  ```javascript JavaScript theme={"dark"}
  const API_KEY = "mvra_live_your_key_here";
  const HEADERS = { Authorization: `Bearer ${API_KEY}` };
  const BASE = "https://app.mavera.io/api/v1";

  async function listPersonas({ category, search } = {}) {
    const resp = await fetch(`${BASE}/personas`, { headers: HEADERS });
    const { data: personas } = await resp.json();

    let filtered = personas;
    if (category) {
      filtered = filtered.filter((p) => p.category === category);
    }
    if (search) {
      const s = search.toLowerCase();
      filtered = filtered.filter((p) => (p.name || "").toLowerCase().includes(s));
    }
    return filtered;
  }

  async function personasForConsumerResearch() {
    return listPersonas(); // Then filter by category as needed
  }

  async function personasForB2B() {
    return listPersonas({ category: "Professional" });
  }

  async function getPersonaByName(name) {
    const all = await listPersonas();
    return all.find((p) => (p.name || "").toLowerCase().includes(name.toLowerCase()));
  }

  // Example: pick personas for a focus group
  const personas = await listPersonas({ category: "Generational" });
  const personaIds = personas.slice(0, 4).map((p) => p.id);
  console.log("Focus group persona IDs:", personaIds);
  ```
</CodeGroup>

***

## Single Persona: Responses

For a single chat, pick one persona that matches your target audience. Use the matrix above, or filter by category.

<CodeGroup>
  ```python Python theme={"dark"}
  from openai import OpenAI

  client = OpenAI(api_key="mvra_live_your_key_here", base_url="https://app.mavera.io/api/v1")

  # Option A: Hardcode a known persona ID (fastest)
  PERSONA_ID = "clx1abc2d0001abcdef123456"  # e.g. Gen Z Consumer

  # Option B: Resolve by name at startup
  persona = get_persona_by_name("Gen Z Consumer")
  PERSONA_ID = persona["id"] if persona else None

  response = client.responses.create(
      model="mavera-1",
      input=[{"role": "user", "content": "What makes a brand feel authentic to you?"}],
      extra_body={"persona_id": PERSONA_ID},
  )
  ```

  ```javascript JavaScript theme={"dark"}
  const persona = await getPersonaByName("Gen Z Consumer");
  const personaId = persona?.id;

  const response = await client.responses.create({
    model: "mavera-1",
    input: [{ role: "user", content: "What makes a brand feel authentic to you?" }],
    persona_id: personaId,
  });
  ```
</CodeGroup>

***

## Multi-Persona: Focus Groups

For focus groups, use **3–6 diverse personas** so you get segment-level variation. Mix generational + professional or lifestyle depending on your product.

<CodeGroup>
  ```python Python theme={"dark"}
  # Diverse consumer focus group (generational spread)
  generational_ids = [p["id"] for p in list_personas(category="Generational")][:4]

  # B2B focus group (different roles)
  b2b_ids = [p["id"] for p in list_personas(category="Professional")][:4]

  # Hybrid: 2 Gen Z, 2 Millennial, 1 B2B (for a product that spans consumer + SMB)
  all_p = list_personas()
  gen_z = [p["id"] for p in all_p if "Gen Z" in p.get("name", "")][:2]
  millennial = [p["id"] for p in all_p if "Millennial" in p.get("name", "")][:2]
  b2b = [p["id"] for p in all_p if p.get("category") == "Professional"][:1]
  persona_ids = gen_z + millennial + b2b

  # Use in focus group payload
  payload = {
      "name": "Product Launch Feedback",
      "sample_size": 30,
      "persona_ids": persona_ids,
      "workspace_id": "ws_xxx",
      "questions": [...],
  }
  ```
</CodeGroup>

***

## When to Create a Custom Persona

Use **pre-built** personas when your target fits a common segment (Gen Z, B2B, etc.). Create a **custom persona** when:

* Your audience is **niche** (e.g. "Sustainable Fashion Buyer", "SMB Operations Manager").
* You need **specific psychographics** (goals, pains, buying stage) not in pre-built personas.
* You're running **repeated research** and want a reusable, tailored profile.

Custom personas cost **300 credits** to create but are then free to use. See [Personas](/features/personas#creating-custom-personas) for `NORTH_STAR`, `INTERMEDIATE`, and `ADVANCED` pipelines.

<CodeGroup>
  ```python Python theme={"dark"}
  # North Star: Minimal input, AI fills in the rest
  resp = requests.post(
      f"{BASE}/personas",
      headers=HEADERS,
      json={
          "pipeline_type": "NORTH_STAR",
          "name": "Sustainable Fashion Buyer",
          "description": "Eco-conscious millennial, values transparency and circular economy",
          "workspace_id": "ws_xxx",
      },
  )
  persona = resp.json()
  custom_persona_id = persona["id"]
  ```
</CodeGroup>

***

## Tips and Pitfalls

<AccordionGroup>
  <Accordion title="Cache persona IDs at startup">
    Listing personas is free but adds latency. Fetch once at app start and cache by name or category. Refresh periodically (e.g. daily) if you create new custom personas.
  </Accordion>

  <Accordion title="Match persona to question type">
    For "How would you describe X?", use a consumer persona. For "What features matter most for enterprise adoption?", use B2B or Expert personas.
  </Accordion>

  <Accordion title="Avoid overloading focus groups">
    4–6 personas is usually enough for segment diversity. More personas increase cost and can dilute clear patterns.
  </Accordion>

  <Accordion title="Combine persona + system prompt">
    Use persona for audience perspective; use system prompt for task (e.g. "You are a concise reviewer. Keep answers under 50 words.").
  </Accordion>
</AccordionGroup>

***

## See Also

<CardGroup cols={2}>
  <Card title="Personas" icon="user" href="/features/personas">
    Pre-built categories, custom creation pipelines, API reference
  </Card>

  <Card title="Quickstart: Chat" icon="comments" href="/quickstart-chat">
    First response with a persona
  </Card>

  <Card title="Quickstart: Focus Groups" icon="users" href="/quickstart-focus-groups">
    Multi-persona focus group setup
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/personas/list-personas">
    List and filter personas
  </Card>
</CardGroup>
