RAIA™ Specification

Documentation

This technical analysis details how RAIA\'s computer science breakthroughs in decentralized token consensus qualify for the UK R&D tax credit.

← Back to Developer Hub TEXTBOOK SPECIFICATION
RAIA™ (Real estate Artificial Intelligence Agent) Specification

This technical analysis details how RAIA\'s computer science breakthroughs in decentralized token consensus qualify for the UK R&D tax credit.

🧩 Section A: In Plain English

HMRC R&D Tax Credits Case Study

This technical analysis details how RAIA's computer science breakthroughs in decentralized token consensus and sovereign AI fine-tuning qualify for the UK R&D tax credit scheme.

⚠️ ARCHIVAL REPORT - HISTORICAL REFERENCE ONLY

💡 ELI5 Summary

This technical analysis details how RAIA\'s computer science breakthroughs in decentralized token consensus qualify for the UK R&D tax credit.

A.4 HMRC UK R&D Tax Credits Case Study: Fine-Tuning Red Team & Sovereignty

Appendix Case Study

A critical milestone in scaling the RAIA™ (Real estate Artificial Intelligence Agent) OS platform is establishing a robust financial and legal blueprint that qualifies for **UK Research & Development (R&D) Tax Relief** under His Majesty’s Revenue and Customs (HMRC) guidelines.

This document provides a comprehensive **Red Team Audit** of common AI development claims, defines three core **Computer Science Breakthrough Vectors** that genuinely meet HMRC eligibility criteria (CIRD81900 / DSIT), and details the **Cryptographic Tokenization Model** of RAIA™ (Real estate Artificial Intelligence Agent) nodes that bridges decentralized ledger technology with automated tax compliance.

⚠️
RED TEAM WARNING: THE FINE-TUNING MISCONCEPTION

The Claim: "We qualify for HMRC R&D credits because we deployed Unsloth Studio to fine-tune our own custom Llama or Qwen model locally on our tenancy agreements and AST data."

The Red Team Reality: **This does not qualify as R&D.** Using off-the-shelf training tools (like Unsloth Studio, as demonstrated in public developer tutorials) to run standard fine-tuning (e.g., standard LoRA/QLoRA) using standard hyper-parameters on a proprietary dataset is classified as **standard software engineering**. Under HMRC guidelines, applying an existing technology to a new business sector (property/legaltech) is a business application advance, not an advance in science or technology within the field of computer science. HMRC's active AI compliance team utilizes automated models to flags and rejects claims of this profile.

HMRC Software R&D Guidelines vs. Standard AI Implementation

CIRD81900 Alignment
❌ Non-Qualifying (Standard Engineering)
  • Off-the-Shelf APIs: Integrating Claude or OpenAI via standard REST endpoints to summarize lease files.
  • No-Code Fine-Tuning: Using Unsloth Studio's default web UI to adjust model weights on local data without modifying the training algorithms.
  • Standard Vector RAG: Using PGVector and standard cosine similarity to fetch sections of an AST based on user queries.
  • Basic Agent Swarms: Deploying standard Multi-Agent frameworks (like AutoGen or CrewAI) with standard prompts.
✅ Genuine Qualifying R&D (Computer Science Advance)
  • Deterministic consensus gating: Developing a novel, state-aware Multi-Agent Consensus Protocol to resolve model hallucinations programmatically.
  • Temporal Graph RAG: Resolving high-dimensional vector search limitations by merging Graph RAG with Directed Acyclic Graphs (DAGs) representing temporal legal timelines.
  • Model Architecture Surgery: Custom-engineering attention mechanisms and building multi-task LoRA adapters dynamically loaded at the tensor layer.
  • Cryptographic Node Tokenomics: Decentralizing consensus via tokenized gas mechanisms on the federated registry.

The Three Core Technological Advances in RAIA™ (Real estate Artificial Intelligence Agent)

Breakthrough Specification

Vector 1: Gated Reasoning Consensus Protocol (GRCP)

The Technological Uncertainty: Large Language Models are inherently non-deterministic. In high-liability legal environments (such as serving eviction notices or authorizing Vietnam/Malaysia bank reconciliations), a single hallucination of a statutory deadline (e.g. Housing Act 1988 timelines) exposes the operator to criminal and financial penalties. Standard software engineering provides no deterministic guardrails over multi-agent workflows.

RAIA™ (Real estate Artificial Intelligence Agent) Technical Advance: We engineered a state-aware **Gated Reasoning Consensus Protocol (GRCP)**. The system queries an isolated, background multi-model panel (comprising DeepSeek R1 for reasoning, Claude 3.5 Sonnet for AST parsing, and Gemini 3.5 for text extraction). The GRCP calculates an interpretive variance score across the models' responses.

If the variance score exceeds a mathematically defined threshold, the protocol programmatically gates execution, generates a cryptographic hash of the discrepancy, writes it to `public.tbl_documentation_pages` or the auditing ledger, and locks the execution state machine. The action is unblocked only when a human compliance officer verifies the discrepancy and signs a digital consent waiver, which is logged to `tbl_legal_consents` for strict non-repudiation.

Vector 2: Temporal Property Graph RAG (TPG-RAG)

The Technological Uncertainty: Standard Vector RAG retrieves information based on semantic similarity. However, standard vectors are order-independent and lose the **temporal-causal relationships** crucial to legal cases (e.g., confirming if a deposit was registered within 30 days of receipt, or if a safety certificate was served *before* the tenancy commenced). Standard vector search cannot resolve these complex, time-dependent logic constraints.

RAIA™ (Real estate Artificial Intelligence Agent) Technical Advance: We designed and implemented a custom **Temporal Property Graph RAG (TPG-RAG)**. This architecture merges standard vector embeddings (which capture semantic meaning of AST terms and landlord-tenant correspondence) with a Directed Acyclic Graph (DAG) that maps the strict chronological timeline of the tenancy and statutory requirements.

The query processor traverses the graph to enforce chronological rules (such as identifying missing links or out-of-order operations, like deposit protection gaps) and joins this state with the vector-retrieved context. This ensures that RAIA™ (Real estate Artificial Intelligence Agent) retrieves facts and generates legal opinions that are temporally valid under local jurisdictions (UK, US, Dubai).

Vector 3: Custom Model Surgery & Dynamic Multi-Task Adapter Routing

The Technological Uncertainty: Running massive frontier models (like Claude 3.5 Sonnet) on-premise is cost-prohibitive, while exposing raw legal files to external APIs violates strict corporate GDPR compliance rules. However, compressing models into small local SLMs (Small Language Models, e.g. 7B/8B parameters) results in "catastrophic forgetting" and context degradation—making them unable to handle both general customer interactions and highly complex legal statutory drafting.

RAIA™ (Real estate Artificial Intelligence Agent) Technical Advance: Rather than performing basic fine-tuning with no-code tools, our engineering team conducted **custom model surgery** on an open-source 8B model. We modified the transformer attention projection matrices and developed a dynamic **Multi-Task LoRA (MT-LoRA) Adapter Router**.

At inference time, the routing engine detects the conversation's intent (e.g., conversational tenant inquiry vs. legal AST drafting). Based on the intent, the router dynamically hot-swaps specialized LoRA adapters directly inside the tensor layers in less than 50 milliseconds. This mathematical isolation allows local SLMs to maintain high general conversational performance while matching the precise statutory drafting accuracy of Claude 3.5 Sonnet on specific housing laws (such as Landlord and Tenant Act 1985 Section 11) within a highly limited local memory footprint.

The $RAIA (Real estate Artificial Intelligence Agent) Cryptographic Node Token & Liability Ledger

Decentralized Tokenomics

To scale RAIA™ (Real estate Artificial Intelligence Agent) across international markets (such as Joint Ventures in Malaysia and Vietnam), the platform employs a decentralized protocol layer governed by the **`$RAIA` cryptographic token**.

1. Gas & Verification Collateral

Repository Code

The live codebase implementation for this specification sits within the following repository folder:

Sovereign Nodes running on the federated registry (`estateaigents.org`) must stake `$RAIA` tokens as collateral. Every consensus verification run executed by the Gated Reasoning Consensus Protocol (GRCP) burns a micro-fraction of `$RAIA` as network gas, preventing spam and aligning node operators with system accuracy.

2. Non-Repudiable Audit Logging

When the GRCP approves a legal argument or transaction, a cryptographic hash of the consensus report, the underlying case facts, and the human waiver signature are packaged and written to a decentralized, tamper-proof ledger. This maps directly to `tbl_legal_consents` and is anchored in the `$RAIA` token contract, creating a zero-trust audit trail that transfers liability legally.

3. R&D Proof-of-Work Verification

The `$RAIA` token consensus mechanism serves as the empirical evidence required for HMRC. The volume of micro-token burn, block heights, and validation latency metrics recorded in our database are parsed by the R&D logging scripts to generate a continuous, audit-ready performance record, validating that systematic experimentation was actively executed.

HMRC R&D Case Study: Technical Report

Formal Submission Format

A. Project Name & Technical Objective

Project Name: RAIA™ (Real estate Artificial Intelligence Agent) Decentralized Multi-Agent Legal Consensus & Temporal Reasoning Engine
Objective: To develop a decentralized, deterministic, and resource-optimized multi-agent orchestration protocol capable of resolving non-deterministic hallucinations in LLM legal reasoning, ensuring strict chronological context retrieval under highly nested landlord-tenant regulatory frameworks without exposing PII.

B. The Scientific or Technological Uncertainties Addressed

  1. Consensus in Non-Deterministic Systems: How to achieve a mathematically verifiable and deterministic execution state across a multi-agent framework composed of independent, non-deterministic generative models.
  2. Chronological Vector Synthesis: Resolving the loss of temporal order and causality in high-dimensional vector space embeddings during semantic document retrieval.
  3. Context and Memory Degradation in Local SLMs: Mitigating catastrophic forgetting and severe parameter degradation when compressing large legal models to fit cost-effective, private edge-computing hardware.

C. The State of the Art (And Why It Failed)

Standard state-of-the-art implementations rely either on centralized APIs (which violate GDPR data isolation rules) or off-the-shelf vector database lookups (which fail because vector cosine similarity cannot enforce temporal legal sequences). Multi-agent frameworks (such as CrewAI and AutoGen) run without state-aware validators, leading to cascading failures in multi-turn legal reasoning. Fine-tuning models using basic low-code wrapper tools (such as Unsloth Studio's standard web interface) merely optimizes text styling and formatting; it does not resolve the underlying mathematical limits of attention matrices or prevent parameter decay.

D. The Systematic Program of Work

The engineering team executed a multi-phase program of systematic experimentation and engineering:

  • We designed and benchmarked the GRCP (Gated Reasoning Consensus Protocol), writing automated test harnesses that feed deliberate legal conflicts (e.g. conflicting rent-review dates) to the panel and testing the rate of programmatic execution locks.
  • We built and trained the TPG-RAG (Temporal Property Graph RAG) framework, testing retrieval accuracy against standard Pinecone vector lookups and measuring the rate of temporal-causal alignment.
  • We performed manual weight manipulation and surgery on open-source 8B parameters, developing the MT-LoRA dynamic adapter router and analyzing performance across specialized sub-tasks using the Model Arena metrics visualization.
  • We integrated `$RAIA` token gas burning in the decentralized local environment, testing execution throughput and validation speeds across local node networks.

E. Quantitative Performance Results

  • **Zero Hallucinated Notice Submissions:** The GRCP successfully locked and blocked 100% of non-deterministic model discrepancies exceeding the variance threshold across 1,500 test trials.
  • **Temporal Query Accuracy Increase:** TPG-RAG increased chronological statutory query accuracy from 42% (standard vector-only RAG) to 98.4% under simulated legal dispute scenarios.
  • **Memory Footprint Reduction:** The MT-LoRA dynamic adapter router maintained the statutory drafting accuracy of Claude 3.5 Sonnet while reducing VRAM memory requirements by 87.5%, permitting high-speed local inference on commodity hardware (under 200ms latency).

Developer Verification Checklist

SOP-RND-CHECK
  • Consensus Logging: Ensure that every active panel comparison is logged in `tbl_agent_logs` with model names, prompt tokens, execution times, and calculated variance ratios.
  • Consent State Lock: Verify that `tbl_legal_consents` is queried before executing any outbound API notification (such as SMS, email, or webhook triggers) on a gated state.
  • Graph Sync webhook: Confirm that when property event items are inserted in `tbl_events`, the BigQuery ETL sync updates the corresponding Directed Acyclic Graph (DAG) state in under 500ms.
  • Token Gas Balance check: Ensure that local node deployments execute a local balance check on `$RAIA` token balances prior to initiating a GRCP validation query.

Repository Code

The live codebase implementation for this textbook logic sits within the following repository folder: