Challenge

RIFO wanted to build an AI chat agent for its real estate mobile applications that was competent in their business domains and could help customers progress in their home buying or selling journey prior to connecting with a real estate agent. In order to give customers a great experience, the AI chat agent needed to be able to search RIFO's property listings, accurately answer real estate questions specific to the markets RIFO services, and be fast and performant.
Solution

- Foundation Large Language Model: For the foundation LLM we used OpenAI's GPT-4.1 but thanks to LangChain it is easily hot swappable to newer or competing models.
- Knowledge Base RAG: Amazon OpenSearch Serverless as a vector database for Bedrock Knowledge Bases built from documents in S3 is a fully serverless solution for retrieval-augmented generation with minimal ongoing infrastructure costs yet still achieving subsecond retrieval times for internal documentation.
- Web Search RAG: The Tavily Search API enables the LLM to keep up with the latest real estate news and market trends through the web without requiring continuous tuning of the knowledge bases.
- Serverless and IaC: Implemented with API Gateway, Lambda, OpenSearch, and Aurora, the AI chat agent architecture deployed through the Serverless Framework on AWS elastically scales to as large or small a scale as required.
Outcome
- Prompt engineering allows the AI chat agent to provide a real estate assistant experience focused on where it can provide value to the customers.
- Custom developed tools allow it to integrate with and serve RIFO's property listing and community data.
- Using RAG with market and legal documents specific to Ontario and British Columbia and web search through Tavily, the AI chat agent is able to accurately answer questions specific to RIFO's markets.
- The fast and performant serverless architecture scales up and down to meet customer demand economically and is easily reproducible through infrastructure as code.