Function Types
Function Types Overview
Understanding the different types of functions available in bem
Hand off to an LLM
Functions are the core building blocks for data processing in bem. Each function type serves a specific purpose and has its own configuration requirements.
If you're coming from V1/V2 and looking for transform, analyze, or route, see V3 migration. Those types remain readable and callable; new functions should be created as extract or classify.
Available Function Types
| Type | Purpose | Key Use Case |
|---|---|---|
| Extract | Pull structured JSON out of documents, images, and media against a schema | Invoice processing, form extraction, receipt scanning, visual analysis |
| Classify | Direct inputs down labeled paths based on content | Document classification, workflow branching |
| Split | Break multi-page documents into pieces | Multi-document PDFs, batch processing |
| Join | Combine multiple inputs into one output | Data aggregation, multi-source merging |
| Enrich | Semantic search against collections | Knowledge base lookup, context enrichment |
| Parse | Render documents into a navigable structure of sections, entities, and relationships | LLM-agent retrieval over a corpus, cross-document memory, RAG-free Q&A |
| Payload Shaping | Translate JSON data with JMESPath expressions | Data mapping, format conversion |
| Send | Deliver workflow outputs to a webhook, S3 bucket, or Google Drive folder | Push to downstream APIs, mirror outputs to a data lake |
Common Configuration
All function types share these base fields:
| Field | Type | Required | Description |
|---|---|---|---|
functionName | string | Yes | Unique identifier for the function (per environment) |
type | string | Yes | The function type (e.g., "extract", "classify") |
displayName | string | No | Human-readable name for display in the UI |
tags | string[] | No | Tags for categorizing and organizing functions |
Choosing the Right Function Type
- Need to pull structured data out of a document, image, or media file? Use an Extract Function
- Need to classify inputs and route them down different paths? Use a Classify Function
- Have multi-document files to break apart? Use a Split Function
- Need to combine multiple outputs? Use a Join Function
- Need to add context from a knowledge base? Use an Enrich Function
- Want LLM agents to navigate a corpus by sections and entities instead of fixed fields? Use a Parse Function
- Want to reshape JSON without AI processing? Use a Payload Shaping Function
- Want to deliver workflow outputs to a webhook, S3 bucket, or Google Drive folder? Use a Send Function