Skip to content
Tutorials

Getting Started with NeuralFlow: Your First AI Pipeline

Build your first AI-powered sentiment analysis pipeline with NeuralFlow in under 10 minutes.

FN 1 min read
Getting Started with NeuralFlow: Your First AI Pipeline

In this tutorial, you'll build your first AI pipeline with NeuralFlow in under 10 minutes. We'll create a sentiment analysis pipeline that processes customer reviews and returns structured results.

Prerequisites

  • A NeuralFlow account (sign up free)
  • Python 3.9+ installed
  • Basic Python knowledge

Step 1: Install the SDK

pip install neuralflow

Step 2: Create Your Pipeline


from neuralflow import Pipeline, TextInput, GPT4, JsonOutput

# Initialize the client
nf = Pipeline.connect(api_key="your-api-key")

# Define the pipeline
pipeline = nf.create(
    name="review-sentiment",
    input=TextInput(description="Customer review text"),
    model=GPT4(
        system_prompt="Analyze the sentiment of the following review. "
                      "Return JSON with 'sentiment' (positive/negative/neutral), "
                      "'confidence' (0-1), and 'key_phrases' (list of strings)."
    ),
    output=JsonOutput()
)
    

Step 3: Run Your Pipeline


result = pipeline.run(
    input="The product quality is excellent and shipping was fast. "
          "However, the packaging could be improved."
)

print(result)
# {
#   "sentiment": "positive",
#   "confidence": 0.85,
#   "key_phrases": ["excellent quality", "fast shipping", "packaging improvement"]
# }
    

Step 4: Deploy to Production

nf deploy review-sentiment --env production

That's it! Your pipeline is now running in production with automatic scaling, monitoring, and logging. Check the documentation for advanced features like batching, webhooks, and custom models.

Next Steps