Features explained
How GPTree runs queries on your data safely
What GPTree can and cannot do with a connected database. It only reads, any query that needs a closer look waits for a person to approve it, every query is held to limits that protect the database, and each figure cites the saved result it came from.
Connecting a database means letting GPTree ask questions of data your business runs on. This page sets out what GPTree can and cannot do with that access. Each section starts with the plain answer and follows with the specifics.
The short version:
- GPTree reads. It never changes data in the database.
- A query that needs a closer look waits for a person to approve it. The rest run straight away, and you can see which ones did.
- Every query is held to limits that protect the database.
- Each result is saved as evidence, and the answer cites it, like a document.
It can only read
GPTree connects with a database user that can read and nothing else. Given a user that can change data, it refuses to connect.
The specifics: the check runs every time GPTree connects, not only at setup. On top of that, every query runs inside a read-only transaction, with a time limit the database server itself enforces, and is rolled back afterwards.
The connection is encrypted
GPTree asks the server what encryption the session actually has, and refuses a connection that is not encrypted.
The specifics: there are two settings. "Require encryption" is the default. "Require encryption and verify the server's certificate" needs the certificate authority pasted in PEM format. One caveat applies to verification. On MySQL and MariaDB, it only succeeds if the server's certificate lists the server's IP address, because GPTree connects to the address it resolved rather than to the name. Many hosted MySQL services issue certificates for a hostname only. Those work with "Require encryption" and are refused with verification on. PostgreSQL does not have this limitation.
A person approves anything that needs a closer look
When a question asks for a number (a total, a count, an average, "by month", "top 10"), GPTree checks it against the connected databases and prepares a query. Every query passes the same checks before anything runs. A query that passes them and raises nothing to look at runs straight away. A query waits for a person when it carries a warning (such as a join that could count rows twice, or money added across currencies), when it is the first query on a table through that connection, when it reads tables directly on the live database rather than a copy, or when an admin asked for queries like it to always be approved first. While one waits, the answer is built from documents and says that the figure is not available yet and why. Once it runs, the figure is posted in the conversation where it was asked.
Once someone allowed to approve has approved a kind of query, later questions of the same kind (the same tables and calculation, with different values) run without asking, unless a warning is about the values in that question. Admins of the connection see every query that ran without review, and can choose "Always ask first" for any kind of query that should wait. When a query waits for an admin, the admins get an email.
The person approving sees the question first, then the query described in plain words: what is measured, from which table, and over which exact dates. Warnings come next, such as a join that could count rows twice. The query itself sits behind "Show the query". That order is deliberate. Someone approving "what did we sell last month" can judge whether that is the right table and the right dates even if they cannot read the query.
The specifics: who approves a query that waits depends on what the connection may read.
- "Views only" (the default): GPTree reads views, and the person asking approves their own query.
- "Defined metrics only": GPTree answers only from metrics the organisation has defined and checked. A one-off query cannot run.
- "Tables": GPTree reads tables directly, and an admin of the connection approves it. On the live database rather than a replica, every query waits for an admin.
A request to approve expires after 24 hours. Through the Knowledge API, a key needs the "Run database queries" permission to approve a query. A key that can only read or ask cannot cause a query to run.
Limits that protect your database
Every query is held to limits, so that a question does not get in the way of the work the database is there to do.
- A time limit per query, enforced by the database server: 30 seconds by default and 60 at most.
- A cap on the rows returned.
- A limit on how many rows a query may examine, checked with the database's own estimate before the query runs.
- A limit on how many queries run at once per connection: two by default.
Queries run on background workers, never inside the page request.
There is an extra step when a connection reads tables and the server is the live database rather than a read replica. Reading it is off until an admin turns on "Allow reading the live database" and confirms "I understand queries will run on our live database." While that is on, queries run under tighter limits and one at a time.
Dates are worked out by code
A period such as "last month" is turned into exact dates by code, not by an AI model, in the time zone set on the connection. The answer states the exact range it measured.
Where a question can be read more than one way, GPTree asks or says so:
- If a period cannot be turned into exact dates, GPTree does not guess. It says so.
- If a table has more than one date, such as an order date and a ship date, it asks which one the period means, unless the question already says ("orders shipped in March"). The plain-words description always names the date it used.
- If two connected databases both have the table, it asks which database.
Results are kept as evidence
The result of a query is saved as evidence so the answer can cite it, the same way an answer cites a document. Saved results belong to the same space as the connection.
After a query has run, asking the question again includes the figure. Asking the same question again within five minutes reuses the result instead of running the query twice.
Who sees what
Everyone who can use a connection sees what its database user can see. GPTree does not add row or column restrictions of its own. To limit what someone sees, connect with a database user or views made for them.
Which AI providers are used
In Settings, then Knowledge sources, the "AI providers" section sets which providers may receive your account's content, including your knowledge and anything read from a connected database.
- "Any provider (recommended)" is the default. Any provider may be used, and model choice is automatic.
- "Only these providers" lets an account tick the providers that are allowed. GPTree then only uses models from those providers for that account: in chat, in Auto, and in its own background work such as summaries. The model picker only shows their models, and Auto chooses among them.
A few things follow from a short list. With only one provider allowed, the same provider both writes an answer and checks it, and the answer says so. A message that names a model from a provider that is not allowed is not sent; GPTree says which providers the account allows instead of quietly answering with another model. Agents and voice sessions keep to the same list. If a workspace you belong to allows fewer providers, the narrower list applies to you.
One exception: the list does not cover embeddings. To remember things and find relevant content, GPTree sends text from your messages and memories to OpenAI to build embeddings, whatever providers you allow. An embedding is a list of numbers that describes the text so it can be matched; it is not an answer. Passages of your documents and query results are different: they are only sent to OpenAI for embeddings when OpenAI is on your list.
What happens to the password, and when you disconnect
The password is stored encrypted and is never shown again after saving.
"Disconnect" asks for confirmation. GPTree then deletes the saved password, removes everything it read from that database (the structure and saved query results), and withdraws answers that relied on it. It cannot be undone.
Where to go next
- Connect a database to GPTree walks through the form.
- Approve a database query in GPTree covers reading and approving a waiting query.