Vectors
Search your data by meaning and keyword.
Declare semantic and full-text indexes in your schema. Napalm embeds new and updated rows in the background, and every scan checks your access rules.
Read the search docsVector indexes
A vector index is one schema declaration.
Declare ext::ai::index on a text property or expression. Writes return as soon as the transaction commits, and Napalm embeds new and updated rows in the background through managed models or your own provider key.
Vector and hybrid searchusing extension ai; type Note { required title: str; required body: str; required author: ext::auth::Identity; deferred index ext::ai::index( embedding_model := 'text-embedding-3-small' ) on (.title ++ '\n\n' ++ .body); index fts::index on ( fts::with_options(.title ++ ' ' ++ .body, language := fts::Language.eng) ); access policy author_can_read allow select using (.author ?= global caller);}Access during the scan
Search checks access during the scan.
Standalone vector stores fetch global nearest neighbors first and strip forbidden rows afterward, so a top-10 query can return 0 results. Napalm checks access during candidate scoring, computes exact distances on small sets and drops unshared rows on the same commit.
curl https://notes.napalmdata.com/search \ -H "Authorization: Bearer $SESSION" \ -H "Content-Type: application/json" \ -d { "type": "Note", "query": "launch timeline and milestones", "limit": 5 }Large indexes
Indexes grow past 100 million vectors.
Embeddings live in a managed vector store reached through each record. An index grows past 100 million vectors without filling database memory or changing your schema.
100M+vectors per index without a schema change
Hybrid search
Combine keyword and vector search in one query.
Declare fts::index and ext::ai::index on the same type. ext::ai::hybrid_search blends keyword matches on SKUs, identifiers and error codes alongside semantic similarity through reciprocal rank fusion.
Vector and hybrid searchwith hits := ( select ext::ai::hybrid_search(Note, <str>$query, language := 'eng') order by .score desc limit 5)select hits.object { id, title, body }Model upgrades
New embedding models build in the background.
Change embedding_model in your schema and run napalm schema push. Napalm builds the new index in the background while the current index answers searches, then switches over in one step.
napalm schema push notesnapalm models notesModel providers
Use managed models or your own provider key.
Use Napalm’s managed embedding and Ask models under a monthly spend cap, or bring your own OpenAI or Anthropic key. Napalm adds no token markup on your own key.
napalm models notes --add openai --secret-stdin < openai.keynapalm models notes