Skip to content
Notifications
Clear all

Just hit my first 1000 workflow runs - here's my actual spend vs. what I budgeted

1 Posts
1 Users
0 Reactions
3 Views
(@emilyr)
Estimable Member
Joined: 1 week ago
Posts: 92
Topic starter   [#5892]

Having meticulously planned a Proof of Concept for a new customer-facing analytics feature, I allocated a budget of $300 for infrastructure and API costs, with a significant portion earmarked for Relevance AI's workflow execution. The goal was to process approximately 1000 workflow runs, ingesting, structuring, and enriching user feedback data. Now that the milestone has been reached, a detailed post-mortem of the actual expenditure versus forecast is warranted.

**Initial Budget Assumptions:**
* **Estimated Workflow Runs:** 1,000
* **Average Complexity:** Medium (involving a text chunker, LLM node for summarization, and a classification node)
* **Planned Cost per Run:** ~$0.25 (based on published pricing for `gpt-3.5-turbo` and `text-embedding-3-small` nodes)
* **Total Budgeted for Relevance AI:** $250
* **Contingency Buffer:** $50

**Actual Performance Data (from Relevance AI Dashboard & Billing Export):**
* **Total Workflow Runs:** 1,027
* **Total Cost Incurred:** $217.83
* **Average Cost per Run:** $0.212
* **Most Expensive Node Type:** LLM Node (specifically `gpt-4o-mini` used in 30% of runs for higher-stakes categorization)
* **Most Cost-Effective Node Type:** Relevance AI's native chunker and router nodes.

The variance of -$32.17 (12.9% under budget) is analytically significant. The primary drivers for this favorable variance were:

* **Optimized Node Selection:** The initial prototype used `gpt-4` for all LLM tasks. By switching the bulk of summarization to `gpt-3.5-turbo` and only routing ambiguous cases to a more powerful model via a conditional logic node, we reduced the per-run LLM cost by an average of 60% for those runs.
* **Efficient Prompt Design:** Iterative prompt engineering reduced token consumption per run by approximately 15%. Specifically, we implemented strict output formatting instructions and provided clearer examples, which reduced the number of "retry" cycles and truncated unnecessary verbose outputs.
* **Unexpected Benefit of Caching:** Relevance AI's built-in caching for deterministic node outputs (like embeddings and some classifications) became effective after ~300 runs, as user feedback began to show repetition. This is visible in the cost-per-run metric, which shows a noticeable step-down after that point.

**Raw Data Sample from Billing Analysis:**
```json
{
"period": "2024-10",
"breakdown": [
{
"node_type": "llm",
"model": "gpt-3.5-turbo",
"estimated_input_tokens": 4521000,
"estimated_cost": 112.65
},
{
"node_type": "llm",
"model": "gpt-4o-mini",
"estimated_input_tokens": 1230000,
"estimated_cost": 61.50
},
{
"node_type": "embedding",
"model": "text-embedding-3-small",
"requests": 1027,
"estimated_cost": 0.26
},
{
"node_type": "relevance_native",
"operations": 4108,
"estimated_cost": 43.42
}
]
}
```

**Key Takeaways and Pitfalls to Monitor:**
* **Model Choice is the Primary Cost Lever:** The difference between `gpt-3.5-turbo` and `gpt-4` for high-volume tasks is not linear; it's exponential. A/B testing node performance is crucial before scaling.
* **Cost Attribution is Granular:** The billing breakdown is sufficiently detailed to attribute costs to specific workflow stages, enabling precise optimization.
* **The "Sandbox" is Critical:** Running 50-100 sample runs with realistic data *before* full-scale deployment is non-negotiable for forecasting. Our initial prototype's cost was 3x higher than the final optimized version.
* **Hidden Cost:** While not a direct Relevance AI charge, the engineering time spent on optimization must be factored into the total project cost. However, the return on that investment is clear at scale.

This exercise confirms that with a disciplined, metrics-driven approach, Relevance AI's consumption model can be accurately forecasted and controlled. The next phase will involve scaling to 10,000 runs, where we will implement more aggressive caching strategies and explore tiered pricing.



   
Quote