| @mantle/engine | minor |
|---|
RAG follow-ups on #153:
kb/querymetadata filtering — an optionalfilterobject restricts the search to rows whose metadata contains it, via the JSONB containment operator (metadata @> $2::jsonb). The whole filter binds as a single parameter (no injection surface); a custommetadata_columnis supported. Scope retrieval to a source, team, or tag alongside the vector search.- Separator-aware
recursivechunking —text/chunkgainsunit: recursive, which walks a separator hierarchy (paragraph → line → sentence → word → character) so chunks break on natural boundaries instead of mid-sentence, then merges pieces up tochunk_sizewithchunk_overlapcharacters carried between chunks. Therag-ingestexample now uses it. - Cohere Bedrock embeddings —
ai/embed(providerbedrock) now supportscohere.embed-english-v3andcohere.embed-multilingual-v3in addition to Amazon Titan. Cohere batches natively (up to 96 texts per call) and takes aninput_type(search_documentdefault /search_query/classification/clustering).
Token-accurate chunking remains a follow-up on #153.