Skip to main content
Context is a library of business knowledge that grounds Nekt’s AI in your organization’s definitions. You write documents that explain what your metrics mean, which records count as paying customers, how the stages of your funnel are defined — and every agent that queries your data reads those documents before generating SQL. Without Context, agents have to guess from raw table and column names. With Context, they answer questions the way you would.

Why context belongs next to your data

Your data is already in the Catalog, and context documents reference it directly through annotations. That turns scattered business knowledge into a structured map of how your definitions connect to real tables, fields, and pipelines, instead of a document set that describes data living somewhere else. Centralizing that layer also means everyone reaching your data through Nekt works from the same definitions, whatever tool they use: Claude, Codex, Copilot, or any other agent. Same source, same rules, same answers. That consistency is what makes agent responses faster, more accurate, and repeatable across a team.

What’s in a context document

Each document combines two things:
  • Prose that describes a metric, segment, rule, or definition in plain language.
  • Annotations that link the prose to specific resources in your workspace, so the AI knows exactly which tables, fields, and pipelines the definition refers to.
Annotations can reference: When an agent retrieves a document, the annotations bring in the resolved resource names, layers, and descriptions automatically — so the model gets both the business definition and the underlying schema in one place.

Creating a context document

Open Context from the sidebar. You’ll see two views:
  • All documents — every context document in your workspace.
  • Templates — starter prompts that help your agent draft your first documents.
1

Start from a template or blank

Pick a template that matches what you want to document, or click New document to start from scratch. If you don’t know where to begin, the Don’t know where to start? template lets your agent explore your workspace and propose what to document first.
2

Write the definition in prose

Explain the concept the way you would to a new analyst. Focus on intent — what counts, what doesn’t, why — rather than how the SQL should be written.
3

Add annotations

Reference the tables, fields, layers, queries, notebooks, sources, or destinations the definition depends on. Annotations keep the document anchored to real resources as your warehouse evolves.
4

Save

The document is indexed immediately. The next agent question that touches that topic will use it.

Let an agent build your library

If you already have this knowledge written down somewhere, the fastest path is to hand it to an agent connected to your workspace through the MCP Server.
1

Gather what you already have

Metric definitions, onboarding docs, wiki exports, spreadsheets of business rules. Anything that explains how your business works.
2

Share the files in an agent session

Attach them to a conversation with Claude, Codex, or any other assistant connected to your Nekt MCP Server.
3

Ask it to structure them as context documents

The agent writes each document in the right format and adds annotations pointing at the tables and fields that already exist in your Catalog, so the result is shaped for agent consumption from the start.
4

Review before saving

You still own the definitions. Read what the agent produced, correct anything that drifted, and drop documents that don’t earn their place.
If the MCP Server isn’t connected yet, use that time to curate. Decide what is actually worth documenting and clean up the rest, so the upload is quick once the connection is live.

Templates

Nekt ships with starter prompts that cover the definitions most teams need first:

Revenue & MRR

How revenue is recognized and MRR is calculated, including multi-currency handling.

Active customers definition

Which subscription statuses count as paying, and the internal orgs that never do.

Sales funnel stage definitions

What counts as an MQL, SAL, and SQL, and which lead sources are excluded.

Product usage & credits

How customers consume the product, unit conversions, and plan-limit signals.

Cross-cutting rules

The gotchas that apply to every analysis: exclusions, soft deletes, currencies.

Don't know where to start?

Let your agent explore your workspace and propose what to document first.

How agents use Context

When you ask a question through the MCP Server or any other AI integration, Nekt runs a semantic search over your context documents and feeds the most relevant ones into the SQL generation step. The agent reads the business rules first, then writes a query that respects them. This means the same question — “What was revenue last month?” — produces different SQL for different organizations, because each organization’s definition of revenue lives in its own context library.

Best practices

Prefer prose plus annotations over raw SQL. Describe what a metric means, not how to compute it. Schemas change; definitions don’t.
Upload only what matters. Useful context is the smallest set of high-signal information. The same disorganized documentation that confuses a new analyst also confuses an agent, so filter before you upload rather than after. Include examples. A record that counts, one that doesn’t, a worked calculation. Concrete cases resolve ambiguity faster than more prose. Keep documents focused. One document per concept is easier to retrieve precisely than a single document covering everything. Cross-reference instead of repeating. If active customers is defined in one document, link to that document from others rather than re-explaining the rule. Update documents when business rules change. A stale definition is worse than no definition — the agent will follow it confidently.

Programmatic access

AI agents can also create, update, and delete context documents through the MCP Server. See create_context_document, update_context_document, and delete_context_document for the full schemas.