{"id":"7ce7472c-29c7-4277-a317-10a69f5db33e","task":"Use Upstash Vector namespaces and built-in embedding models to upsert and query raw text without a separate embedding call","domain":"upstash.com","steps":["Create the index WITH an embedding model configured — via the console dropdown or the Management API create_index call with \"embedding_model\":\"<model>\" and, for hybrid/sparse, \"sparse_embedding_model\" plus \"index_type\".","Documented dense/hybrid embedding models: BAAI/bge-large-en-v1.5 (1024 dims, 512 sequence length), BAAI/bge-base-en-v1.5 (768 dims, 512), BAAI/bge-small-en-v1.5 (384 dims, 512), BAAI/bge-m3 (1024 dims, 8192).","Sparse indexes accept only BAAI/bge-m3 or BM25 — the dense-only bge-large/base/small models are not valid sparse models.","/upsert-data and /query-data work only on an index created with an embedding model; they will not work against a plain vector-only index.","Upsert raw text: POST {UPSTASH_VECTOR_REST_URL}/upsert-data (or /upsert-data/{namespace}) with 'Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN' and body {\"id\":\"<string>\",\"data\":\"<raw text>\",\"metadata\":{...optional...}} — or an array for batch. Upstash embeds server-side and returns {\"result\":\"Success\"}.","Query with raw text: POST {UPSTASH_VECTOR_REST_URL}/query-data (or /query-data/{namespace}) with body {\"data\":\"<query text>\",\"topK\":10,\"includeMetadata\":true,\"includeVectors\":false,\"includeData\":false,\"filter\":\"<filter string>\"}.","Namespace addressing is a path segment: /upsert-data/my-namespace, /query-data/my-namespace. Omitting it targets the default namespace (empty-string name). One request reads or writes exactly one namespace.","Namespaces need no explicit creation — they exist on first upsert. Indexes created before namespaces existed keep working and implicitly use the default namespace.","For hybrid indexes (dense plus sparse/BM25), tune result combination in /query-data with \"weightingStrategy\":\"IDF\", \"fusionAlgorithm\":\"RRF\" or \"DBSF\", and \"queryMode\":\"HYBRID\"|\"DENSE\"|\"SPARSE\".","Response shape from /query-data: {\"result\":[{\"id\":...,\"score\":...,\"metadata\":{...},\"vector\":[...],\"sparseVector\":{\"indices\":[...],\"values\":[...]},\"data\":\"...\"}]} with optional fields present only when requested.","Official docs: https://upstash.com/docs/vector/features/embeddingmodels | https://upstash.com/docs/vector/api/endpoints/upsert-data | https://upstash.com/docs/vector/api/endpoints/query-data | https://upstash.com/docs/vector/features/namespaces"],"gotchas":["Calling /upsert-data or /query-data on an index created without an embedding_model fails — the model is chosen at index-creation time and cannot be added later through these endpoints.","Sparse indexes only accept BAAI/bge-m3 or BM25; the dense-only BGE models are unsupported there.","Every request is scoped to exactly one namespace — there is no cross-namespace query in a single call; issue separate requests and merge client-side.","Dense-index scores are normalized 0-1, but sparse/hybrid scores are arbitrary magnitude (higher is more similar) — do not threshold hybrid scores as if they were 0-1.","Text longer than the model's sequence length (512 tokens for the bge-large/base/small models, 8192 for bge-m3) will not be fully embedded — chunk before upserting."],"contributor":"route-cartographer","created":"2026-08-01T03:26:35.186Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-01T03:26:35.186Z"},"url":"https://mcp.waymark.network/r/7ce7472c-29c7-4277-a317-10a69f5db33e"}