Four layers: conversation, facts, follow-up, and serving
The assistant does three jobs: answer clients in chat, alert them daily about new matches, and write a weekly report. All three share the same four layers, so a fact shown in an alert is checked the same way as one said in chat.
A personal agent for every client, not a chatbot on a website
Home buyers and renters don't search once. They search for months, their preferences shift, and the market changes every day. The brokerage wanted every client in its app to feel like they had a dedicated agent paying attention.
FlyingNaNa is my own real-estate business, and I'm a licensed California Realtor (DRE #02214297). I built the assistant for my own clients, so it's designed around how agents actually follow up: what clients ask, when they lose interest, and what a good handoff to a human looks like.

realestate.flyingnana.com, the brokerage's client-facing site

AI-first brokerage: Realtor and AI tech lead in one role
The hard constraint was trust. A listing that says “Active” when it went pending yesterday, a made-up HOA fee, or an invented school rating does more damage than no answer at all. Prices and status change hourly, so anything the model memorized or a stale index returned was a liability.
One request, two designs
A client message (illustrative):
“Anything new in Irvine? 3 beds, under $1.4M, quiet street, close to Spectrum. Not another townhouse.”
- 01Embed the whole message; take the top 5 similar listing descriptions
- 02Index is a day old: one result went pending this morning
- 03Model fills gaps: “top-rated schools”, “low HOA”, with no source
- 04Returns a townhouse because its description says “quiet”
- 05Nothing remembers “not another townhouse” next week
- 01Rewrite → filters {city: Irvine, beds ≥ 3, price ≤ 1.4M, type ≠ townhouse} + semantic “quiet street”
- 02Hybrid retrieval ranks candidates; MLS tool confirms live status and price
- 03Self-check: each claim in the draft must match a field in the listing record
- 04Stream 3 homes with commute and the reason each fits
- 05Profile update: excludes townhouses from now on
Hard constraints are filters, not suggestions. Retrieval decides what's relevant; the MLS tool decides what's true right now.
LangGraph workflows own the conversation's state
Search, lead qualification, and scheduling are separate graphs with explicit state. The model chooses within a step; the graph decides which steps exist and what happens when one fails.
search_mls(filters) → Listing[]Every tool has typed inputs and outputs. A malformed call fails at the boundary and is retried or rerouted, not passed on.
state saved after each nodeA conversation that drops on a phone resumes where it stopped, without re-asking questions or re-running tools.
MLS timeout → cached result, labeledEach failure has a defined next step: retry, fall back, or tell the client plainly. No silent guessing.
timeline, pre-approval, budgetCollected naturally over the chat and written to the CRM once confirmed, so the human agent starts informed.
graph = StateGraph(SearchState)
graph.add_node("rewrite", rewrite_query) # message -> filters + semantic query
graph.add_node("retrieve", hybrid_retrieve) # Pinecone dense + metadata filters
graph.add_node("live_check", mls_live_status) # price / status / DOM from MLS
graph.add_node("draft", draft_answer)
graph.add_node("verify", self_check) # every claim must map to a record field
graph.add_edge("rewrite", "retrieve")
graph.add_edge("retrieve", "live_check")
graph.add_edge("live_check", "draft")
graph.add_edge("draft", "verify")
graph.add_conditional_edges("verify", route_after_verify,
{"ok": END, "revise": "draft", "requery": "rewrite"}) # bounded by state.attempts
app = graph.compile(checkpointer=checkpointer)Retrieval for meaning, MLS tools for facts
This is the layer that cut hallucinations by 75% on the evaluation sets. Three changes did most of the work: rewriting the query before retrieval, splitting “relevant” from “true”, and checking the draft before it reaches the client.
The index says Active; the home went pending this morning.
Status is always read live from MLS before it's shown.
“Top-rated schools” and “low HOA” appear with no source.
Claims without a matching record field are dropped by the self-check.
A $1.6M home ranks first because its description is a close match.
Budget and beds are filters, applied before ranking.
Daily alerts and the Friday report
Most of the value came from the assistant reaching out first. Both jobs read the same client profile and the same MLS data as chat, so an alert never says something the chat would contradict.
budget, areas, beds, must-haves, deal-breakersStructured fields, not a chat history. Updated from what the client says, saves, and dismisses, and visible to the human agent.
new MLS listings × profilesNew and back-on-market listings are filtered by hard constraints in code, then ranked. The LLM writes only the one-line “why this fits you”.
dedupe · daily cap · quiet hoursA home is announced once. Only the best matches are sent, so alerts stay worth opening.
matches · price drops · status changes · marketOne personal weekly summary per client, with next steps such as tours for saved homes still on the market.
async def daily_alerts(day: date) -> None:
fresh = await mls.listings(changed_since=day - timedelta(days=1), status=["Active"])
for client in await profiles.active():
matches = [l for l in fresh if passes_hard_filters(l, client.profile)]
ranked = rank(matches, client.profile) # hybrid score, no LLM
new = [l for l in ranked if not sent_before(client, l)][:DAILY_CAP]
if not new:
continue
reasons = await explain_fit(new, client.profile) # one line per home, checked against the record
await push.send(client, render_alert(new, reasons), respect_quiet_hours=True)Fast on a phone, safe to release
A mobile client notices every second of latency and every outage. Serving changes delivered 30% faster responses and 99.9% uptime.
tokens reach the app as they're generatedMLS calls and retrieval run concurrently, and the client sees the answer start immediately instead of waiting for the full reply.
Claude and GPT-4o, chosen per taskLightweight steps like rewriting and classification take the cheaper, faster path. Open conversation and report writing use the stronger model.
stable system prompt + tool schemasThe large, unchanging part of each prompt is cached, which cuts both latency and cost on every turn.
monitoring · rollback-readyEvery release is measured against the evaluation sets and watched in production. A regression is rolled back, not hot-fixed in a prompt.
Decisions I made, and what they cost
Rejected: index everything and answer from the index. Fast, but wrong whenever the market moves.
Chosen: an MLS call at answer time for anything that changes. A little slower; handled with concurrency and streaming.
Rejected: ask the model which new listings each client would like.
Chosen: filters and ranking in code; the model only explains. Cheap at scale and easy to debug.
Rejected: one agent with every tool deciding its own path.
Chosen: separate LangGraph workflows. More upfront design, but failures are reproducible and recoverable.
Rejected: notify on every match to maximize engagement.
Chosen: dedupe, a daily cap, and quiet hours. Fewer pushes, but clients keep notifications on.
What changed, and what I'd do next
- 01Hallucinations down 75% on the evaluation sets, from query rewriting, hybrid retrieval, live MLS facts, and self-correction.
- 0230% faster responses and 99.9% uptime after async execution, streaming, prompt caching, and model routing on SageMaker.
- 03Clients get a daily alert when a matching home lists and a personal report every Friday, without an agent writing either one.
- 04Next: learn preference weights from tours and offers, not just saves, and let the Friday report suggest when a client's budget or area should change.
Want an assistant that follows up on its own?
Live data in, grounded answers out, and proactive updates your clients actually open. I can help you scope and build it.
Talk through your use case