Skip to content

A pipeline is how you turn individual building blocks into a working GenAI application in Corridor. It wires reusable components — Models, RAGs, Prompts, Guardrails, and even other pipelines — together with a piece of orchestration code, then takes an input, runs it through that logic, and returns a generated or predicted output.

Consider an IVR (Interactive Voice Response) assistant that automates customer support calls. Rather than building it as one large block of logic, you compose it from two smaller, reusable sub-pipelines.

Flow of an IVR pipeline: a caller message passes through Intent Classification then Response Generation to produce a spoken reply.

The IVR pipeline orchestrates two reusable sub-pipelines in sequence.

The IVR pipeline simply orchestrates the two in order:

  1. The caller’s message arrives.
  2. Intent Classification labels the intent.
  3. Response Generation uses that intent to produce the final reply.

Because each sub-pipeline is registered on its own, you can reuse it elsewhere — the same Intent Classification sub-pipeline could power a chat widget or an email-triage tool.

Every pipeline in GGX is one of three types. Choosing the right one is the first real decision you make when registering — it determines how the pipeline handles memory and what shape its output takes.

Stateful Best for conversations, assistants, and multi-turn support.

  • Keeps history and context across turns
  • Stays aware of an ongoing conversation
  • Output is fixed: {"output": ..., "context": ...}

Example: a support chatbot that recalls earlier messages.

Regardless of type, every pipeline has the same three-part shape: it receives inputs, runs scoring logic that draws on registered resources, and returns an output.

Pipeline anatomy: an input flows into scoring logic, which draws on registered resources, and returns an output.

Inputs flow into scoring logic, which calls on registered resources to produce an output.

The Pipeline Registry is the central place where all registered pipelines live, organized into customizable groups. From here you can track, monitor, test, and create pipelines. There are two ways to add one:

Create from scratch

Build the logic directly in GGX with the Python Function Editor. A transparent, white-box approach: every component is registered inside GGX and stitched together, so each can be independently tested, validated, and debugged.

Connect an external agent

Integrate a pipeline already running elsewhere through its API. A black-box approach where the agent’s internals are abstracted away and interaction is limited to invoking it and consuming its outputs.

Click Create on the Pipeline Registry page, then work through the registration form:

  1. Name and description. Give the pipeline a clear name, then a plain-English description of what it does, when to use it, and when not to — it is what teammates read when deciding whether to reuse it. Under Add Additional Details, set the Group, Permissible Purpose, and metadata like Usecase Type and Task Type.

  2. Alias. required A code-safe variable name other pipelines use to refer to this one — lowercase with underscores, no spaces. For our running example: card_assistant.

  3. Input type. Choose how the logic is supplied:

    • Python Function — write the logic in the Scoring Logic editor on this page.
    • External Agent — connect to an agent built elsewhere.
  4. Pipeline, interaction, and context type. These three move together:

    • Pipeline Type — pick Chat-Based, Free-Flow, or Classification.
    • Interaction Type — set automatically from Pipeline Type; for chat it is TypedDict[{'role': str, 'content': str}].
    • Context Type — required for chat pipelines; the data type of the context carried between turns, e.g. dict[str, str].
  5. Config, resources, and model file. Attach what the logic needs:

    • Add Config — input arguments or configuration values, each with a type and default.
    • Add Resources — registered Models, Prompts, RAGs, Global Functions, Guardrails, or pipelines.
    • Add Pipeline Model File — a custom model or supporting file, if required.
  6. Write the scoring logic. In the editor, write the Python that ties everything together and returns the result. Use Format Code to tidy it and Test Code to run it against sample input before saving.

  7. Finish registration. Optionally add starting examples for human-in-the-loop testing and notes under Additional Information, then click Create. The pipeline is saved as a Draft until promoted.

When you write scoring logic for a chat pipeline, several variables are provided automatically — you do not need to declare them.

VariableTypeWhat it holds
user_messagestrThe current message from the user.
historylist[TypedDict[{'role': str, 'content': str}]]All previous messages, in standard OpenAI format.
contextyour Context TypeInformation carried over from earlier turns.
cachedictA store for intermediate, reusable objects so expensive work is not repeated. One cache per pipeline, shared across all executions.

Once a pipeline is created, validate its behaviour before relying on it. There are three ways to test, in increasing order of thoroughness.

Three escalating test levels: Quick Test, Interactive Test, and Bulk Simulation, in increasing order of thoroughness.

From a quick sanity check on one input to a full run over an entire dataset.

A fast sanity check while you are still writing the logic; it runs the code without saving.

  1. While creating or editing the pipeline, scroll to the Code section.
  2. Click Test Code in the bottom-right corner of the editor.
  3. Enter sample inputs and confirm the logic returns what you expect.

Interactive Test — feedbacks after initial version is created

Section titled “Interactive Test — feedbacks after initial version is created”

Once saved, test the pipeline the way an end user would experience it.

  1. Navigate to your saved pipeline.
  2. Click Run → Chat Session in the top-right corner.
  3. Enter sample messages to walk through the full conversation flow.
  4. Confirm the outputs match the expected behaviour.

Bulk Simulation — validation at scale before for approvals

Section titled “Bulk Simulation — validation at scale before for approvals”

A single input tells you the pipeline works; a bulk simulation tells you how it behaves across many real cases. It runs every row of a dataset through the pipeline, producing one output per record. Use it to:

  • Spot edge cases and inconsistent outputs a single test would miss.
  • Measure quality across a representative dataset before promoting.
  • Attach the run as evidence in the pipeline’s Risk Assessment tab.

A complete example: a card replacement assistant

Section titled “A complete example: a card replacement assistant”

This example fills in every field for a realistic chat-based pipeline that helps customers replace a lost card.

Page fields for card_assistant
FieldValue
Description”Conversational assistant that helps a customer report a lost card and request a replacement. Use for card-servicing chats; not for fraud disputes.”
Aliascard_assistant
Input TypePython Function
Pipeline TypeChat Based Pipeline
Context Typedict[str, str]
Resourceskb (a RAG over the card-policy knowledge base), reply_prompt (a Prompt), chat_model (an LLM)
card_assistant — scoring logic
# Retrieve relevant card-policy passages for the user's message
docs = kb.search(user_message, top_k=3) # (1)!
# Fill the prompt with the retrieved policy and the conversation so far
filled_prompt = reply_prompt(
user_message=user_message,
history=history,
policy_docs=docs,
)
# Generate the reply
reply = chat_model(filled_prompt)
# Track where we are in the flow so the next turn knows the
# customer has already confirmed the card was lost
updated_context = dict(context)
updated_context["stage"] = "replacement_offered" # (2)!
return {"output": reply, "context": updated_context} # (3)!
  1. kb, reply_prompt, and chat_model are Resources added in Step 5. user_message and history are provided automatically.
  2. On the next turn, context["stage"] is available again — so the pipeline knows not to ask “did you lose your card?” twice.
  3. Chat pipelines must return this exact {"output", "context"} shape.

If a pipeline already runs in another environment, connect it to GGX instead of rebuilding it. On the New Pipeline page, set Input Type to External Agent and provide the agent’s API connection.

For example, an agent built in Vertex AI Agent Playbooks can be connected through its API. Integrations for common providers — Vertex AI Agent Playbooks, AgentForce, Microsoft Copilot Studio, Vapi AI, and others — are configured in the Integration Module, and new providers can be added by extending the framework.

Browse available integrations

Each pipeline has a dedicated Risk Assessment tab for documenting its assumptions, risks, and mitigations. Risks are recorded across several dimensions, and you can attach simulations as evidence of the testing performed.

These are example dimensions — the set is configurable and can be auto-detected from a pipeline’s configuration:

DimensionWhat it captures
AccuracyHow reliably the pipeline produces correct results.
StabilityHow consistently it behaves across inputs and over time.
EthicsFairness, bias, and responsible-use considerations.
VulnerabilityExposure to misuse, adversarial input, or failure modes.

Registering a pipeline — rather than running a loose script — is what turns it into a governed, reusable asset:

CapabilityWhat you get
Change trackingAutomatic recording of modifications, with efficient version upgrades.
Purpose enforcementAutomatic detection of Permissible Purpose violations.
Testing & comparisonEvaluate against other pipelines using custom and standardized validation kits.
ReusabilityReuse across downstream applications, with visibility through Lineage Tracking.
Auditable path to productionA transparent, fully auditable journey with easier production monitoring.
Human Integrated TestingFeedback logging and human-in-the-loop testing for chat-based pipelines.
Executable artifactsExtract ready-to-productionize artifacts straight from the Registry.
Better collaborationA shared base for continuous development and testing.