惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
H
Help Net Security
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
A
About on SuperTechFans
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
I
InfoQ
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
U
Unit 42
The Cloudflare Blog
Y
Y Combinator Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How Natural Language Search Actually Works for Property L...
Caspar Banni · 2026-05-19 · via DEV Community

Most NLP tutorials use toy examples. "What's the weather?" "Book me a flight." Property search is structurally messier than either, and the failure modes are worth understanding before you build anything.

Here's how I implemented natural language search for Dublin rental listings, what broke, and what actually works.

The problem with filter dropdowns

Classic rental portals give you: min price, max price, min beds, max beds, area (dropdown), and maybe a keyword field. That's fine if you know exactly what you want and the options the site gives you match how you think. Most tools for finding apartments in Dublin are built around this exact model.

In practice, people search like this:

"2-bed near the DART, pet-friendly, under 1800, ground floor preferred"

That query has five separate intent signals. A dropdown UI forces you to split those across multiple controls, remember which areas are "near the DART", manually scan results for pet-friendly mentions, and completely ignore "ground floor" because no portal has that filter.

The fix isn't just "add more filters." It's parsing intent directly from text.

Intent extraction pipeline

My pipeline has four stages:

1. Query parsing with a structured extraction prompt

I use GPT-4o with a system prompt that instructs it to return a JSON schema. The schema has typed fields: max_price, min_beds, max_beds, transport_proximity (array of station names), pet_friendly (bool or null), floor_preference, areas (array), keywords (freetext remainder).

The LLM handles the conversion from natural language to typed values. "Under 1800" becomes max_price: 1800. "Near the DART" becomes an intent flag that hits a second lookup stage.

2. Geographic intent resolution

"Near the DART" is ambiguous. The DART runs from Malahide to Greystones. You have to ask: how near? Which stations matter for this user?

I don't try to resolve this in the LLM prompt. Instead I maintain a static lookup table mapping Dublin neighborhoods and transport stops to lat/lng bounding boxes. "Near the DART" expands to a union of bounding boxes within ~1km of each station. If the user said "near Sandymount DART" that narrows it to one station's box.

This is faster, cheaper, and more predictable than asking the LLM to do geography.

3. Structured query execution

Now I have a typed query object. This goes against the listings database as a standard structured query. Postgres, indexed on price, beds, area polygons. No vector search at this stage. Structured data matches structured queries better than embeddings do.

4. Semantic re-ranking

For the freetext remainder that doesn't map to structured fields ("quiet street", "modern kitchen", "nice landlord"), I use embeddings. The listing description text is embedded at index time (OpenAI text-embedding-3-small). The freetext query fragment is embedded at search time. Cosine similarity gives a re-ranking score that gets blended with the structured match score.

The blend ratio matters. Too much weight on embeddings and structured matches get buried. Too little and you lose the semantic layer entirely. I landed on roughly 70% structured, 30% semantic after testing on actual Dublin listing data.

What GPT gets wrong on real estate data

A few failure modes I hit:

Price hallucination. Early prompts without strong grounding would occasionally invent constraints. "Around 1800" might become max_price: 1750 or max_price: 1900 depending on prompt phrasing. Fix: require exact numeric extraction and default to null when the query is ambiguous, then ask the user to clarify.

Overfitting to query phrasing. If someone writes "not too far from town" the LLM might return areas: ["Dublin 1", "Dublin 2"] with high confidence. That's one interpretation. Another user might mean the same thing but expect Rathmines to be included. The structured query I build from that is deterministic; the interpretation step isn't.

Missing negation. "No agency fees" or "not a studio" are common. LLMs handle negation inconsistently in structured extraction. Explicit prompt engineering helps but doesn't fully solve it.

Listings data quality. Even with perfect parsing, listings have inconsistent data. "Pet-friendly" might be mentioned in the description, in an amenity tag, or not at all even if it's true. The semantic layer helps here, but it's not a complete solution.

Embeddings for listings: when they help, when they don't

Embeddings are good at capturing soft preferences that don't map to structured fields. "Quiet" vs "vibrant." "Modern" vs "period features." These are real preferences that affect decisions.

They're bad at exact constraints. If someone says "max 1800" and a listing is 2100, cosine similarity between "affordable" and a description mentioning "prime location" might still score it highly. Structured filtering has to happen first, before embeddings get anywhere near the results.

The architecture I landed on: structured query first (hard filters), then embedding re-rank within the filtered set. Never embedding search across the full corpus for price-sensitive queries.

The index structure

Each listing in the database has:

  • Structured fields: price, beds, baths, area, lat/lng, available date, pet policy (when known), parking
  • A generated text blob: all descriptive text from the listing concatenated
  • A precomputed embedding of that text blob
  • Source metadata for deduplication across the 90+ sites we aggregate

At search time: structured WHERE clause narrows the set, then embedding similarity re-ranks within it. Results return in under 200ms for most queries on the current Dublin dataset size.

What I'd do differently

If I were starting over, I'd invest earlier in the geographic resolution layer. Dublin's transport network is the single biggest intent signal in rental searches here, and the freetext-to-station-to-bbox mapping took longer to get right than the LLM integration.

I'd also be more conservative about what the LLM touches. The more you can push to deterministic lookups and structured queries, the more predictable the system is. LLMs are best at the translation step, not the search step.

The non-technical side of all this — why the search actually feels different for users — is covered in the user-facing guide on the HomeScout blog.


Caspar Bannink. Founder of HomeScout.io. Building AI-powered rental search for Dublin.