Skip to content

Latest commit

 

History

History
165 lines (132 loc) · 10.1 KB

File metadata and controls

165 lines (132 loc) · 10.1 KB

Product Requirements Document: Estate AI Assistant

Overview

The Estate AI Assistant is a conversational AI application designed to help real estate agencies assist potential buyers and renters in finding their ideal properties. The application uses natural language processing and machine learning to understand user preferences and recommend suitable properties from a database.

Problem Statement

Real estate agents often spend significant time manually matching clients with properties. This process can be inefficient and may not always consider all available options. Additionally, clients may not always be able to articulate all their preferences at once, requiring multiple interactions.

Functional Requirements

Requirement ID Description User Story Expected Behavior/Outcome
FR001 Conversational Interface As a user, I want to engage in a natural language conversation about my property preferences. The system should engage users in a natural language conversation, understand and respond to queries about properties, with persistent conversation allowing users to refine their search.
FR002 Property Search & Filtering As a user, I want to search for properties based on various criteria such as location, budget, and features. The system should search properties based on location, budget range, property type, number of rooms, desired amenities, and proximity to points of interest.
FR003 Data Integration As a developer, I want the system to support multiple data sources. The system should support local CSV files, external CSV sources via URLs, with potential for future API integrations.
FR004 Property Recommendations As a user, I want to receive personalized property recommendations. The system should provide personalized recommendations with key property details in a structured format and explain why properties match user criteria.
FR005 AI Capabilities As a developer, I want the system to leverage advanced AI capabilities. The system should use natural language understanding to extract preferences, reasoning capabilities to match preferences with properties, and learn from interactions to improve recommendations.

Target Audience

  • Real estate agencies and agents
  • Property buyers and renters
  • Property managers and landlords

User Stories

As a property buyer/renter

  • I want to describe my ideal property in natural language
  • I want to specify my preferences for location, budget, property type, and amenities
  • I want to receive property recommendations that match my criteria
  • I want to refine my search based on additional preferences
  • I want to compare properties based on various attributes

As a real estate agent

  • I want to quickly find properties that match client requirements
  • I want to provide clients with comprehensive property information
  • I want to identify negotiation opportunities based on market data
  • I want to streamline the property matching process

Features and Requirements

Core Features

1. Conversational Interface

  • The assistant should engage users in a natural language conversation
  • The system should understand and respond to user queries about properties
  • The conversation should be persistent, allowing users to refine their search

2. Property Search and Filtering

  • The system should search properties based on:
    • Location (city, neighborhood)
    • Budget range
    • Property type (apartment, house, condo)
    • Number of bedrooms and bathrooms
    • Desired amenities (parking, garden, pool)
    • Proximity to points of interest (schools, public transportation)

3. Data Integration

  • The system should support multiple data sources:
    • Local CSV files
    • External CSV sources via URLs
    • Potential future API integrations

4. Property Recommendations

  • The system should provide personalized property recommendations
  • Recommendations should include key property details in a structured format
  • The system should explain why properties match user criteria

5. AI Capabilities

  • Natural language understanding to extract user preferences
  • Reasoning capabilities to match preferences with property attributes
  • Learning from user interactions to improve recommendations

Technical Requirements

Requirement ID Description Details
TR001 Programming Language Python 3.11+
TR002 Backend Framework LangChain with support for multiple LLM models (OpenAI GPT, Llama)
TR003 Data Processing Pandas for data manipulation, FastEmbed for embeddings
TR004 Frontend Streamlit-based responsive web interface
TR005 Data Storage In-memory database and vector stores (DocArrayInMemorySearch, ChromaDB)
TR006 Data Format Support for various CSV data formats with standardized schema
TR007 Deployment Streamlit Cloud, Docker containerization
TR008 Package Management Poetry for dependency management
TR009 Environment Support for local development and cloud environments
TR010 Conversation Memory Multi-turn conversation with history retention

Architecture

Component Description Implementation
User Interface Layer Provides the interface for user interaction Streamlit-based web interface with chat components
AI Agent Layer Handles conversation and reasoning LLM-powered conversational agent (OpenAI GPT or Llama models)
Data Processing Layer Manages data loading and transformation CSV loaders and data formatters using Pandas
Data Storage Layer Stores property data and embeddings In-memory database and vector stores (DocArrayInMemorySearch)

Data Flow

Step Description Details
1 User Input User enters preferences through the conversation interface
2 Natural Language Processing The system processes the input using the AI agent
3 Data Retrieval The AI agent queries the property database based on extracted preferences
4 Result Processing Results are processed and formatted for presentation
5 Recommendation Display Recommendations are presented to the user in structured format
6 Conversation Refinement The conversation continues with additional queries and refinement

Technical Stack

  • Frontend: Streamlit
  • Backend: Python
  • AI/ML: LangChain, OpenAI GPT models, Llama models
  • Data Processing: Pandas, FastEmbed
  • Vector Storage: DocArrayInMemorySearch
  • Deployment: Streamlit Cloud, Docker
  • Package Management: Poetry

Version History & Roadmap

Version Features Status Implementation Details
V1 Basic property search with single-turn conversations Completed Used langchain_experimental.agents.agent_toolkits.pandas.base.create_pandas_dataframe_agent for direct data querying
V2 Multi-turn conversations with enhanced search capabilities Current Implements RAG with ConversationalRetrievalChain, supports multiple LLM models (OpenAI GPT, Llama)

Planned Enhancements

Feature ID Description Priority Technical Approach
PE001 Integration with additional data sources High Develop adapters for real estate APIs and additional data formats
PE002 Visual property comparisons Medium Implement side-by-side comparison components in Streamlit UI
PE003 Geographical mapping of properties Medium Integrate with mapping services to visualize property locations
PE004 Sentiment analysis for property descriptions Low Add sentiment analysis module using specialized LLM fine-tuning
PE005 Support for international property markets Medium Enhance data processing to handle different market formats and currencies
PE006 Fix "get db freeze" issue High Implement asynchronous data processing to prevent UI freezing

Success Metrics

Metric ID Description Measurement Method Target
SM001 User Engagement Conversation length, return rate >3 minutes average session, >30% return rate
SM002 Recommendation Accuracy Match between user preferences and suggestions >80% relevance rating in user feedback
SM003 Conversion Rate Inquiries to property viewings >15% conversion from chat to viewing request
SM004 User Satisfaction User ratings and feedback >4/5 average rating
SM005 System Performance Response time, error rate <3 second average response, <1% error rate

Project Timeline

Phase Description Status Deliverables
Phase 1 Initial prototype development Completed V1 with basic functionality
Phase 2 Integration of multiple data sources and LLM models In progress V2 with enhanced conversational capabilities
Phase 3 Enhanced user experience and additional features Future Visual comparisons, mapping, sentiment analysis
Phase 4 Production deployment and optimization Future Performance optimizations, scalability improvements

Constraints and Limitations

Constraint ID Description Impact Mitigation
CL001 Data Quality Dependency System performance limited by data structure and completeness Implement robust data preprocessing and validation
CL002 Text-Based Interaction Limited to text conversations in current version Future versions to include visual and voice interfaces
CL003 API Key Requirements OpenAI API key needed for optimal performance Support for open-source LLM alternatives (Llama)
CL004 Computational Resources Performance dependent on available resources Optimize models and implement caching strategies
CL005 Limited Testing Current version needs more comprehensive testing Develop automated test suite and perform user testing

Appendix

For detailed technical implementation, refer to the project repository documentation and the README.md file.