Human in the loop: letting a real estate agent steer an AI search
In March we wrote about what we learned building conversational real estate search in France. The short version: the hard part is not search, it is turning fuzzy human language into structured intent.
Since then, the most useful thing we built is not a better model. It is a way to put a human back in the loop. On Kazaki, a real estate agent can now follow a buyer's search, read what is going on, and steer it by proposing properties.
This post is about how that works, and the design decisions we would defend.
What a buyer says is not what a buyer does
An AI assistant only knows what the buyer typed: city, budget, surface, number of rooms. Then the buyer goes and saves a flat that is over budget, in another neighbourhood, with one room less.
That gap between the declared project and the actual behaviour is exactly what a good agent picks up in a ten-minute phone call. So instead of asking the model to guess harder, we decided to show the gap to a human who knows what to do with it.
Two assistants, not one shared chat
Our first instinct was to let the agent join the buyer's conversation. We dropped it quickly: the model has to work out who is speaking, whose instructions win, and what each side is allowed to see.
We ended up with two separate assistants:
- The buyer talks to their own assistant, as before.
- The agent has a copilot, in conversations the buyer never sees.
The copilot has tools the buyer assistant does not have. Two of them matter here:
- one returns the client's declared project (their stated criteria);
- one returns what the client does: listings saved, listings they keep coming back to, listings they viewed.
When the agent asks the copilot to find properties for a client, the structured filters (zones, budget, surface, rooms) come from the client's file automatically. The model only writes the semantic part of the query. Same hybrid search as in March, with a human choosing what to do with the results.
An append-only journal, and pure functions on top
Everything the agent sees is derived from a journal of client events: a listing saved, a loan simulation, a proposal opened, and so on. Events are appended, never updated.
On top of the journal we compute two things: a delta ("what changed in the last 7 days") and a temperature, one of four states from hot to dormant. Our rule is that anything that decides is a pure function, with no database access:
type ClientTemperature = "HOT" | "ACTIVE" | "LUKEWARM" | "DORMANT"; interface TemperatureVerdict { state: ClientTemperature; rule: string; // id of the rule that decided, kept as the rationale daysSinceActivity: number | null; } // Simplified signature. No DB access: events and config come in, a verdict comes out. function evaluateTemperature(input: { events: JournalEvent[]; activity: ActivitySummary; // current window previousActivity: ActivitySummary; // previous window, to detect cooling previousState: ClientTemperature | null; now: Date; config: TemperatureConfig; }): TemperatureVerdict; A separate orchestrator reads the journal, calls the function, and writes the result back as a new event. A daily job runs it for every client an agent follows.
Two details paid off:
- The verdict names the rule that fired. When an agent asks why a client went cold, we have an answer that is not "the model said so".
- Cooling needs two windows. A client is not cooling because activity is low, but because it dropped compared to the previous period.
The steering wheel: proposals
The agent does not edit the buyer's criteria and does not write prompts. They steer with one gesture: proposing a property, with a short message.
The buyer sees it, opens it, and reacts. That reaction goes back into the journal and becomes a signal for the agent. It is a small loop, but it is the one where the human's judgement actually enters the system.
It also forced us to be strict about confidentiality in both directions. Agent notes about a client are private, and a single module is allowed to read them. A test fails the build if any other file touches that table. We trust that more than a code review.
Keeping the AI summary honest
The agent can ask for an AI summary of a client's trajectory. Summaries about real people and real money are where a made-up number does damage, so:
- we build an explicit set of facts first (ids, labels, values) from the journal;
- the prompt requires every number to be written in digits and bans absolute dates;
- a verifier then checks the numbers in the output against the fact set.
Writing numbers in digits sounds trivial. It is what makes the check reliable.
The summary never reads the content of private notes, only that a note exists and how it was tagged.
If we had to start again tomorrow
Keep the human out of the prompt. We lost weeks trying to fit two people into one conversation. Give the expert their own assistant and their own tools, and the problem disappears.
Hunt for the gap. "Three rooms, 250k, city centre" is what the buyer says. The two-room flat they opened four times this week is what they want. Build the screen that shows both side by side, then let a human take it from there.
Make every decision explain itself. "Why did this client go cold?" is the first question an agent asks. If your answer is "the model thinks so", you have already lost them. A pure function that names its rule answers in one line.
None of this made our AI smarter. It made it useful to someone who is better at the job than it is.
If you are building something similar, we would like to compare notes in the comments. And if you are curious about the product side, this is how real estate agents use Kazaki with their clients.