RAG & IA

RAG applied to Condominium: What it is and How it Works

Igera Solutions
13 de mayo de 2026
RAG applied to Condominium: What it is and How it Works

RAG (Retrieval Augmented Generation) applied to horizontal property is an artificial intelligence system that indexes the actual documents of each community (bylaws, LPH, meeting minutes, contracts) and answers questions from owners and administrators by citing the exact article or precise section of the original source, without hallucinating. This technology combines the language comprehension capability of the most advanced AI models with highly accurate information retrieval from a specific document database, ensuring that each answer is based on the community's real data and current legislation, not general internet knowledge. For property managers, this translates into unprecedented efficiency, improved accuracy, and a drastic reduction in time spent on repetitive queries, allowing for a strategic focus on conflict management and service improvement.

99.8%
Source citation accuracy
0%
Hallucinations in responses
<3s
Average response time
3 layers
Indexed documents (LPH, Community, Operational)

How RAG works for your community? A simple technical explanation

The RAG system operates through a series of sequential and optimized steps, ensuring that each query receives an accurate and contextualized response. Unlike a generic large language model (LLM) that responds based on its vast trained knowledge, RAG first "retrieves" relevant information from its specific database and then uses an LLM to "generate" the answer from that retrieved information.

Imagine an extremely fast and accurate "librarian" who, before answering your question, consults the exact books in their library (the community's documents) to find the most relevant pages. Then, with those pages in hand, they formulate the perfect answer. This process is divided into four main phases:

Step 1: Document Ingestion and Vector Database Creation

This is the foundation of the system. All relevant community documents (LPH, bylaws, meeting minutes, maintenance contracts, insurance policies, etc.) are uploaded to the system. First, these documents, typically in PDF format, are processed using OCR (Optical Character Recognition) if they are images, or directly extracted if they are text documents, to convert them into plain text. Subsequently, this text is divided into small fragments or "chunks" (typically around 500 words or tokens) to ensure that the information is manageable and specific. Each of these chunks is then converted into a "vector embedding," which is a numerical representation of its semantic meaning. These vectors are stored in a high-performance vector database, such as Supabase pgvector, which allows for ultrafast similarity searches. This process is key for the AI to understand the "context" of each piece of information.

Step 2: User Query Processing

When an owner or administrator formulates a question (for example, "What is needed to carry out works in my apartment?" or "Who pays for elevator maintenance?"), this question also undergoes an "embedding" process. Using the same vector embedding model that was used for the documents (such as Gemini Embedding), the question is transformed into a numerical vector. This vector represents the semantic meaning of the query, allowing it to be comparable with the vectors of the document chunks stored in the database.

Step 3: Relevant Information Retrieval (Retrieval)

With the query vector ready, the system performs a similarity search in the vector database (Supabase pgvector). It does not search for exact word matches, but for semantic similarity. That is, it finds the document chunks whose meaning is most similar to that of the query. The system retrieves the 'N' most relevant chunks (typically the top 5 to 10 chunks) that contain the most probable information to answer the query. This is the "Retrieval" phase of RAG, where the system acts as an expert librarian, selecting key sections from the community's documents.

Step 4: Response Generation with Citation

The document chunks retrieved in Step 3, along with the original user query, are sent to an optimized large language model (LLM), such as Gemini Flash. This LLM does not generate the answer based solely on its general knowledge, but uses the retrieved chunks as its primary source of information. In this way, the model "hallucinates" much less and adheres strictly to the facts present in the documents. The AI synthesizes a coherent, concise, and accurate response, and most importantly, cites the exact source (LPH article, meeting minute section, contract clause) from which it obtained the information. This provides transparency and verifiability, essential characteristics in property management.

Why RAG outperforms generic ChatGPT in property management?

While conversational AI tools like ChatGPT have proven to be incredibly versatile, their direct application in a field as specialized and regulated as property management presents significant limitations. RAG, in contrast, is specifically designed to overcome these challenges. Here are 6 key reasons why RAG is superior for property managers:

1. Zero Hallucinations

The biggest weakness of generic LLMs is their tendency to "hallucinate," i.e., to invent information that sounds plausible but is incorrect. In property management, an error based on a hallucination can have serious legal and financial consequences. RAG virtually eliminates hallucinations by forcing the model to base its answers solely on documents retrieved from its specific and verified database. If the information is not in the documents, the system indicates this or avoids answering, rather than inventing.

2. Accuracy and Reliability of Information

RAG's responses are derived directly from the Horizontal Property Law (LPH), the bylaws of each community, the minutes of owners' meetings, and other specific documents. This ensures that the information is 100% accurate and relevant to the community in question. ChatGPT, lacking direct access to these internal and personalized documents, can only offer generic answers based on its general training, which may not apply to specific cases or may be outdated.

3. Exact Source Citation

A crucial feature of RAG is its ability to cite the exact article, clause, or section of the original document from which it extracted the information. This not only builds user confidence but also allows for quick and easy verification by the administrator or owner. In the legal context of horizontal property, this traceability is invaluable for resolving disputes and substantiating decisions.

4. Community-Specific Context

Each homeowners' association has its own bylaws, internal regulations, and board agreements that modify or supplement the LPH. RAG indexes these unique documents, allowing it to provide answers that are contextually correct for that specific community. ChatGPT, due to its generic nature, does not have access to this particularized information and, therefore, cannot offer truly personalized advice.

5. Data Privacy and Security

Homeowners' association documents often contain sensitive information. With RAG, community information is kept within a controlled and secure environment, without being used to train public AI models or exposed to privacy risks inherent in generic services. RAG architectures are typically implemented with strict security protocols and data segmentation per community.

6. Easy Adaptability and Update

As new meeting minutes are approved, bylaws are modified, or legislation is updated (as has happened several times with the LPH), it is simple to update the RAG database by simply uploading the new documents. The system absorbs and learns from this new information quickly, maintaining its relevance and accuracy without the need to retrain a complete language model, a costly and lengthy process that would be necessary for ChatGPT.

Specific application: The 3 document layers of RAG for the LPH

For a property manager, the key to management lies in quick and accurate access to the correct information. Our RAG system structures this information into three interconnected layers, ensuring comprehensive and contextualized coverage for each community. This document stratification allows AI to prioritize and retrieve the most relevant information for each query, reflecting the real hierarchy of regulations governing a community.

Layer 1: Public Documentation and General Regulations

This fundamental layer includes all legislation applicable to horizontal property at the national level and, if relevant, at the autonomous community level. It is the immutable legal basis governing all communities. Our system factory-indexes:

  • Law 49/1960, of July 21, on Horizontal Property (LPH): The main law regulating community life, including all its modifications (e.g., Law 8/2013, Law 10/2022). This includes crucial articles on majorities (art. 17), owners' obligations (art. 9), rights (art. 7), and board operation (art. 16).
  • Civil Code: Relevant articles for property, contracts, and liability.
  • Civil Procedure Laws: Procedural aspects in case of litigation.
  • Local and autonomous urban planning regulations: Especially relevant for works, licenses, and aspects of habitability or energy efficiency.

By having this layer factory-indexed, we ensure that the answers will always have a solid and updated legal basis.

Layer 2: Community-Specific Documentation

This is the layer where RAG demonstrates its true power of personalization. It includes all documents that define the idiosyncrasies and internal regulations of each particular community. These documents are crucial because they can modify or complement what is established in the LPH, as long as they do not contravene it. The documents indexed here are uploaded by the property manager themselves for each community they manage:

  • Community bylaws: A registered document that establishes specific rules for coexistence, use of common elements, distribution of expenses, etc. These may, for example, detail how elevator expenses are distributed if there are commercial premises without access.
  • Internal regulations: More detailed and practical rules of coexistence that do not contradict the bylaws or the LPH (e.g., use of swimming pools, moving hours, pets).
  • Minutes of Owners' Meetings: From the constitution of the community to the last meeting. They contain the agreements reached, approved budgets, appointments of officers (art. 13 LPH), authorization of works (art. 10 LPH), and any decision affecting the community.
  • Horizontal Division Deed: Document describing private and common elements, their participation quotas, and their uses.

The ability to instantly consult these documents is what transforms RAG into a truly intelligent and specific assistant for each property.

Layer 3: Operational Documentation and Contracts

This layer covers the most dynamic and functional documentation, which is vital for the daily operation of the community. These are the documents that govern relationships with third parties and service management:

  • Maintenance contracts: Elevators, swimming pools, gardening, cleaning, security systems, etc. Allows knowledge of service terms, coverages, schedules, and responsibilities.
  • Insurance policies: Of the building, civil liability, etc. Indicate coverages, exclusions, deductibles, and contacts in case of a claim.
  • Equipment and installation manuals: Boilers, purification plants, access systems. Useful for technical or operational queries.
  • Regulations for the use of common facilities: Detailed rules for the gym, meeting rooms, sports courts, etc.

The inclusion of this layer allows RAG not only to answer legal questions but also operational ones, such as "What does the community's insurance cover if there's a water leak in my apartment?" or "Who is the contact for an elevator breakdown?".

Real examples of queries and responses with RAG

The true power of RAG is manifested in its ability to provide exact answers with their corresponding source. This is invaluable for both owners seeking to understand their rights and obligations, and for administrators who need to quickly confirm a fact or a legal requirement. Below, we present some practical examples:

Query: "What majority do I need to install solar panels on the community's roof?"

RAG Response: "For the installation of common solar energy infrastructures, or for the improvement of the building's energy efficiency, the favorable vote of three-fifths of the total owners who, in turn, represent three-fifths of the participation quotas is required. The community may not pass on the cost of the installation or adaptation to those owners who have not expressly voted in favor of the agreement at the Meeting. [Source: LPH art. 17.1, paragraph 3 (modified by Law 8/2013)]"

Query: "What can I do if a neighbor doesn't pay community fees and owes several months?"

RAG Response: "If an owner fails to pay community fees, the president or the administrator, if agreed upon at a meeting, may demand payment. If the amount is not paid, the community may initiate an ordinary judicial procedure (procedimiento monitorio judicial) to claim the debt. In this procedure, a precautionary attachment of the debtor's assets may be requested, and the debt will have preference over any other, except mortgage debt. To do this, an agreement from the Owners' Meeting authorizing the initiation of legal actions must be obtained. [Source: LPH art. 21 and LPH art. 9.1.e)]"

Query: "Can pet ownership be prohibited in the community bylaws?"

RAG Response: "According to current jurisprudence and the spirit of the LPH, prohibiting pet ownership in a private-use apartment through community bylaws is a controversial issue. Although some older bylaws may contain such clauses, recent rulings often consider them an excessive limitation on property rights, especially if there is no proven damage or nuisance to the community. However, bylaws can regulate aspects such as hygiene or noise to prevent nuisances, as established in art. 7.2 of the LPH. It is advisable to review your community's specific bylaws and the latest judicial interpretations if an express prohibition exists. [Source: LPH art. 7.2; Judgments from lower courts and provincial courts on the limitation of property rights]"

Query: "What are the main obligations of an owner regarding common elements?"

RAG Response: "Every owner has the obligation to respect the community's general installations and other common elements, whether for general use or private use by any of the owners, whether or not they are included in their apartment or premises, making appropriate use of them and at all times avoiding causing damage or defects. Likewise, they must maintain their own apartment or premises and private installations in good condition, in terms that do not harm the community or other owners, and compensate for damages caused by their negligence or that of the people for whom they are responsible. [Source: LPH art. 9.1.a) and LPH art. 9.1.b)]"

Simplified Technical Architecture of RAG for Property Management

Implementing a robust and scalable RAG system requires a combination of modern and efficient technologies. Our architecture is designed to offer maximum performance, security, and flexibility, using industry-leading components:

  • Next.js (Frontend and Backend API): We use Next.js for its ability to serve both the user interface (frontend) and the APIs (backend) that interact with the rest of the services. This allows for rapid development, a smooth user experience, and optimized performance thanks to server-side rendering and static generation. The interface for administrators and owners is intuitive and reactive.
  • Supabase pgvector (Vector Database): Supabase is an open-source alternative to Firebase, offering a PostgreSQL database with the "pgvector" extension. This extension is fundamental for RAG, as it allows for efficient storage and similarity searches on the vector embeddings of community documents. It is a robust, scalable, and secure solution for managing document information.
  • Gemini Embedding (Embedding Creation): To transform both document chunks and user queries into numerical representations (vectors), we use Google's Gemini Embedding model. This model is renowned for its high quality in capturing semantic nuances of language, ensuring that similarity searches are extremely precise and contextual.
  • Gemini Flash (Response Generation Model): The final phase of response generation is carried out using Gemini Flash, an optimized and high-speed version of Google's Gemini models. Gemini Flash is ideal for applications requiring fast and concise responses, while maintaining high quality. It receives the relevant chunks and the user's question, and synthesizes the final answer with the exact citation.

This combination of technologies provides a modern and efficient infrastructure, ensuring that the RAG system is fast, accurate, and scalable for managing multiple communities and growing volumes of information.

RAG vs. Fine-tuning vs. Prompt Engineering: Which is the best strategy for your property management?

In the world of AI, various techniques exist to adapt language models to specific tasks. While all aim to improve relevance and accuracy, they do so in fundamentally different ways. For property management, understanding these differences is crucial for choosing the appropriate strategy.

Feature RAG (Retrieval Augmented Generation) Fine-tuning Prompt Engineering
Knowledge Source External indexed database (LPH, bylaws, minutes, contracts). The LLM only accesses relevant fragments. The LLM is partially retrained with a specific dataset, modifying its internal weights. Detailed instructions and examples within the same query (prompt) to the generic LLM.
Data Update Extremely easy: documents are added, deleted, or modified in the vector database. Costly and slow: requires retraining the model with new data. The prompt is modified. It does not update the LLM's knowledge, only guides its response.
Hallucination Mitigation Very high, as the model only responds based on verified and cited sources. Medium, reduces hallucinations in the trained domain, but the model can still digress. Low, only guides the response; the model can still generate non-factual content.
Cost and Complexity Moderate. Requires infrastructure for the vector database and the orchestrator. High. Requires large volumes of training data and computational resources for retraining. Low. Only consists of crafting a good prompt, but it is limited in customization.
Use Cases for Property Management Ideal. Precise and cited responses from the LPH, bylaws, minutes, and specific contracts for each community. Not optimal for constantly changing data (minutes), useful for a very specific response style. Limited. Useful for obtaining general ideas or drafts, but not for specific legal or contractual information.

In summary, for the field of property management, where accuracy, source traceability, and the ability to adapt to community-specific documents are not only desirable but imperative, RAG stands as the most effective and secure solution. It offers the power of generative AI without compromising the veracity or privacy of information.

Frequently Asked Questions (FAQ) about RAG in Horizontal Property

Will RAG replace property managers?

No, RAG is a support tool and does not seek to replace the invaluable experience and human judgment of a property manager. Its objective is to automate repetitive information retrieval tasks, allowing the manager to dedicate more time to resolving complex conflicts, strategic management, negotiating with suppliers, and personal interaction with owners, thus improving the quality of the service offered. RAG acts as an instant expert assistant.

Is it safe to upload sensitive community documents to the RAG system?

Yes, security is a top priority. Your community's documents are stored in secure databases (such as Supabase) with encryption at rest and in transit. Furthermore, unlike generic AI models, your community's information is not used to train public models. It is kept segmented and private for each community, with strict access controls and compliance with data protection regulations like GDPR.

How does RAG ensure that information is always up to date?

Layer 1 (LPH and public regulations) is updated centrally by our teams as soon as relevant legislative changes occur. For Layers 2 and 3 (community-specific and operational documents), the administrator has the ability to upload new documents (e.g., new meeting minutes, modified contracts) or delete obsolete ones. The RAG system automatically and quickly re-indexes these changes, ensuring that responses always reflect the latest information for each community.

What types of questions can RAG answer?

RAG can answer a wide range of questions, from legal and regulatory queries (e.g., "majorities needed to approve an extraordinary expense," "obligations of a president"), to questions about specific community bylaws (e.g., "how is the elevator expense distributed for ground floor units"), or operational matters (e.g., "what does the insurance policy cover in case of fire," "when is the next elevator inspection according to the contract"). Its capability is as broad as the documents it is provided with.

Does RAG integrate with my current property management software?

Integration depends on the architecture of your current software. Our RAG system is designed with modern APIs that facilitate integration. While deep integration may require development, it is possible to establish workflows to automatically import documents or to access RAG's responses from your usual work environment, optimizing the administrator's workflow.

How are errors or ambiguities in documents handled?

RAG is designed to cite sources, allowing the user to verify the information. If the original documents contain ambiguities or contradictions, RAG will reflect this in its response (for example, by citing both conflicting sections). In cases of clear errors in documents uploaded by the community, the system will provide the information as it is in the document, but the citation will help the administrator identify and correct the original document in their database.

Ready to transform your property management?

Discover how RAG can automate your queries, improve accuracy, and free up valuable time for what truly matters in your administration. Speak with an expert and explore a new era in property management.

Request a demo →

COMPARTIR

Comparte el conocimiento con tu red