Skip to content
Talk to our solutions team

AI library

Model operations. Bound by AI Flow on top of the common library.

Every model call goes through the AI Gateway, so an atom here names an alias rather than a provider. Which model that resolves to, what it costs and whether it is cached are configuration, not flow text — which is what lets a flow outlive the model it was written against.

OperationFlow taskScript functions
Chat completionchat:llm.chat, llm.completepipeline-only
Intent detectiongetintent:intent.classifypipeline-only
Guardrailspre-guard:, post-guard:guard.checkpipeline-only

pre-guard: and post-guard: are the same atom in two positions — before the model sees input, and after it produces output. Both are worth having: an input guard stops what should never reach a model, an output guard stops what should never reach a user.

OperationFlow taskScript functions
Embeddingsembed:, embeddata:embed.generatepipeline-only
Chunk textembed.splitcallable anywhere
Vector upsertvector-upsert:vector.upsertcallable anywhere
Vector searchvector-search:vector.searchcallable anywhere
Vector deletevector-delete:vector.deletecallable anywhere
Vector listvector-list:vector.listcallable anywhere
Collectionstopicsinsert:, topicsquery:, topicssearch:, topicslist:, topicsdelete:milvus.insert, .query, .search, .list, .deletepipeline-only

embed.split chunks text before embedding it. Chunking is where retrieval quality is usually won or lost, so it is a separate call rather than a hidden step inside generate.

OperationFlow taskScript functions
Ingest a corpusrag-ingest:rag.ingestcallable anywhere
Answer from a corpusrag-answer:rag.answercallable anywhere
Rerank resultsrerank:rag.rerankcallable anywhere

Reranking is the cheapest quality improvement available to a retrieval pipeline: retrieve broadly, then rerank to precision. It is a separate atom because the two steps want different models.

OperationFlow taskScript functions
Tree of thoughttot:reason.totcallable anywhere
Reflexionreflexion:reason.reflexioncallable anywhere

Both are multi-step patterns with a cost profile to match — they call a model repeatedly by design. Use them where a single call demonstrably is not enough, and put a budget on them. In a flow that means a harness rather than a plain flow.

OperationFlow taskScript functions
Scrape a sourcescrape:, scrapedata:scrape.web, .pdf, .excel, .docx, .pptxpipeline-only
Split into sentencestosentence:text.tosentencepipeline-only
Split on a delimitertext.splitcallable anywhere
Validate JSONvalidate-json:validate.jsoncallable anywhere
Validate YAMLvalidate-yaml:validate.yamlcallable anywhere

validate-json: earns its place next to a model call. A model asked for JSON usually produces JSON; validating rather than assuming is the difference between a flow that fails at the validation node and one that fails three nodes later with something unhelpful. Both validators require a schema — validating against nothing is just a parse.

OperationFlow taskScript functions
Pipeline chatmlpipelinechat:, mlpipechat:pipeline.chatpipeline-only
Pipeline requestmlpipelinerequest:, mlpiperequest:pipeline.requestpipeline-only
Pipeline responsemlpipelineresponse:, mlpiperesponse:pipeline.responsepipeline-only

These are the innermost surface: they act on the pipe and the record currently in flight, so they only mean anything inside a running pipeline.

AI Flow also binds the streaming forms of the pipeline operations, so a flow can read a source and feed it to a model without changing engine: readcsv:, readdb:, readexcel:, readparquet:, readrest:, readstdout:, streamrest:, streamplugin:, streamprint:, aggsum:, sum:, sumstr:, replicate:, writecsv:, writedb:, writeexcel:, writeparquet:, noop:.

For bulk movement with no model involved, use Datapipes instead — it is built for the record stream and does not carry the rest of this library.