vector field. Sources can be text, or text and images with a multimodal model.
Choose the provider and model in the field’s embedding configuration. LambdaDB handles:
- provider credentials
- vector generation during document writes
- query embedding generation for vector search
Supported providers and models
LambdaDB’s dimension limits also apply when the embedding provider accepts smaller values. Optional
embedding.similarity supports cosine and euclidean; all models default to cosine.
Collection schema
Define a vector field with anembedding block to let LambdaDB generate its vectors. sources lists the document fields to embed, in order, each with its type.
photos below is stored but not indexed:
Schema rules
See Limits for a summary of source, image, and request constraints. Use the recommended SDK, CLI, MCP server, and Migration CLI releases for native configuration.embedding.provider,embedding.model, andembedding.sourcesare requiredembedding.sourcesholds a nonempty ordered list of{ "field", "type" }entries;typeistextorimage, and field paths must be unique- a source
fieldis a dotted path in the stored document; it does not need an index config. If it is indexed, the leaf must betextorkeywordand its ancestors must beobjectfields - OpenAI models accept exactly one
textsource; Cohere models accept text and image sources in any order - native embedding vector fields must not use top-level
dimensionsorsimilarity; set them insideembedding, where omitted values use the model defaults - LambdaDB resolves and stores the effective
embedding.dimensionsandembedding.similarity
Write behavior
Send the source fields and let LambdaDB generate the vector. You can also send the vector field directly; a supplied vector is stored as is and skips inference and image retrieval for that document.
Text sources must be scalar strings. Image sources are a string or a flat array of strings; every array element is embedded with the other sources into one combined vector. Missing sources and empty image arrays are skipped; if no source is present, no vector is generated. Explicit
null, arrays on text sources, objects, and other non-string values return HTTP 400 when inference is needed. To omit a source, leave out the JSON property rather than setting it to null.
Example upsert payloads for the two schemas above:
Text input limits
Use nonempty source text within the selected provider’s input budget:
OpenAI token budgets follow its embedding input contract. LambdaDB requests no truncation for Cohere, so an input over the model’s context limit is rejected with HTTP
400.
These limits apply to source text and query text, independently of LambdaDB’s request and document byte limits. LambdaDB sends source strings to the provider without automatic chunking or truncation. Split long documents into separate records with stable chunk IDs before writing them, and count tokens using the selected model’s tokenizer. When writing many long records, use smaller upsert or update batches to stay within the provider’s combined token limit.
Image inputs
Image sources are available with Cohere models. Each value is either a public HTTPS URL that LambdaDB downloads, or a data URI with base64 content, such asdata:image/png;base64,.... Supported formats are PNG, JPEG, GIF, and WebP. Images are downloaded and decoded while the write or query is prepared; they are not stored by LambdaDB, and the document keeps the original URL or data URI.
See embedding limits for the allowed number of parts and images, decoded image bytes, and pixel count.
A failed download, an unsupported or mismatched format, or an input over these limits returns HTTP 400.
Failed embedding generation
Embedding generation completes before a write is submitted for indexing. If generation fails for any document or native field, the write request fails without submitting its documents; it does not store a partially embedded batch. Successful embedding calls can still consume inference usage if a later call in the same request fails.
Native embeddings have no
returnOriginal fallback. The reranking failure policy applies only to the reranking stage; it cannot bypass query embedding failures. For an overall request timeout or an unknown write outcome, verify the resulting state before retrying.
Query behavior
Aknn query on a native embedding vector field takes exactly one of:
queryText: text that LambdaDB embeds with the field’s modelqueryInputs: ordered parts, each{ "type": "text" | "image", "value": "..." }; Cohere fields accept mixed text and image parts, OpenAI fields accept one text partqueryVector: a vector you computed yourself, which skips inference