Skip to content

A Global Function lets you write a set of analytical operations once and run them many times with different objects as inputs — without rewriting the logic each time. It supports inputs and outputs of any type (DataFrames, dictionaries, plain Python values, and more) and does not require a predefined input/output schema.

Because it is registered centrally, the same function can be called across the platform — inside GenAI Studio, Reports, Simulation Data Sources, or even other Global Functions — which is what makes it the platform’s primary unit of reuse.

Global Function anatomy: inputs of any type flow into reusable logic that returns an output of any type, and the same function is reused across GenAI Studio, Reports, Simulation Data Sources, and other Global Functions.

Write the logic once; call it with different inputs from anywhere on the platform.

Consider mask_card, a small utility that redacts card numbers in free text — keeping only the last four digits. It is the kind of operation many objects need: the card-replacement assistant calls it before logging a conversation, a RAG calls it to sanitise retrieved passages, and a compliance Report calls it on its output. Register it once, and all three reuse the same audited logic.

PartWhat it holdsRequired?
Definition / codeThe Python that performs the operation and returns a result.required
Input ArgumentsEach input the logic operates on, with its Alias, Type, optional flag, and default value.Optional
Output TypeThe data type the function returns.Optional — see note below
ResourcesOther registered Global Functions the logic can call.Optional
PropertiesDescription, Group, Approval Workflow.Mostly required
AttributesAlias — the Python variable name other objects call this function by.required

Once registered, a Global Function is available anywhere logic runs on the platform:

GenAI Studio

Call it from a Pipeline, Model, or RAG as a registered Resource — shared pre/post-processing, formatting, or scoring helpers.

Reports

Reuse the same logic when writing Reports, so report calculations match what runs in production.

Simulation Data Sources

Prepare or transform the data that feeds a bulk simulation.

Other Global Functions

Compose functions — a Global Function can call other registered Global Functions.

The Global Function Registry is the central place where every registered utility lives, organised into customisable groups for easier tracking, monitoring, and creation.

Click Create on the registry page, then work through the form:

  1. Name, Properties, and Attributes. Give the function a clear name and description. Set the Group and Approval Workflow under Properties, and the Output Type (optional) and Alias under Attributes.

  2. Input Arguments. Define each argument with its Alias, Type, optional flag, and default value.

  3. Resources. Select any other registered Global Functions the logic should be able to call.

  4. Definition source. Write the Python that performs the operation and returns the result. Use Test Code to run it against sample inputs before saving.

  5. Additional Information. Add notes or attach supporting documentation.

  6. Save. Click Save to register. The function is saved as a Draft until it goes through approval.

This fills in every field for the mask_card utility introduced above.

Page fields for mask_card
FieldValue
Description”Redacts card numbers in free text, keeping only the last four digits. Reusable across pipelines, RAGs, and reports for safe logging and display.”
Aliasmask_card
Output Typestr
Input Argumentstext (str, required)
Resources
mask_card — definition source
import re
# Replace any 13–16 digit sequence with •••• and its last four digits
def _mask(match):
digits = re.sub(r"\D", "", match.group())
return "•••• " + digits[-4:]
return re.sub(r"\b(?:\d[ -]?){13,16}\b", _mask, text)

While writing the definition, click Test Code at the bottom of the editor to run the function against sample inputs without saving — confirm it returns what you expect and that the return value matches the declared Output Type (if you set one). Because functions are composed into other objects, they also get exercised end-to-end whenever a pipeline, RAG, or report that uses them is run or simulated.

Registering a Global Function — rather than copy-pasting a helper into every script — is what turns it into a governed, reusable asset:

CapabilityWhat you get
ReusabilityCall the same logic across pipelines, models, RAGs, reports, and simulations, with visibility through Lineage Tracking.
Change trackingAutomatic recording of modifications with efficient version upgrades.
Auditable path to productionA transparent, fully auditable journey from Draft through Approval to downstream use.
Better collaborationA shared base for continuous building and testing across teams.