Memory
IntelligentRAG — Pre-existing Issues Fixed ## 1. Document Content Corruption **Problem:** Documents had content "canonical:https" instead of full page text. **Root cause:** xberg extraction returns metadata instead of content for some URLs. **Fix:** Added content validation in `ingestUrl()`: ```typescript const isValidContent = extractedContent.length > 100 && !extractedContent.match(/^(canonical:|http:|https:)/i); if (isValidContent) { content = extractedContent; } else { content = scraped.content; // fallback to crawlberg markdown } ``` ## 2. Chunk Embedding Field Required **Problem:** `chunk.embedding` was `TYPE array<float>` (required), causing ingestion to fail. **Root cause:** Schema definition didn't use `option<>` wrapper. **Fix:** Changed to `TYPE option<array<float>>` via `DEFINE FIELD OVERWRITE`: ```sql DEFINE FIELD OVERWRITE embedding ON chunk TYPE option<array<float>>; DEFINE FIELD OVERWRITE embedding ON entity TYPE option<array<float>>; DEFINE FIELD OVERWRITE embedding ON topic TYPE option<array<float>>; ``` ## 3. Flow Table Not Created **Problem:** `flow` table didn't exist, causing `check_flows` tool to fail. **Root cause:** Flow table definition wasn't in the schema statements array. **Fix:** Added `FLOW_TABLES` constant and included it in `applySchema()`: ```typescript const FLOW_TABLES = `DEFINE TABLE flow SCHEMAFULL; ...`; const statements = [ { label: "flow tables", sql: FLOW_TABLES }, // ... other statements ]; ``` ## Deployment - Version: 6b9efbfb-6ae6-487d-9f92-73d5a1076a50 - All fixes verified: - Flow table exists (empty array) - Embedding fields are optional (none | array<float>) - Content validation will prevent "canonical:https" corruption on new ingestions ## Note Existing documents with corrupted content ("canonical:https") were created before the fix. New ingestions will have correct content.
Tags: intelligentrag, bugfix, surrealdb, schema, project:intelligentrag, kind:episodic — Source: claude — 2026-07-18 15:50:06 UTC