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.

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:
AnnotationLinks to
TableA table in the Catalog
FieldA column inside a table
LayerA storage layer in the Lakehouse
QueryA saved Query
NotebookA saved Notebook
SourceA Sources connector
DestinationA Destinations connector
Context documentAnother document, for cross-references
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.

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.
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.