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

# Build Your Context Layer

> Understand the Context Layer and the recommended order for building it.

Before anyone on your team can ask questions in ClarityQ, the **Context Layer** needs to be built. The Context Layer is what teaches ClarityQ how your business thinks about its data — it bridges the gap between raw database tables and the business concepts your team uses every day.

<Note>
  The Context Layer is a prerequisite for using Ask Anything. The more complete and accurate your context, the better ClarityQ's answers will be.
</Note>

## What's in the Context Layer?

The Context Layer is made up of five components:

<CardGroup cols={2}>
  <Card title="Table Catalog" icon="table" href="/context-layer/table-catalog/what-is-the-table-catalog">
    A live inventory of the tables and columns in your data warehouse. ClarityQ automatically discovers and indexes your schema.
  </Card>

  <Card title="Event Catalog" icon="bolt" href="/context-layer/event-catalog/what-is-the-event-catalog">
    A catalog of product events, parameters, and user properties — synced from your analytics tracking and mapped to the semantic catalog.
  </Card>

  <Card title="Semantic Catalog" icon="diagram-project" href="/context-layer/semantic-catalog/what-is-the-semantic-catalog">
    The core business logic layer. Define metrics, features, segments, and dimensions that reflect how your organization measures and analyzes data.
  </Card>

  <Card title="Memory" icon="brain" href="/context-layer/memory">
    Persistent context that ClarityQ retains across conversations — at the personal and product level.
  </Card>

  <Card title="Skills" icon="wand-magic-sparkles" href="/context-layer/skills">
    Reusable analysis methodologies that guide the AI agent through complex, multi-step workflows consistently.
  </Card>
</CardGroup>

## Recommended Build Order

The components build on each other. Follow this order for the best results:

<Steps>
  <Step title="Table Catalog">
    This happens automatically after you [connect your data warehouse](/get-started/connect-your-data-warehouse). ClarityQ discovers your tables, columns, and schema structure. Review the results, act on discovery findings, and build entities from your tables.
  </Step>

  <Step title="Event Catalog">
    If your product tracks events (e.g., via Mixpanel, Amplitude, or custom tracking), set up the Event Catalog. Use the Missing Description Wizard to fill in gaps, then sync events to the Semantic Catalog.
  </Step>

  <Step title="Semantic Catalog">
    This is where you define business logic. Create dimensions, metrics, features, and segments that map to how your team actually talks about data. ClarityQ's AI agent actively helps build these components — leveraging your existing definitions, documentation, and data structure.
  </Step>

  <Step title="Memory">
    Add the knowledge that doesn't live in your database — business rules, naming conventions, domain-specific context. Memory improves answer quality over time.
  </Step>

  <Step title="Skills">
    Once your team has established repeatable analysis patterns, encode them as skills. The agent will follow these step by step for consistent, high-quality results.
  </Step>
</Steps>

<Tip>
  You don't need to complete every component before using Ask Anything. Once your Table Catalog and a few core Semantic Catalog components are in place, you can start asking questions — and continue building context as you go.
</Tip>
