Cortex Sense (Private Preview)¶
Cortex Sense builds a working model of your business from metadata your account already produces, so that Cortex Agents answer questions accurately.
Cortex Sense documentation¶
Cortex Sense is documented on two pages:
| Page | What it covers |
|---|---|
| Get started with Cortex Sense (this page) | Start here: step-by-step setup for your first context. |
| Cortex Sense reference | How Cortex Sense works, what it ingests, access control, costs, and more. |
Where to build Cortex Sense¶
How you start depends on where you run CoCo:
| Surface | How to start | Notes |
|---|---|---|
| CoCo CLI (recommended) | Type /sense. | The best experience and the least likely to be confusing. |
| CoCo Desktop | Type /cortex-sense. | A UI is coming soon. For now, everything is skill-based. |
| CoCo in Snowsight | Coming soon. | |
Before you begin¶
- Your account is enrolled in the private preview. If it isn’t, contact your account team to be nominated.
- You have
ACCOUNTADMIN, or an administrator who can run Step 1 for you.
Step 1: Grant the required database role¶
Only ACCOUNTADMIN can grant the database role required to build a context.
The role that builds a context owns it. Querying a context needs only USAGE, which you grant in
Step 5. See Access control and RBAC.
Step 2: Scope a use case¶
Open CoCo, then type /settings and point both Inference Connection and SQL Connection at the
account where you want to build the context, using the role from Step 1.
Start a new context for one business domain:
- CoCo CLI: Type
/sense, choose + Start a new Cortex Sense object, and follow the prompts. - CoCo Desktop: Type
/cortex-sense set up Cortex Sense for sales.
CoCo scans your account and proposes a scope:
Refine the scope in plain language, for example “include the MARKETING.LEADS schema” or “exclude anything in
staging or test”. CoCo then asks about inputs it can’t detect, such as a dbt path or business
documentation. Answer what’s useful and skip the rest; you can add more later.
CoCo also asks which database and schema to create the context in.
Indexing starts only after you confirm the scope. Scope drives both answer quality and indexing cost, so see What Cortex Sense can ingest and Best practices.
Step 3: Build the context¶
Confirm the scope:
The build runs in the background and takes a few hours. While it runs, you can give CoCo facts you
already know (for example, “ARR lives in ANALYTICS.MARTS.FACT_ARR”), add inputs, or note questions to
test against.
When the build finishes, the context is live for the role that built it, stored as a CORTEX SENSE
object in the database and schema you chose, named <database>.<schema>."sales".
Step 4: Check the build¶
In the CoCo CLI, type /sense to open the Cortex Sense page and pick a domain, or /sense <name> to
go straight to one. Tab moves between tabs and ? lists the keys.
The page has five tabs:
| Tab | What it shows |
|---|---|
| Overview | Build state, eval score, records waiting, and who has access. |
| Scope | Everything the object reads, grouped by kind. Exclusions sit under the rule they carve into. |
| Inbox | Corrections to what Cortex Sense believes about your data. 1–3 filter, A approves, E edits. |
| Accuracy | Eval results. 1–3 switch views; lift is accuracy minus the pre-context baseline. |
| Activate | Options for using this object in an agent or a CoCo skill. CoCo CLI 1.1.94 and later. |
A ready state means that the build finished, not that every source succeeded. Check Overview for
per-source progress. For more about serving a context, see
Where you can use Cortex Sense.
Step 5: Grant access to other roles¶
Grant USAGE to each role that should query the context. Keep the quotes around the context name:
During the private preview, give each role access to only one context. See Access control and RBAC.