Get started
arrow back icon
PropTech
Artificial Intelligence
Startup
B2B2C

Housecure

Housecure hired T&F to simplify lease agreements with AI. This case study is useful for businesses seeking AI solutions or grant funding.
Arrow down

Background

Housecure, an FCA-regulated property-tech startup, identified an opportunity to harness AI to achieve their vision of making every aspect of home ownership streamlined and stress free. Housecure’s ambition became more attainable thanks to securing a grant from the UK government’s Innovate UK program, which offers generous R&D funds between £50k to £2m. Recognising that Innovate UK allows companies to use subcontractors for aspects beyond their in-house capability, Housecure subcontracted the AI analysis of lease agreements to us, T&F. Thus, we stepped in, perfectly positioned to support Housecure’s ambitions.

Challenge

Housecure faced a significant challenge: they aimed to address the high failure rates in UK residential property transactions by improving trust, reducing financial losses for buyers and sellers, and minimising wasted legal resources. Central to this vision was the development of an AI-assisted mediation and financial compensation system, with one component including the ability to understand complex lease agreements. This meant that instead of wading through pages of complex legal language, the AI would allow users to ask direct questions like, “What does this clause mean?” or “How much notice is required before vacating?” and get clear answers.

Addressing this challenge was vital for many reasons. Lease agreements, by nature, are filled with legal jargon that can be perplexing for many and often contribute to the high transaction failure rates that Housecure aims to reduce. Misunderstandings or oversights can lead to disputes, financial losses, or even legal consequences. Developing the AI component that can understand these complex lease agreements was a key piece in achieving Housecure's vision for smoother property transactions.

Team

To take on this challenge, we provided a small, experienced team comprising a Tech Lead and a Senior Engineer.

No items found.

What we did

Our approach began by establishing a clear blueprint for our solution and outlining the AI's capabilities, from its ability to comprehend legal terminology to crafting user-friendly responses. Our goal was to create a scalable and adaptable foundation that would allow the system to be continually tested, refined, and expanded based on real-world feedback.

The solution we devised was as follows:

  1. Document Embedding: We first convert the PDF into text. If the PDF contains scanned images, we use OCR (Optical Character Recognition) to convert the images to text. Once we have a text representation of the document, we use a technique called text embedding to convert the text into into a vector of numbers, a format suitable for machine learning models to consume.
  2. Semantic Search: Text embedding encodes the meaning of the text in such a way that text with similar meaning are stored closer in vector space. Combining this with a vector database allows us to query text based on meaning, not just a basic word search.
  3. User Query Handling: When users pose questions, the system identifies the most relevant content from the document, which is then passed to the Large Language Model (LLM).
  4. Response Generation: Equipped with the user’s question and the identified document context, the LLM crafts a concise response.

The Project

The outcome

After planning and development, our solution materialised with impressive outcomes.

Interactive API: We introduced an API allowing users to upload a PDF, regardless of whether it contains images or plain text. It lets users dive into a conversation about the uploaded document’s contents with the LLM, our language understanding model.

For instance, if we consider the following document and pose the query, “Are pets allowed?”

Housecure interactive API image

our system’s response encapsulates the essence of the document:

Housecure how the website works image

This response, driven by the top 4 results from our semantic search, provides a concise yet comprehensive answer, backed by the sections of the uploaded document.

As a result, the project passed Innovate UK’s mid-term review for smart grant funding. This approval means our solution meets the stringent standards set by the grant body, and it positions Housecure favourably for potential additional funding.

Technical Architecture

At the core of our system, we built a service using NestJS, making use of a suite of specialised libraries designed for AI applications. These libraries included Langchain, a powerful tool for working with LLMs in natural language processing, Pinecone as our chosen vector database, and the text-embedding model from the OpenAI API, along with their LLM (GPT-4).

Housecure technical architecture image

OCR Capabilities

To handle the OCR requirements, a separate Python service was built using specialised libraries such as pytesseract for text extraction, pdf2image for converting PDFs into a digestible format, and pypdf2 for PDF manipulation.

Monorepo & Deployment

The entire architecture was managed in a monorepo using NX. Automated build and deployment were set up with Google Cloud Functions, a serverless solution from Google that offers autoscaling features, thereby ensuring cost efficiency.

Flexibility in Model Selection

One of the standout features of our architecture was the flexibility it offered in model selection. For text embedding, we initially used ‘text-embedding-ada-002,’ but the service was designed to easily swap it out for a different model when needed. Similarly, we used ‘gpt-4’ as our LLM system, with built-in flexibility to replace it with a more fine-tuned model in the future.

Next Steps

Having made significant progress, we’re ready to take Housecure’s solution to the next level:

  1. Real-world Testing: Our immediate focus will be on deploying the system and testing it with actual lease agreements. This real-world environment will give us invaluable insights that lab tests cannot.
  2. Expert Feedback: We’re seeking feedback from professionals who deal with lease agreements on a daily basis. Given that Max, co-founder of Housecure, is a lawyer, his insights will be particularly valuable in refining our approach.
  3. Model Fine-tuning: With OpenAI recently opening the door to fine-tuning their models, as highlighted in their fine-tuning guide, we’re considering leveraging this opportunity, in addition to exploring open-source models. This step will further tailor our AI’s capabilities to the unique demands of lease agreements.

In summary, by diving deep into user needs, we crafted a tool that addresses the complexities of lease agreements. This endeavour not only stands as a testament to the transformative capabilities of AI but also illustrates that with the right vision, one can leverage grant funding and collaborate with the right partners to introduce innovative technology solutions to the market.

Client's testimonial