Home
Contact Us
How Our AI Chat Uses Semantic Search to Answer Your Restoration Questions

How Our AI Chat Uses Semantic Search to Answer Your Restoration Questions

When your basement is flooding at 2 a.m. or you’ve just found mold behind your drywall, the last thing you need is a chatbot that gives you a generic, useless answer. We built our AI chat assistant to actually understand what you’re asking — not just match a few keywords. Here’s a plain-English look at how it works, and why it gives you better answers than a typical chatbot.

The Problem With Basic Chatbots

Most chatbots work like a simple search engine from 2005: they look for exact word matches. Ask “how do I dry out my walls after a pipe burst?” and a keyword-only bot might show you an article about pipes or an article about walls — but not the one that explains structural drying after a plumbing leak, which is exactly what you need.

That’s the problem semantic search solves.

What Is Semantic Search?

Semantic search understands the meaning of your question, not just the individual words in it. It can recognize that “my ceiling is dripping” and “active water leak from above” are asking about the same situation — even though they share no words in common.

Under the hood, every piece of content in our knowledge base is converted into a list of 768 numbers (called a vector embedding) that captures the meaning of that text. When you ask a question, your question is converted into its own vector. We then find all the content whose meaning is closest to yours — and use that to form the answer.

Think of it like a library where books are arranged by topic meaning instead of alphabetical order. A librarian using semantic search can hand you the right book even if you can’t remember the title.

Our Full Search Pipeline — Step by Step

Below is the exact workflow our chat assistant follows every time you ask a question. We’ll walk through each step.

Step 1 — Query Rewriting

When you send a message, the assistant first rewrites it into a richer, more specific search query. If you say “tell me more” as a follow-up, it uses the previous conversation to understand what you actually mean — for example, expanding it into “structural drying timeline after a burst pipe water damage event.”

Step 2 — Three Parallel Retrieval Paths

Rather than searching once, the system searches three different ways at the same time:

Step 3 — Reciprocal Rank Fusion (RRF)

We now have three ranked lists of results from vector search and one from keyword search. Reciprocal Rank Fusion merges them into a single, better-ranked list. A piece of content that appeared near the top of multiple search paths gets boosted — this is a principled way to combine different signals without just stacking lists on top of each other.

Step 4 — AI Re-Ranking

The merged list of candidates is passed to a dedicated cross-encoder model (Google’s Vertex AI Ranking API) that was specifically trained to score query-document relevance. Unlike the original vector search, the re-ranker reads your exact question and each candidate passage side-by-side, and scores how directly each one answers your question. The top 6 passages survive.

Step 5 — Contextual Retrieval (the secret sauce)

Here’s something we did at ingestion time (when we first loaded our articles into the system): every chunk of text was given a 1–2 sentence context summary explaining where it came from in the article and what concept it covers. This technique — called Contextual Retrieval — means each passage carries its own context, so the AI isn’t just reading a fragment that’s been ripped out of its original meaning.

For example, instead of just storing:

“Dehumidifiers should run continuously for 3–5 days.”

We store:

“This passage is from an article on structural drying after water damage. It explains the typical drying timeline for building materials using industrial dehumidifiers. — Dehumidifiers should run continuously for 3–5 days.”

That context travels with the chunk through every search, so the final answer is grounded in the right topic.

Step 6 — Answer Generation with Gemini

The top 6 passages, along with the conversation history and current article context, are sent to Gemini 2.5 Flash. The model is given strict instructions: answer from the knowledge base content, stay under 100 words unless more detail is genuinely needed, and always prioritize safety for emergencies. The answer is then streamed back to you word by word — so you see a response forming in real time rather than waiting for the full reply.

What This Means for You as a Homeowner

Why We Built It This Way

Restoration emergencies don’t follow a script. We’ve seen every combination — homeowners who don’t know what kind of damage they have, insurance policyholders who don’t know what’s covered, property managers dealing with a leak on the 10th floor at midnight. A keyword chatbot would fail most of those conversations.

The semantic pipeline described above means our assistant can handle an open-ended, natural conversation and still surface the most relevant information from our knowledge base — whether you’re asking about the mold remediation process, what Category 3 water means, or whether your homeowner’s policy typically covers storm damage.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *