Context and definitions on the gateway (Enterprise)
Enterprise only. This page is about the Portward gateway that a company runs in its own cloud. If Portward runs it for you, on the web, this page doesn’t apply: see the page for Portward on the web.
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. It follows a small template in which 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 | For each column, what it means in business terms, what its codes or statuses stand for (open = sent, not yet paid), and any pitfalls |
| 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. For each described column, it sees the meaning as that column’s 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 and checks it against the real data. - Read the checks. Errors stop the save. An error is a missing summary, a column that doesn’t exist, a column described twice, or a listed column with no meaning. Warnings are worth a look. A warning flags columns not described yet, listed codes that aren’t in the data, or codes in the data that the draft doesn’t list. The check never reads the values of tokenized columns.
- Edit what’s wrong, then select Save context.
To write it by hand, open setup (“Set up a connection in Portward”) and 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. If the dataset’s context setting is Anything (Approvals and safety), the AI saves a draft with no errors itself. 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) at Definitions to settle. This lists the columns people have used whose definition is missing or a
draft, most used first. Each one shows what the AI assumed about it (“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.
You can also tell the AI in chat 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. To see the recent ones, ask the
admin connector “What has the AI been assuming?” (assumptions). Each one comes 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 Portward saves it 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 the link. The governance view lists these links under Links people chose. Confirm
makes a link Confirmed, which is the trusted way to join those datasets. In chat, confirm_link shows the same
choice 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 explains how to check what was asked and answered.