Implementation of the paper A Self-Verification Framework Toward Reliable Text-to-BIM Generation.
This repository realizes the paper's closed-loop Text-to-BIM workflow in code. A natural-language building prompt is translated into an IFC model and iteratively improved through two complementary validation channels:
- an Information Delivery Specification (IDS) for formal, rule-based checks
- an LLM-based verifier for requirements that are difficult or impossible to express in IDS alone
The repository is therefore both a research prototype of the paper's framework and a runnable codebase for reproducing and extending the workflow.
The implementation follows the paper's three-agent architecture:
- Specifier: derives two specification artifacts from the user prompt:
spec.mdfor non-IDS requirements, written as atomicREQ-###itemsrequirements.idsfor formally expressible IDS constraints
- Modifier: creates or updates an IFC model to satisfy the prompt and later patch plans
- Verifier: inspects the IFC against
spec.mdand produces a structured review report
In parallel to the Verifier, the system runs an IDS validation step with IfcTester. Both reports are merged into a patch plan that drives the next modification iteration.
In short, the loop is:
prompt -> specification -> IFC generation/modification -> verifier report + IDS report -> merged patch plan -> next iteration
src/main.py: command-line entrypointsrc/orchestrator.py: coordinates the full Specifier-Modifier-Verifier loopsrc/specifier.py: prompt-to-specification generationsrc/modifier.py: LLM-based IFC editing with local IFC toolssrc/mcp_modifier.py: MCP-based modifier backendsrc/reviewer.py: LLM-based verifier using read-only IFC inspection toolssrc/mcp_reviewer.py: MCP-based verifier backendsrc/ids_tools.py: IDS validation helperssrc/ids_builder.py: compiles the specifier's IDS plan into valid IDS XMLsrc/merge.py: merges verifier and IDS results into a patch plansrc/tools_ifc.py: IFC utility and editing/query functionscase_study/: artifacts from the paper's example case study
A run creates a timestamped output directory inside the path passed via --out, for example run_out/run_<timestamp>/.
Typical artifacts are:
spec.md: non-IDS specification used by the Verifierrequirements.ids: IDS document used for formal validationassumptions.json: assumptions made during specification generationspecifier_trace.jsonl: Specifier traceiter_<n>/model.ifc: IFC model for iterationniter_<n>/review_report.json: Verifier output for iterationniter_<n>/ids_report.json: IDS validation output for iterationniter_<n>/modifier_trace.jsonl: Modifier trace for iterationniter_<n>/reviewer_trace.jsonl: Verifier trace for iterationnfinal_summary.json: latest merged state and stopping summary
Install the Python dependencies:
pip install -r requirements.txtThis project also depends on the MCP4IFC framework for Blender: https://github.com/Show2Instruct/ifc-bonsai-mcp
After installing it, update the corresponding entry in mcp.config.json so it points to your local MCP4IFC setup.
The LLM components require an OpenAI-compatible API key:
export OPENAI_API_KEY="..."Run the default example:
python src/main.pyRun with an explicit prompt and output directory:
python src/main.py \
--prompt "Create a simple but realistic house, 4 rooms per level, 2 levels, made out of wood. The roof should be a gable roof." \
--out run_outUseful options:
--max-iters: maximum number of refinement iterations--model-specifier: model used by the Specifier--model-modifier: model used by the Modifier--model-reviewer: model used by the Verifier--modifier-backend {llm,mcp}: choose local-tool or MCP modifier--reviewer-backend {llm,mcp}: choose local-tool or MCP verifier--mcp-config: path to the MCP configuration file
Two execution styles are supported for modification and verification:
llm: uses the local IFC tool wrappers from src/tools_ifc.pymcp: uses MCP tools configured in mcp.config.json
The included MCP configuration is set up for a Blender MCP server and openai:gpt-5.2.
The repository contains a case-study folder corresponding to the paper's demonstration prompt:
"Create a simple but realistic house, 4 rooms per level, 2 levels, made out of wood. The roof should be a gable roof."
The case_study directory includes:
- the generated specification artifacts
- intermediate IFC models across iterations
- IDS and verifier reports
- a final summary of the refinement process
This is useful both as a reproduction artifact for the paper and as a reference for the repository's expected outputs.
- This is a research prototype implementing the paper's framework, not a hardened production system.
ifc_python_execis powerful but not a security sandbox.- The quality of the final IFC depends on specification quality, tool availability, and model behavior across iterations.
- IDS and LLM-based verification are complementary; neither alone covers the full range of BIM requirements discussed in the paper.
Citation coming soon.
