Context and definitions
Context tells the AI what your data means, so answers follow your company’s definitions instead of the AI’s guesses. It lives on your gateway with the rest of your setup. You add it from the admin connector, in chat; the console doesn’t edit it.
What a dataset’s context holds
Section titled “What a dataset’s context holds”Each dataset has one context document, in a small template where only the summary is required:
| Part | What to write |
|---|---|
| Summary | What the dataset is and what one row represents, such as “One row per invoice sent to a customer.” |
| Owner | Who to ask about it |
| Columns | Per column, what it means in business terms, what its codes or statuses stand for (open = sent, not yet paid), and gotchas |
| Business rules | One per line, such as “Revenue excludes cancelled orders” |
| Notes | Anything else that matters |
The AI sees the summary, rules, notes and owner next to the dataset’s columns, and each described column’s meaning as its definition. People see the same under About this data in their results table.
Add context from a document or notes
Section titled “Add context from a document or notes”- In a chat with the admin connector on, share a data dictionary, a wiki page or your own notes, and ask “Draft the context for sales.invoices from this.”
- The AI fills the template from what you gave it and calls
draft_context. The setup widget opens the draft, checked against the real data. - Read the checks. Errors stop the save: no summary, a column that doesn’t exist, a column described twice, a listed column with no meaning. Warnings are worth a look: columns not described yet, and listed codes that aren’t in the data or codes in the data that the draft doesn’t list. Values of tokenized columns are never read for this check.
- Edit what’s wrong, then select Save context.
To write it by hand, open setup (“Set up a connection in Portward”), pick the source, go to step 3, Context, and select Write context (or Edit context) beside the dataset. Each dataset shows Has context or No context.
Saving context confirms the definition of every column it describes, and the setup log records each one. With the dataset’s context setting at Anything (Approvals and safety), the AI saves a draft with no errors itself, and you can still edit it in the widget.
Definitions
Section titled “Definitions”A definition says what one column means. It has one of three states:
| State | What the AI does |
|---|---|
| Confirmed | Uses it as given |
| Draft | Uses it, marked “unconfirmed: treat with care and say so in the answer” |
| None | Guesses, and states its guess as an assumption with the query |
Every answer record keeps the definitions in force when it ran.
To settle definitions, ask the admin connector “What needs attention in Portward?”. It opens the governance view
(governance) with Definitions to settle: columns people have used whose definition is missing or a draft, most
used first, with what the AI assumed about each one (“Assumed in answers”). For each column:
- Select Write definition (or Review draft).
- Type the meaning, or select Start from the assumption to begin from the AI’s last reading.
- Select Confirm definition. Answers use it from then on.
From chat, you can also tell the AI what a column means (“status ‘open’ means sent and not paid”). It calls
confirm_definition, which shows a review card to approve. draft_definition saves a draft only and never confirms
one. review_queue gives the AI the raw list of missing and draft definitions, up to 50.
Assumptions
Section titled “Assumptions”When the AI queries, it states how it read the question, such as “open = status ‘open’”. Each answer record keeps
these assumptions, and the evidence pack shows them under The AI’s assumptions. Ask the admin connector
“What has the AI been assuming?” (assumptions) to see the recent ones with the record, person, source and
columns. Assumptions that keep coming up are the definitions worth confirming.
Links between sources
Section titled “Links between sources”The AI can’t join two sources in one query. A link says which column matches which, such as shop.orders.email and
crm.customers.email, and the AI matches rows on it. Tokens match across sources, so a tokenized email joins with a
tokenized email.
A link starts from a person:
- When a question needs two sources with no link, the AI calls
suggest_links. The data connector ranks the columns in the other source by how many values they share, and shows the person a picker. Only counts leave the gateway, never values. The person picks a match, and it is saved as Picked by a person. - If the person names the match in chat instead, the AI saves it with
save_link, as Chosen in chat.
An admin then confirms it. The governance view lists them under Links people chose, and Confirm makes it Confirmed, the
trusted way to join those datasets. From chat, confirm_link shows the same as a review card. links lists every
link with who chose it and its state. A confirmed link is never downgraded. A person only sees links between datasets
they may use.
Audit and evidence: check what was asked and answered.