Skip to main content

βž• Create

An AI Pipeline is defined in a simple YAML file.

Check out different AI Pipeline examples.

Basic Example​

A basic text generation AI Pipeline that uses the default Prompt Template, has a predefined System Prompt (instructs the AI Model on how to generally act) and connects to the default built-in Text AI Model (LLM)

kind: floom/pipeline/1.2

pipeline:
name: my-first-pipeline

prompt:
template:
package: floom/prompt/template/default
system: "You are a nice assistant"

You can learn more about AI Pipeline objects.

Save this pipeline configuration YAML to 'my-first-pipeline.yml'.

Production Example​

A robust production AI Pipeline scenario, including Plugins: Caching, Cost Management, Prompt Validation and Response Validation executed on OpenAI GPT-3.5.

The AI Pipeline incorporates the "tutorial.pdf" file as Context (RAG). Consequently, the AI Model will be equipped with the knowledge contained in "tutorial.pdf".

kind: 'floom/pipeline/1.2'

pipeline:
name: my-first-pipeline

# Use 🧠 OpenAI-GPT 3.5
model:
- package: floom/model/connectors/openai
model: gpt-3.5
api-key: sk-1234567890abcdefg=

prompt:
template:
package: floom/prompt/templates/default
system: "You are helpful assistant"

# πŸ“„ tutorial.pdf as context
context:
- package: floom/prompt/context/pdf
path: /etc/tutorial.pdf

# ❌ Filter Profanity
validation:
- package: floom/plugins/bad-words-filter
disallow: ['profanity']

response:
# βœ”οΈ Response should be 3 sentences max, in English (US)
format:
- package: floom/response/formatter
type: text
language: en-us
max-sentences: 3

# ❌ Filter Profanity & Negativity
validation:
- package: floom/plugins/bad-words-filter
disallow: ['profanity', 'negativity']
language: en-us

global:
# πŸ’΅ Cost limit
- package: floom/plugins/cost-management
limits:
user:
- day: 1000 # max tokens per day
pipeline:
- month: 600000 # max tokens per month

# ⚑Caching
- package: floom/plugins/cache
cache-type: memory