- The paper introduces an end-to-end multi-agent framework that decomposes housing consultation into specialized tasks, ensuring high-stakes decision accuracy.
- It employs verification-gated memory, adaptive hybrid retrieval, and task-specific generation to mitigate errors in user preferences and output.
- Empirical results demonstrate 95% end-to-end correctness, outperforming baselines and validating the system’s practical utility in real-world deployments.
HabitatAgent: A Multi-Agent Closed-Loop System for High-Stakes Housing Consultation
Introduction and Problem Framing
Housing selection is characterized by consequential, irreversible choices, high transaction frictions, and significant information asymmetry. Existing real-estate platforms and LLM-based assistants primarily rely on ranking or basic recommendation pipelines, which are inadequate for handling the intricacies of real-world, multi-constraint housing consultation. These traditional approaches lack transparent reasoning, robust multi-turn preference modeling, and strong protection against factual or entity errors—shortcomings that become acute when users iteratively refine ambiguous goals and confront heterogeneous, relational constraints.
The HabitatAgent system addresses these gaps with an explicit end-to-end multi-agent framework, decomposing housing consultation into four orthogonal, specialized agents: Memory, Retrieval, Generation, and Validation. The architecture implements (i) verification-gated memory to prevent contamination of user preferences by unvalidated information, (ii) adaptive hybrid retrieval that invokes graph-constrained search only for relationally complex queries, and (iii) failure-type-aware remediation to enable targeted correction rather than naive output regeneration.
System Architecture
The HabitatAgent workflow orchestrates its four agents in a structured five-stage process for each interaction cycle. The Memory Agent performs constraint extraction, memory fusion, and verification-gated updating. The Retrieval Agent routes between dense and graph-based search according to query features, while the Generation Agent selects from a bank of task-sensitive prompt templates for evidence-grounded response construction. Critically, the Validation Agent applies multi-tiered checks and targeted remedies before any output or memory update is committed.
Figure 1: HabitatAgent overview depicting specialist agents orchestrated in an end-to-end workflow.
A typical use case starts with user input, followed by constraint parsing and adaptive evidence retrieval via GraphRAG, then proceeds to evidence-referenced response generation and multi-level validation before returning an auditable, verified recommendation.
Figure 2: Representative consultation flow, illustrating closed-loop agentic reasoning from query to validated recommendation.
Memory Management: Verification-Gated Multi-Layer User State
Persistent user modeling is handled with a four-tiered memory system: conversational buffer, entity memory, long-term bias memory with explicit weighting, and a retrieval memory for recommendation deduplication and diversification. Importantly, updates are strictly gated by validation results. Preference extraction occurs only when generated responses pass ≥0.85 factual and ≥0.90 entity agreement against retrieved evidence, preventing error propagation. This explicit gating mitigates the drift and contamination risks endemic to naive memory accumulation in multi-turn dialogue.
Retrieval: Adaptive Hybrid Vector–Graph Routing (GraphRAG)
Simple queries are handled by dense vector retrieval; relationally complex queries activate a graph-constrained pipeline. An adaptive router, trained with cost-sensitive loss, exploits surface features (constraint counts, relational keyword frequency, dense retrieval confidence gap, failure history) to minimize false negatives. For routed queries, dense retrieval generates broad candidates, followed by constraint translation (to Cypher) and filtering over a knowledge graph encoding project, transit, school, and policy relations. This hybridization supports both efficiency and precision, critical for entity-rich housing scenarios.
Generation: Task-Aware Evidence-Grounded Response Construction
The Generation Agent employs a suite of 14 task-specific prompt templates aligned with diverse consultation intents (recommendation, comparison, valuation, school-district, rental, policy, etc.). Each response explicitly references evidence, supporting downstream validation. Task classification ensures that response style and factuality constraints are respected on a per-intent basis, increasing faithfulness even under high query heterogeneity.
The Validation Agent begins with entity and factual consistency checks. On failure, three error types are discriminated: entity missing, constraint conflict, or factual error. Each triggers a targeted remedy—entity-focused retrieval, selective constraint relaxation, or local factual correction—rather than full-generation retries. This remediation loop increases the overall rate of validated, constraint-compliant responses and reinforces memory discipline.
Empirical Results
Evaluation on 100 authentic consultation scenarios (300 multi-turn QA pairs) demonstrates HabitatAgent attains 95% end-to-end correctness, a substantial improvement over Dense+Rerank (75%) and GraphRAG-Fixed (82%) baselines. The architecture also outperforms in nDCG@5, faithfulness, and constraint satisfaction metrics, especially for queries with demanding relational constraints. The hybrid router ensures competitive latency compared to full-graph retrieval pipelines. Crucially, ablation studies reveal adaptive routing’s removal drops accuracy by 20 points, and disabling verification or remediation each causes 7–10 point drops, highlighting the necessity of the closed-loop agentic workflow.
System in Practice
The HabitatAgent system is deployed as the decision engine for the Fangdongdong real estate platform, extending the research’s relevance to production-grade, user-facing scenarios.
Figure 3: Deployment branding for Fangdongdong's HabitatAgent-powered consultation system.
Figure 4: Product demonstration access via WeChat, evidencing integration into real-world workflows.
Theoretical and Practical Implications
HabitatAgent advances the design of LLM-based systems for high-stakes decision-support by empirically demonstrating that correctness is not merely a function of model or retrieval quality, but is instead determined by how memory persistence, evidence access, output generation, and multi-level validation are coupled. The system’s modularity allows for extensibility—e.g., migration to dynamic knowledge graphs, direct integration with external regulatory and compliance APIs, or adaptation to other domains requiring multi-step, auditable multi-agent workflows (e.g., finance, legal, or medical decision support).
The empirical findings also support the necessity of explicit failure mode modeling and controlled memory update for tasks where transaction irreversibility and cost of error are high. This approach challenges the typical LLM-centric paradigm by elevating system-level orchestration and validation to first-class design primitives.
Future Directions
Planned directions include evaluation across larger and more heterogeneous user and property pools, extension to additional cities and regulatory regimes, and dynamic knowledge graph integration. There is scope for formalizing agent interaction protocols, intent disambiguation under high ambiguity, and refining validation models for adversarial hallucination detection.
Conclusion
HabitatAgent introduces and validates a closed-loop, multi-agent design for reliable, auditable housing consultation under high constraint heterogeneity and error cost. Its performance gains derive from the synergistic integration of task-specific memory, adaptive GraphRAG retrieval, evidence-grounded prompting, and targeted multi-tier remediation. These design principles are broadly applicable to any domain where the correctness of complex, high-stakes AI recommendations is paramount.