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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- ar
|
| 5 |
+
- bg
|
| 6 |
+
- cs
|
| 7 |
+
- de
|
| 8 |
+
- en
|
| 9 |
+
- es
|
| 10 |
+
- fr
|
| 11 |
+
- hi
|
| 12 |
+
- hr
|
| 13 |
+
- id
|
| 14 |
+
- it
|
| 15 |
+
- ja
|
| 16 |
+
- ko
|
| 17 |
+
- nl
|
| 18 |
+
- pl
|
| 19 |
+
- pt
|
| 20 |
+
- ro
|
| 21 |
+
- ru
|
| 22 |
+
- sv
|
| 23 |
+
- th
|
| 24 |
+
- tr
|
| 25 |
+
- vi
|
| 26 |
+
- zh
|
| 27 |
+
tags:
|
| 28 |
+
- construction
|
| 29 |
+
- cost-estimation
|
| 30 |
+
- BIM
|
| 31 |
+
- quantity-surveying
|
| 32 |
+
- vector-database
|
| 33 |
+
- qdrant
|
| 34 |
+
- bge-m3
|
| 35 |
+
- hybrid-search
|
| 36 |
+
- multilingual
|
| 37 |
+
- construction-rates
|
| 38 |
+
size_categories:
|
| 39 |
+
- 1M<n<10M
|
| 40 |
+
pretty_name: CWICR Vector DB (BGE-M3 V3) — 30 Countries
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
# CWICR Vector Database — BGE-M3 V3 Snapshots
|
| 44 |
+
|
| 45 |
+
Production Qdrant snapshots for **CWICR (Construction Works Items, Costs & Resources)** — a multilingual catalogue of construction rate databases covering **30 countries / language locales**. Each snapshot encodes one country's rate book using the **BAAI/bge-m3** embedder and is ready to restore directly into a Qdrant server for hybrid semantic search.
|
| 46 |
+
|
| 47 |
+
These snapshots are the V3 production artifacts produced by the OpenConstructionEstimate / CWICR pipeline. The primary downstream use case is **BIM-element ↔ construction-rate matching** for cost estimation, but the data is general-purpose for any retrieval over multilingual construction-cost catalogues.
|
| 48 |
+
|
| 49 |
+
## What's inside
|
| 50 |
+
|
| 51 |
+
Each `.snapshot` file is a Qdrant collection snapshot of one country's rate database with:
|
| 52 |
+
|
| 53 |
+
- **Granularity**: one Qdrant point per unique `rate_code` (≈ 55,000 rates per country).
|
| 54 |
+
- **Named vectors** per point:
|
| 55 |
+
- `dense` — 1024-d, COSINE, BGE-M3 dense embedding of the rate's title + work composition + hierarchy.
|
| 56 |
+
- `sparse` — BGE-M3 lexical sparse vector (BM25-like, IDF-modified) for exact-code / token matching.
|
| 57 |
+
- `resources` — 1024-d, COSINE, optional dense embedding of the rate's resource list (machinery, materials, labour). Present only for non-abstract rates.
|
| 58 |
+
- **Payload** (29 indexed fields): `rate_code`, `country`, `collection_name`, `category_type`, `department_code`, `is_abstract`, `rate_unit`, `mass_*`, plus hierarchy / classification tags. Heavy fields (prices, full resource composition) live in the matching `*.parquet` files in the parent CWICR repository, looked up by `rate_code`.
|
| 59 |
+
|
| 60 |
+
Total rates indexed: **~1.65 M points** across 30 collections.
|
| 61 |
+
|
| 62 |
+
## File naming
|
| 63 |
+
|
| 64 |
+
```
|
| 65 |
+
<LANG>_<CITY>_workitems_costs_resources_EMBEDDINGS_BGEM3_V3_DDC_CWICR.snapshot
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
Example: `VI_HANOI_workitems_costs_resources_EMBEDDINGS_BGEM3_V3_DDC_CWICR.snapshot`.
|
| 69 |
+
|
| 70 |
+
Snapshots are organised into one folder per language code (`AR/`, `BG/`, `CS/`, `DE/`, `EN/`, `ES/`, `FR/`, `HI/`, `HR/`, `ID/`, `IT/`, `JA/`, `KO/`, `MX/`, `NG/`, `NL/`, `NZ/`, `PL/`, `PT/`, `RO/`, `RU/`, `SV/`, `TH/`, `TR/`, `UK/`, `US/`, `VI/`, `ZA/`, `ZH/`, `AU/`).
|
| 71 |
+
|
| 72 |
+
## Coverage status
|
| 73 |
+
|
| 74 |
+
This dataset is being uploaded in stages. Current state on the Hub:
|
| 75 |
+
|
| 76 |
+
| Status | Locales |
|
| 77 |
+
|---|---|
|
| 78 |
+
| Uploaded here | VI (Hanoi), ZA (Johannesburg), ZH (Shanghai) |
|
| 79 |
+
| Pending migration | the remaining 27 locales, currently hosted as Git LFS in the source repo |
|
| 80 |
+
|
| 81 |
+
The remaining snapshots will be migrated as bandwidth allows. The encoder and source parquet files are open and deterministic — see "Reproducibility" below for regenerating any locale from scratch.
|
| 82 |
+
|
| 83 |
+
## Reproducibility
|
| 84 |
+
|
| 85 |
+
Each snapshot is reproducible from the corresponding parquet (`*_workitems_costs_resources_DDC_CWICR.parquet`) in the [CWICR source repo](https://github.com/datadrivenconstruction/OpenConstructionEstimate-DDC-CWICR) using the V3 production encoder in that repo: `0_Workflow and Pipelines CWICR/python/10-embedding-pipeline/v3_production_all_languages.py`.
|
| 86 |
+
|
| 87 |
+
Embedder: `BAAI/bge-m3` (Apache-2.0). Point IDs are derived via `uuid5(NS_CWICR, f"{country}|{rate_code}")` so re-encoding is idempotent.
|
| 88 |
+
|
| 89 |
+
## Restoring a snapshot into Qdrant
|
| 90 |
+
|
| 91 |
+
Bring up Qdrant locally:
|
| 92 |
+
|
| 93 |
+
```bash
|
| 94 |
+
docker run -d --name qdrant -p 6333:6333 -p 6334:6334 \
|
| 95 |
+
-v "$(pwd)/qdrant_storage:/qdrant/storage" qdrant/qdrant:latest
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
Upload and restore the snapshot via the HTTP API:
|
| 99 |
+
|
| 100 |
+
```bash
|
| 101 |
+
COLL=cwicr_vi # one collection per locale: cwicr_vi, cwicr_za, cwicr_zh, ...
|
| 102 |
+
SNAPSHOT=VI_HANOI_workitems_costs_resources_EMBEDDINGS_BGEM3_V3_DDC_CWICR.snapshot
|
| 103 |
+
|
| 104 |
+
# 1. Create empty collection (config will be overwritten by the snapshot)
|
| 105 |
+
curl -X PUT "http://localhost:6333/collections/$COLL" \
|
| 106 |
+
-H 'Content-Type: application/json' \
|
| 107 |
+
-d '{"vectors": {}}'
|
| 108 |
+
|
| 109 |
+
# 2. Upload + recover
|
| 110 |
+
curl -X POST "http://localhost:6333/collections/$COLL/snapshots/upload?wait=true" \
|
| 111 |
+
-F "snapshot=@$SNAPSHOT"
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
Or programmatically with `qdrant-client`:
|
| 115 |
+
|
| 116 |
+
```python
|
| 117 |
+
from qdrant_client import QdrantClient
|
| 118 |
+
client = QdrantClient(url="http://localhost:6333")
|
| 119 |
+
client.recover_snapshot(
|
| 120 |
+
collection_name="cwicr_vi",
|
| 121 |
+
location="file:///abs/path/to/VI_HANOI_..._BGEM3_V3_DDC_CWICR.snapshot",
|
| 122 |
+
)
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
## Hybrid search example
|
| 126 |
+
|
| 127 |
+
```python
|
| 128 |
+
from FlagEmbedding import BGEM3FlagModel
|
| 129 |
+
from qdrant_client import QdrantClient, models
|
| 130 |
+
|
| 131 |
+
model = BGEM3FlagModel("BAAI/bge-m3", use_fp16=True)
|
| 132 |
+
qdrant = QdrantClient(url="http://localhost:6333")
|
| 133 |
+
|
| 134 |
+
query = "máy đào 15 m³" # Vietnamese: "15 m³ excavator"
|
| 135 |
+
enc = model.encode([query], return_dense=True, return_sparse=True)
|
| 136 |
+
q_dense = enc["dense_vecs"][0].tolist()
|
| 137 |
+
q_sparse = enc["lexical_weights"][0]
|
| 138 |
+
|
| 139 |
+
hits = qdrant.query_points(
|
| 140 |
+
collection_name="cwicr_vi",
|
| 141 |
+
prefetch=[
|
| 142 |
+
models.Prefetch(query=q_dense, using="dense", limit=100),
|
| 143 |
+
models.Prefetch(
|
| 144 |
+
query=models.SparseVector(
|
| 145 |
+
indices=[int(i) for i in q_sparse.keys()],
|
| 146 |
+
values=list(q_sparse.values()),
|
| 147 |
+
),
|
| 148 |
+
using="sparse",
|
| 149 |
+
limit=100,
|
| 150 |
+
),
|
| 151 |
+
],
|
| 152 |
+
query=models.FusionQuery(fusion=models.Fusion.RRF),
|
| 153 |
+
limit=10,
|
| 154 |
+
with_payload=True,
|
| 155 |
+
)
|
| 156 |
+
for p in hits.points:
|
| 157 |
+
print(p.score, p.payload["rate_code"], p.payload.get("collection_name"))
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
For BIM-element matching, queries are typically built from IFC entity properties (type, dimensions, material). Add a third prefetch over the `resources` named vector when the query is best matched by machinery/material lists rather than rate titles.
|
| 161 |
+
|
| 162 |
+
## Languages and locales
|
| 163 |
+
|
| 164 |
+
23 distinct human languages across 30 locale-specific rate books (some languages cover multiple countries with locale-specific pricing and classification, e.g. EN-CA / EN-GB / EN-US / EN-AU / EN-NZ / EN-NG / EN-ZA, ES-ES / ES-MX, PT-BR). Each locale uses its own native-language collection structure (Russian СНиП codes, German DIN, US MasterFormat / RSMeans-style classifiers, etc.), preserved verbatim in the payload.
|
| 165 |
+
|
| 166 |
+
## License
|
| 167 |
+
|
| 168 |
+
Snapshots are released under **Apache-2.0**, matching the license of BGE-M3 and Qdrant. The upstream rate data is sourced from publicly available national/regional rate catalogues; license applicability of underlying rate codes follows each catalogue's terms of use.
|
| 169 |
+
|
| 170 |
+
## Citation
|
| 171 |
+
|
| 172 |
+
If you use these snapshots in academic work please cite the parent repository:
|
| 173 |
+
|
| 174 |
+
```
|
| 175 |
+
@software{cwicr_2026,
|
| 176 |
+
author = {Boiko, Artem and DataDrivenConstruction},
|
| 177 |
+
title = {OpenConstructionEstimate — CWICR: Multilingual Construction Rates Vector Database},
|
| 178 |
+
year = {2026},
|
| 179 |
+
url = {https://github.com/datadrivenconstruction/OpenConstructionEstimate-DDC-CWICR}
|
| 180 |
+
}
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
## Contact
|
| 184 |
+
|
| 185 |
+
- Source code & issue tracker: https://github.com/datadrivenconstruction/OpenConstructionEstimate-DDC-CWICR
|
| 186 |
+
- Author: Artem Boiko (DataDrivenConstruction)
|