# A client's read replica alongside their documents

Connect a client's read replica next to the documents you already hold for them, so a question that needs both the contract and the count is answered from both, with the figure cited.

Client questions do not respect the line between paper and data. "Are we meeting the minimum order volume in the supply agreement?" needs a clause from a contract and a count from a database. Usually that is two requests to two people at the client, and you joining the halves by hand.

If the client can give you read-only access to a read replica, GPTree can hold both halves. This is a small example of what that looks like, and of the conditions that come with it.

## What to ask the client for

Ask for a database user that can only read, on a read replica, limited to what the engagement needs.

- **Read-only.** GPTree refuses to connect with a user that can change data, and it checks every time it connects, not only at setup. It never changes data in the database.
- **On a read replica.** This matters most if the connection will read tables. When the server is the live database rather than a read replica, reading tables 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.
- **Limited to the engagement.** Everyone who can use a connection sees what its database user can see. GPTree does not add row or column restrictions of its own. If the client wants you to see a handful of views and nothing else, the way to do that is a database user or views made for you.
- **A supported database.** PostgreSQL, MySQL or MariaDB.

Then connect it in Settings, then Knowledge sources, under "Databases". Connecting a database and asking it questions are included on the Pro and Team plans.

The default for "What GPTree may read" is "Views only", and it suits this arrangement: GPTree reads views, and the person asking approves their own query. If you choose "Tables" instead, GPTree reads tables directly and an admin of the connection approves each query.

## One question, two sources

With the client's documents already in GPTree and the replica connected, ask the mixed question in chat:

"What minimum monthly order volume does the supply agreement set, and how many orders did we take last month?"

The first half is a document question, and the answer cites the agreement.

The second half asks for a number, so GPTree checks it against the connected database and prepares a read-only query. The query waits. Nothing runs until it is approved. Meanwhile the answer is built from documents and says that the figure is not available yet and why. So the first reply gives you the clause and tells you plainly that the count is still to come.

Open Settings, then Knowledge sources, and look under "Queries waiting" in the Databases section. The waiting query shows your question, then a description in plain words: what is measured, where it is read from, and the exact dates that "last month" worked out to. Those dates are worked out by code, not by an AI model, in the time zone set on the connection, which is worth setting to the client's reporting time zone. Read any warnings, such as a join that could count rows twice, then select "Run query".

Ask the question again. This time the answer includes the figure, cites the saved result the way it cites the agreement, and states the exact range it measured. The clause and the count sit in one answer, each with a source you can check.

## Questions the client will ask you

**"Can it change anything?"** No. GPTree only connects with a user that can read and nothing else. Every query also runs inside a read-only transaction and is rolled back afterwards.

**"Could it slow our database down?"** Each query is held to limits that protect the database: a time limit the database server enforces (30 seconds by default and 60 at most), a cap on the rows returned, a limit on how many rows it may examine that is checked with the database's own estimate before it runs, and a limit on how many queries run at once per connection (two by default).

**"Which AI providers handle what you read?"** In the same place as the Databases section there is a section called "AI providers". By default any provider may be used and model choice is automatic. If the client names the providers they accept, choose "Only these providers" and tick them. GPTree then only uses models from those providers for your account: in chat, in Auto, and in its own background work. The model picker only shows their models, so the models that read the client's documents, the connected database and your conversations about them are only from providers they accepted. One exception to tell the client about: to remember things and find relevant content, GPTree still sends text from your messages and memories to OpenAI to build embeddings, whatever providers you allow. 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 any other provider is not sent, and GPTree says which providers your account allows. Agents and voice sessions keep to the same list.

**"Where do the results go?"** Query results are kept as evidence so answers can cite them. They belong to the same space as the connection. If you administer a workspace, you choose when you connect whether the connection is for just you or for the workspace.

**"What happens when the engagement ends?"** Select "Disconnect" and confirm. GPTree 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, so put the figures you need into your deliverable before you disconnect.

## What to expect

- Approval happens in the Databases section, not inside the chat conversation, and the figure arrives when you ask again.
- A request to approve expires after 24 hours.
- If a table has more than one date, such as an order date and a ship date, GPTree asks which one the period means, unless the question already says ("invoices issued in March").
- If a period cannot be turned into exact dates, GPTree does not guess. It says so.

None of this replaces reading the agreement or knowing the client's business. It puts the clause and the count in the same answer, each traceable to where it came from.
