## Project Variables

Business constraints and optimization parameters are configured as [Dataiku project variables](https://knowledge.dataiku.com/latest/automate-tasks/variables/concept-introduction-syntax.html) rather than a dataset. This allows commercial excellence teams to adjust parameters between cycles without modifying any recipe or dataset. Variables are accessible via the project Variables panel and are read at runtime by the optimization recipe.

![Screenshot 2026-05-06 at 2.53.08 PM.png](xgsVPxjQRMpw)

### LLM & Infrastructure Variables

The project also uses centralized Dataiku project variables for GenAI orchestration, embedding configuration, and infrastructure connections. These variables allow model switching without modifying recipes, agents, semantic models, or knowledge banks directly.

| Variable | Type | Value | Description |
|---|---|---|---|
| `embedding_model` | string | `openai:bs-llm-connection:text-embedding-3-small` | Default embedding model used by semantic models and knowledge banks |
| `reasoning_llm` | string | `openai:bs-llm-connection:gpt-4o-mini` | Primary reasoning and completion LLM used by agents, SQL tools, and GenAI prompt recipes |
| `light_llm` | string | `openai:bs-llm-connection:gpt-4o-mini` | Lightweight/default LLM used for lower-cost inference workloads |
| `main_connection` | string | `filesystem_managed` | Default managed filesystem connection used across project components |

These variables are consumed programmatically to dynamically update:
- Visual Agents
- Visual Agent SQL tools
- Semantic Models
- Knowledge Banks
- GenAI Prompt Recipes
- Embed Document Recipes

### Baseline Optimization Variables

| Variable | Type | Example | Description |
|---|---|---|---|
| `budget_field_per_period` | float | 17000 | Weekly budget for field channels (rep visits + phone calls) in $USD |
| `budget_media_per_period` | float | 3000 | Weekly budget for media channels (webinars + digital ads + email) in $USD |
| `max_total_actions_per_period` | integer | 420 | Hard cap on total actions selected across all channels |
| `max_contacts_per_hcp_per_period` | integer | 1 | Maximum actions per HCP per cycle |
| `max_rep_visits_per_period` | integer | 80 | Rep visit cap — reflects field force headcount |
| `max_phone_calls_per_period` | integer | 100 | Phone call cap — inside sales or MSL capacity |
| `max_webinars_per_period` | integer | 40 | Webinar seat allocation across scheduled events |
| `max_digital_ads_per_period` | integer | 60 | Programmatic HCP-level activations |
| `max_emails_per_period` | integer | 300 | Email cap — opted-in HCPs only |
| `min_digital_ads_per_period` | integer | 15 | Minimum digital floor to maintain brand presence |

### What-If Scenario Variables

A parallel set of variables prefixed with `_whatif` drives the what-if optimization recipe independently of the baseline. These are set via the What-If Scenario webapp and trigger the `WHATIFOPTIMIZATION` scenario.

| Variable | Type | Example | Description |
|---|---|---|---|
| `budget_field_per_period_whatif` | float | 20000 | What-if field budget |
| `budget_media_per_period_whatif` | float | 5000 | What-if media budget |
| `max_total_actions_per_period_whatif` | integer | 420 | What-if total action cap |
| `max_contacts_per_hcp_per_period_whatif` | integer | 1 | What-if HCP contact limit |
| `max_rep_visits_per_period_whatif` | integer | 100 | What-if rep visit cap |
| `max_phone_calls_per_period_whatif` | integer | 120 | What-if phone call cap |
| `max_webinars_per_period_whatif` | integer | 50 | What-if webinar cap |
| `max_digital_ads_per_period_whatif` | integer | 80 | What-if digital ad cap |
| `max_emails_per_period_whatif` | integer | 350 | What-if email cap |
| `min_digital_ads_per_period_whatif` | integer | 10 | What-if digital floor |

**Note**: The what-if variables default to the baseline values if not explicitly set, ensuring the what-if scenario always has a valid starting point even before the first webapp interaction.