📄 Raw Incident Records JSON / ALLOYDB
[
{
"id": "doc-001",
"error_code": "ERR-404-TEMP",
"asset": "Conveyor Motor B",
"resolution": "Blown thermal fuse. Replace fuse #F-99."
},
{
"id": "doc-002",
"error_code": "ERR-502-VIB",
"asset": "Robotic Arm Assembly",
"resolution": "Servo misalignment. Recalibrate axes X and Y."
},
{
"id": "doc-003",
"error_code": "ERR-301-PRS",
"asset": "Hydraulic Press Valve",
"resolution": "Pressure leak. Tighten main seal and refill fluid."
}
]
↳ Matched via pgvector cosine similarity on the embedding column against the incoming IoT alert vector.
🧬 pgvector Similarity Query VECTOR(768)
-- Nearest-neighbor search
SELECT error_code, asset, resolution
FROM machine_manuals
ORDER BY embedding <-> query_vector
LIMIT 1;
-- Returned embedding vector (first record):
[
0.0142, -0.0921, 0.1134, -0.0451,
0.8821, 0.3341, -0.1102, 0.2234,
0.0571, -0.7823, 0.4412, 0.1109,
-0.3341, 0.0821, 0.9102, -0.0234,
0.1823, 0.5512, -0.2109, 0.0371,
... (768 dimensions total)
]
🔷 Embeddings generated via Vertex AI text-embedding-004.
Raw PDF manuals stored in Google Cloud Storage.