## Input Data

The input data should be separated into 5 different datasets. The datasets **Engagement_history** and **KPI_metrics** must cover the **same period and have the same time frequency**. This solution showcases an example using synthesised data covering a period of 12 months. It is recommended to use data spanning 18–24 months for implementation.

1. [HCP Master](dataset:HCP_master): Core HCP attributes for segmentation and modeling
   
   Key Fields:
   - `hcp_id` (unique identifier)
   - `first_name`, `last_name`
   - `specialty` (e.g., Cardiology, Dermatology, Oncology), `practice_type`
   - `location` (territory, region, zip code), `territory`
   - `segment` (e.g., Tier 1/2/3, Advocate, Target, Monitor)
   - `channel_preference` (e.g., prefers_email, do_not_call flags), `account_tenure`

2. [Engagement History](dataset:Engagement_history): Historical record of all HCP contact attempts and outcomes
  
  Key Fields:
   - `hcp_id`, `engagement_date`, `channel_type` (rep_visit, phone_call, email, webinar, digital_ad)
   - `successful_engagement` (pre-existing binary 0/1 flag indicating meaningful engagement after a touch): **Rep visit:** logged and completed, **Phone call:** connected, minimum duration, **Email:** opened or clicked within X days, **Webinar:** registered and attended, **Digital ad:** impression + click
   - **Granularity**: One row per contact attempt (successful or not)
   - **Time Scope**: Typically 12–24 months of history for feature engineering

3. [KPI Metrics (Rx Data)](dataset:KPI_metrics): Measure HCP commercial value via prescription volume
   
   Key Fields:
   - `hcp_id`, `week` (week of year, aligned with engagement cycles), `prescriptions_written` (count of Rxs for target brand or therapeutic class)
   - Transformation to **HCP_value**:
     - Aggregate Rx over reference period (e.g., last 12 months)
     - Compute quantiles across all HCPs
     - Map to discrete scale (1: lowest value — 5: highest value HCP)
   - **Note**: Rx is one possible KPI; alternatives include patient volume, brand loyalty score, or strategic importance tier

4. [Engagement Action Catalog](dataset:Engagement_action_catalog): Define available channels and their business parameters
   - `channel_type` (rep_visit, phone_call, email, webinar, digital_ad), `channel_cpa` (cost per action/engagement in $USD)
   - `channel_uplift` (impact factor: relative effectiveness per successful engagement, fractional Rx lift on success). Example: rep_visit=0.18, phone_call=0.09, email=0.04, webinar=0.12, digital_ad=0.02. 
Coefficients for these metrics static in this build; in production estimated via SME knowledge, matched-control analysis or holdout testing. 

## Compliance Knowledge Base

A Dataiku [folder](managed_folder:AZdX72V7) containing reference documents ingested into a vector store and made searchable via the NBA Action Assistant's `pharma_doc_KB` tool. The knowledge base enables the agent to answer compliance and product questions grounded in company policy - without hallucinating rules or clinical data.

The folder contains two documents:

**1. HCP Promotional Communication Policy**
Governs all promotional communications directed at HCPs across all channels and applies to both human-authored and AI-generated content. Key sections:
- Approved indication and MLR-reviewed efficacy claims
- Required fair balance and Important Safety Information language
- Prohibited content and language (off-label promotion, superiority claims, 
  causal language without evidence)
- Channel-specific rules (email consent and opt-out, rep visit documentation, 
  phone call hours, webinar MLR timelines)
- MLR review requirements and turnaround times by content type
- Contact frequency limits and consent rules
- Adverse event reporting obligations

**2. Product Portfolio Reference Guide**
Covers the key promoted products across each target specialty. For each product the document includes the approved indication, Phase III trial efficacy data and key claims, required safety information and contraindications, and dosing guidance. The agent uses this document to ground outreach drafts and rep call scripts in approved clinical content, and to answer questions such as "what data can I share with a cardiologist?" or "what are the approved claims for this product?"

**Note**: Both documents are fictional and created for demonstration purposes. In a production deployment, replace these with the client's actual approved policy and product documentation before ingesting into the knowledge base.