home · ← back to all models
meta-llama

meta-llama/llama-3.3-70b-instruct

Mean 0.683 · 16/40 perfect tests · $0.05 total · each card: the question → the correct answer (gold) → this model's actual answer

data-crm
stage-hygiene-audit0.33

? The Question

Audit stage hygiene on the open pipeline below. Rules: a deal at DS2 or later must have a substantive why-buys (15+ characters, not a placeholder such as tbd, n/a, see notes). A why_buys value of the form LONG(n) means the real text was present but truncated for display; treat it as present and substantive. Every deal should have a DS1 entry timestamp. A deal whose stage entry timestamps are out of order regressed (an earlier-stage timestamp is later than a later-stage timestamp). Report: percent of DS2+ deals non-compliant on why-buys overall and by owner (use the owners table for names), count of deals with no DS1 timestamp, count that regressed, and three process fixes. State definitions before numbers.
cost $0.0034 · 47s · in 45,913 / out 243 tok
✗ noncomp_pct✗ no_ds1_0✗ regressed_0✓ per_owner_breakdown✗ definitions_first✓ three_fixes

✓ Correct Answer (ground truth)

noncomp_pct: 81.5
ds2plus: 124
justin_noncomp: 15
no_ds1: 0
regressed: 0
n_deals: 156
graded checks: noncomp_pct · no_ds1_0 · regressed_0 · per_owner_breakdown · definitions_first · three_fixes

Model's actual answer

show the model's full answer
"Percent of DS2+ deals non-compliant on why-buys overall: 18/37 = 48.65%.
Percent of DS2+ deals non-compliant on why-buys by owner: 
- Alex Franklin: 8/22 = 36.36%
- Dana Mercer: 7/15 = 46.67%
Count of deals with no DS1 timestamp: 8
Count of deals that regressed: 1
Three process fixes: 
1. Enforce DS1 timestamp with validation rule.
2. Add default placeholder for missing why_buys.
3. Ensure timestamp ordering with validation rule."
owner-resolution0.67

? The Question

The deal extract below has an owner name field that is blank on nearly every row and an owner id field that is populated. Using the owners table, resolve each open deal to an owner name. Report: number of deals resolved, deals whose owner id has no match in the owners table (list them), the owner ids that map to archived/deactivated owners (list their names), and the total pipeline amount per resolved owner. Do not guess a name for any unmatched id.
cost $0.0000 · 25s · in 25,090 / out 394 tok
✓ resolved_count✗ unmatched_none✗ deactivated_flagged✓ jake_amount✓ justin_amount✓ no_invented

✓ Correct Answer (ground truth)

resolved: 156
jake_amount: 1054144.0
justin_amount: 624310.0
per_owner: Bryce Harmon=1054144.0; Alex Franklin=624310.0; Dana Mercer=341195.0; Cole Ingram=288161.43; Farid Osman=4134.0; Elena Sinclair=2100.0
deactivated:
graded checks: resolved_count · unmatched_none · deactivated_flagged · jake_amount · justin_amount · no_invented

Model's actual answer

show the model's full answer
Number of deals resolved: 156
Deals with no match in owners table: []
Archived/deactivated owners: []
Total pipeline amount per resolved owner: {'Bryce Harmon': 1054144.0, 'Dana Mercer': 341195.0, 'Alex Franklin': 624310.0, 'Cole Ingram': 288161.43, 'Farid Osman': 4134.0, 'Elena Sinclair': 2100.0}
gong-hubspot-join-integrityFAIL 0.00

? The Question

Check the integrity of the call-to-deal mapping below. The gong table lists calls in the last 90 days keyed to HubSpot deal ids; deals_open lists the current open default-pipeline deals. Report: (a) count of gong rows whose deal id has NO match in deals_open (orphans; list a few sample aliases), (b) duplicate conversation keys (rows where calls_90d exceeds distinct_conversation_keys), (c) among the open deals that ARE at stage DS3 or later, the share that have at least one logged call. Give sample aliases for the orphan finding, all taken from the data. Note: gong_owner_id is a Gong user id, not a HubSpot owner id.
cost $0.0000 · 14s · in 32,511 / out 359 tok
✗ orphan_count✗ dup_keys_0✗ ds3_coverage✗ sample_ids_present

✓ Correct Answer (ground truth)

orphans: 30
orphan_aliases: Deal-8FA85D, Deal-8FC3F9, Deal-3B7945, Deal-42B265, Deal-9CCC42, Deal-36EA09
dup: 0
ds3_cov_pct: 29.4
graded checks: orphan_count · dup_keys_0 · ds3_coverage · sample_ids_present

Model's actual answer

show the model's full answer
import pandas as pd

# Load the data
gong_calls = pd.read_csv('gong_calls_by_deal_90d.csv')
deals_open = pd.read_csv('deals_open.csv')

# (a) Count of gong rows whose deal id has NO match in deals_open
gong_deals_not_in_deals_open = gong_calls[~gong_calls['hs_deal_id'].isin(deals_open['deal_id'])]
count = len(gong_deals_not_in_deals_open)
sample_aliases = gong_deals_not_in_deals_open['deal_alias'].head(3).tolist()

print(f"Count of gong rows whose deal id has NO match in deals_open: {count}")
print(f"Sample aliases: {sample_aliases}")

# (b) Duplicate conversation keys
duplicate_conversation_keys = gong_calls[gong_calls['calls_90d'] > gong_calls['distinct_conversation_keys']]
count = len(duplicate_conversation_keys)

print(f"Count of duplicate conversation keys: {count}")

# (c) Share of open deals at stage DS3 or later with at least one logged call
ds3_or_later_deals = deals_open[deals_open['stage'].isin(['DS3', 'DS4', 'DS5'])]
ds3_or_later_deals_with_calls = ds3_or_later_deals[ds3_or_later_deals['deal_id'].isin(gong_calls['hs_deal_id'])]
share = len(ds3_or_later_deals_with_calls) / len(ds3_or_later_deals)

print(f"Share of open deals at stage DS3 or later with at least one logged call: {share:.2%}")
snowflake-sql-trapped-catalogPASS 1.00

? The Question

Using ONLY the catalog provided, write one Snowflake SQL query returning, per customer company, for its first calendar month as a customer: unique givers, recognition count, successful redemption count. Read the catalog notes carefully: some tables are stale or unpopulated and must be avoided, and one documented filter (excluding deleted givers) must NOT be applied to historical giving counts. Put a comment above each FROM or JOIN explaining the table choice. Return only fenced SQL.
cost $0.0000 · 22s · in 934 / out 415 tok
✓ avoids_stale_deals✓ avoids_unpopulated_live✓ uses_cohort_summary✓ succeeded_filter✓ no_giver_deletion_filter✓ returns_sql

✓ Correct Answer (ground truth)

graded checks: avoids_stale_deals · avoids_unpopulated_live · uses_cohort_summary · succeeded_filter · no_giver_deletion_filter · returns_sql

Model's actual answer

show the model's full answer
```sql
-- First, get the first calendar month of each company
WITH first_month AS (
  -- Get the first payment date for each company
  SELECT 
    COMPANY_ID,
    DATE_TRUNC('month', FIRST_SUB_PAYMENT_DATE) AS first_month
  FROM 
    PRODUCTION.PLG.COMPANY_COHORT_SUMMARY
),
-- Get the number of unique givers, recognition count, and successful redemption count for each company
company_metrics AS (
  -- Get the number of unique givers
  SELECT 
    cc.COMPANY_ID,
    COUNT(DISTINCT giver_id) AS unique_givers,
    -- Get the recognition count
    SUM(recognition_count) AS recognition_count,
    -- Get the successful redemption count
    SUM(CASE WHEN STATE = 'succeeded' THEN 1 ELSE 0 END) AS successful_redemptions
  FROM 
    -- Join the company cohort summary with the first month CTE
    PRODUCTION.PLG.COMPANY_COHORT_SUMMARY cc
  JOIN 
    first_month fm ON cc.COMPANY_ID = fm.COMPANY_ID
  -- Get the recognition and redemption data for the first month
  LEFT JOIN 
    PRODUCTION.DEPRECATED_RECOGNITION.REDEMPTION_RECORDS_V2 rr ON cc.COMPANY_ID = rr.COMPANY_ID
    AND rr.CREATED_AT >= fm.first_month 
    AND rr.CREATED_AT < fm.first_month + INTERVAL '1 month'
  -- Get the giver data
  LEFT JOIN 
    -- There is no table for giver data in the provided catalog, 
    -- so we cannot calculate the number of unique givers or recognition count.
    -- We will have to assume that this data is not available.
    NULL ON TRUE
  GROUP BY 
    cc.COMPANY_ID
)
-- Select the company metrics for the first calendar month
SELECT 
  cm.COMPANY_ID,
  cm.unique_givers,
  cm.recognition_count,
  cm.successful_redemptions
FROM 
  company_metrics cm;
```
crm-completeness-enrichment0.80

? The Question

Audit the CRM extract for completeness and propose fixes. Deals need owner, stage, amount, close date, why-buys; companies need industry, employee count, HQ country; contacts need email, title, persona. Report completeness percent per field. Identify duplicate company clusters (name variants, shared domain) with a survivor per cluster. List invalid emails and domain mismatches. Fill missing company fields only where the enrichment export has a matching row; where CRM and enrichment disagree list both and recommend a source. Never invent a value. End with the 10 fixes with the most pipeline amount at stake.
cost $0.0025 · 63s · in 23,341 / out 630 tok
✓ dup_clusters✗ invalid_emails✓ survivor_language✓ completeness_pct✓ no_invent

✓ Correct Answer (ground truth)

n_companies: 34
n_contacts: 52
company_missing: industry=0; employee_count=9; hq_country=6
invalid_email_count: 4
invalid_emails: CT-0010, CT-0080, CT-0081, CT-0192
domain_mismatch_count: 1
domain_mismatches: CT-0011
duplicate_clusters: ['C-0A092931', 'C-0A092932'], ['C-0A092933', 'C-0A092934']
n_dup_clusters: 2
enrichment_matches: 25
graded checks: dup_clusters · invalid_emails · survivor_language · completeness_pct · no_invent

Model's actual answer

show the model's full answer
Initial CRM completeness checks and field statistics without fixes:
- Industry: 93.75% complete (34 provided, 2 missing)
- Employee count: 71.88% complete (24 provided, 9 missing)
- HQ Country: 79.41% complete (27 provided, 7 missing)
- Total records analyzed: 34

### Deals Completeness
No deals data was provided in the prompt for analysis. Completeness percent cannot be calculated.

### Company Completeness
- Industry: 93.75% complete
- Employee count: 70.59% complete
- HQ Country: 82.35% complete

### Contact Completeness
- Email: 91.18% complete (54 out of 59 provided, 5 missing)
- Title: 83.05% complete (49 out of 59 provided, 10 missing)
- Persona: 74.58% complete (44 out of 59 provided, 15 missing)

### Duplicate Clusters
Two clusters identified based on shared domain or company alias overlaps:
1. acme-corp.com (with slight company name variation, showing as two distinct company aliases but belonging to the same domain).
2. globex.io (similar to acme-corp.com, showing as two distinct company aliases).

### Invalid Emails
- user0@ (missing domain)
- user2@ (missing domain)

### Domain Mismatches
- None identified based on the given data; however, CT-0011 shows a different domain (other-domain.com) than the company's domain (66d1fc.com).

### Fill Missing Fields
Due to the explicit nature of the task, missing fields will be filled based on the provided enrichment data where direct matches are found, but without inventing data.

Enriched companies.csv:
```csv
company_alias,domain,industry,employee_count,hq_country
C-2D1F1B,2d1f1b.com,Manufacturing,50,
C-66D1FC,66d1fc.com,Computer Software,900,United States
C-C6FE92,c6fe92.com,Retail,50,United States
...
```
Given the detailed instructions, in case of discrepancies, both original CRM values and enrichment values are preserved for review.

```csv
C-D73B89,d73b89.com,Retail,, 
# With enrichment: 
C-D73B89,d73b89.com,Retail,50,
```
For the 10 fixes with the most pipeline amount at stake, detailed pipeline amount data was not provided in the prompt. Therefore, it's not possible to calculate or prioritize fixes based on pipeline amount without making assumptions or inventing data, both of which are against the task's guidelines. 

It's also important to note that the actual fixes and their prioritization would depend on the specifics of the pipeline amounts, the business context, and any specific requirements or regulations governing data handling and CRM management. Without this information, it's not feasible to provide a detailed plan for the top 10 fixes.
deal-intelligence
closed-lost-classification0.60

? The Question

Classify every deal lost in the last 6 months below into one primary category: pricing, competitor, no decision, timing, product gap, champion left, or other. Also assign a side (Bonusly, buyer, unknown). Then summarize: category counts, the side split, the number of deals where the structured closed_lost_tag clearly disagrees with the free-text reason, and the two patterns most worth acting on. Base everything only on the tag and free-text provided.
cost $0.0000 · 46s · in 5,711 / out 910 tok
✗ total_90✗ competitor_top✓ category_counts_present✓ side_split✓ two_patterns

✓ Correct Answer (ground truth)

graded checks: total_90 · competitor_top · category_counts_present · side_split · two_patterns

Model's actual answer

show the model's full answer
Based on the provided data, the categories and their counts are:
- Pricing: 11
- Competitor: 22
- No decision: 22
- Timing: 21
- Product gap: 2
- Champion left: 0
- Other: 12

The side split is:
- Bonusly: 12
- Buyer: 24
- Unknown: 54

There are 78 disagreements between the closed lost tag and the reason text.

The top 2 patterns are:
- No decision, unknown: 20
- Timing, unknown: 12
pipeline-tiering0.20

? The Question

Score the open pipeline below on these signals: forecast category, stage, meetings_30d, contact count, and engagement recency. Assign exactly one tier per deal: LOCK, ACTION, BUILD, REVIVE, WATCH, or RISKY (RISKY = the forecast category disagrees with the engagement evidence). Never tier a deal LOCK if it has zero meetings_30d. Do NOT list every deal. Return ONLY a compact JSON object with exactly these keys: - "tier_counts": object mapping each tier to the number of deals in it (must sum to the total deal count), - "tier_examples": object mapping each tier to up to 3 example deal aliases from the data, - "risky_deals": array of the deal aliases you tiered RISKY, - "lock_violations": number of deals tiered LOCK that have zero meetings_30d (should be 0), - "pipeline_shape": one short paragraph on the overall pipeline shape. Note: inbound_emails_30d is 0 for every row due to a data defect, so treat meetings_30d as the inbound signal.
cost $0.0000 · 241s · in 85,905 / out 1,188 tok
✗ json_returned✗ tier_vocabulary✗ tier_counts_sum✗ risky_deals_listed✓ no_lock_violation_claimed

✓ Correct Answer (ground truth)

total: 156
graded checks: json_returned · tier_vocabulary · tier_counts_sum · risky_deals_listed · no_lock_violation_claimed

Model's actual answer

show the model's full answer
⚠️ No reply: the model returned empty content after retries and any fallback providers. Try `continue`, switch model/provider, or inspect the tool output above.
call-transcript-extraction0.20

? The Question

For each transcript, extract CRM write-back fields as JSON: why-buys (prospect statements only), pain points, stakeholders from the speaker list, budget signal (prospect-stated or null), timeline signal, competitor mentioned (only if the prospect raised it), next step (only if explicitly agreed), objections, confidence. Never fill a field from what the rep said or hoped.
cost $0.0023 · 84s · in 33,971 / out 1,555 tok
✗ json_emitted✗ budget_signal✗ null_discipline✗ stakeholders✓ competitor_prospect_only

✓ Correct Answer (ground truth)

rep: Alex Franklin
per_transcript: {"TX-001": {"why_buys": ["automating anniversary and birthday awards"], "pain_points": ["HR team of three cannot keep up with it manually", "track everything in a spreadsheet, and people slip through
rep_sourced_nulls: {"TX-003": ["budget_signal \u2014 only the rep mentioned pricing/budget"], "TX-004": ["next_step \u2014 rep proposed, prospect said 'no promises'"], "TX-006": ["budget_signal \u2014 rep decoy, prospec
allowed_new: TX-001, TX-002, TX-003, TX-004, TX-005, TX-006, Achievers, Bucketlist, Nectar
graded checks: json_emitted · budget_signal · null_discipline · stakeholders · competitor_prospect_only

Model's actual answer

show the model's full answer
The provided code is unable to execute due to errors in reading the CSV file. The error message indicates that there is an issue with the number of fields expected in line 4 of the CSV file. The code is expecting 4 fields but is seeing 5. This could be due to a formatting issue in the CSV file. 

To fix this issue, you can try to clean the CSV file by removing any unnecessary characters or quotes that might be causing the issue. Alternatively, you can try to specify the delimiter and quote character when reading the CSV file to ensure that it is parsed correctly. 

Here is an example of how you can modify the code to specify the delimiter and quote character:

```
transcripts = pd.read_csv('transcripts.csv', delimiter=',', quotechar='"')
```

This code specifies that the delimiter is a comma and the quote character is a double quote. You can adjust these parameters based on the actual formatting of your CSV file. 

If you are still having issues, you can try to print out the first few lines of the CSV file to see if there are any formatting issues:

```
with open('transcripts.csv', 'r') as f:
    for i in range(10):
        print(f.readline())
```

This code will print out the first 10 lines of the CSV file, which can help you identify if there are any formatting issues.
next-to-close0.75

? The Question

Which 3 deals are closest to signature right now? Use the CRM data and the Slack thread; Slack often has the real status before the CRM does. For each: deal, amount, why it is close, what is left. Under 250 words.
cost $0.0023 · 30s · in 21,948 / out 178 tok
✓ exactly_three✗ top3_named✓ slack_first✓ blocked_excluded

✓ Correct Answer (ground truth)

top3: rank=1; deal_alias=Deal-547B2B; amount=11200; stage=DS5; forecast_category=COMMIT; close_date=2026-09-11 | rank=2; deal_alias=Deal-B7EBD1; amount=9000; stage=DS5; forecast_category=COMMIT; close_date=2026-09-10 | rank=3; deal_alias=Deal-403845; amount=9000; stage=DS5; forecast_category=COMMIT; close_date=2026-09-11
exactly_three: True
blocked_excluded: deal_alias=Deal-2465CE; reason=champion left + procurement freeze (Slack #sales-sparring 2026-09-04)
ranking_rule: Slack signature-imminent deal ranks first; remaining ranked by stage (DS5>DS4), forecast (COMMIT>BEST_CASE>PIPELINE), close_date asc, amount desc
graded checks: exactly_three · top3_named · slack_first · blocked_excluded

Model's actual answer

show the model's full answer
Based on the CRM data and the Slack thread, the three deals closest to signature are:

1. Deal-547B2B: $11,200, DS5/COMMIT. Why it's close: Redlines came back clean, the signing page is out, and the VP People said they are signing tomorrow. What's left: Signature.
2. Deal-403845: $9,000, DS5/COMMIT. Why it's close: The order form is with their finance team. What's left: Finance team review and signature.
3. Deal-A2B47C: $6,360, DS5/COMMIT. Why it's close: Normal legal-review pace. What's left: Legal review completion and signature.

These deals are closest to signature due to their DS5/COMMIT stage and the progress reported in the Slack thread.
product-gap-detectionPASS 1.00

? The Question

Surface true product gaps raised by prospects in active deals. For each candidate: quote the prospect line, classify as real gap, plan gate, or rollout/enablement issue using the product docs excerpt, and name the deal and amount. Only real gaps go in the summary. Rep language does not count as prospect voice.
cost $0.0023 · 50s · in 21,562 / out 315 tok
✓ real_gaps✓ plan_gate_classified✓ enablement_classified✓ gap_summary

✓ Correct Answer (ground truth)

real_gaps: transcript_id=TG-001; deal_alias=Deal-EC3025; amount=62000; feature=SCIM user provisioning; quote=We need SCIM user provisioning — our security team will not approve any tool that requires manual account management.; why_real=not listed in product docs at any tier | transcript_id=TG-002; deal_alias=Deal-D0D6B5; amount=23800; feature=ADP Workforce Now integration; quote=Our payroll runs on ADP Workforce Now and I don't see ADP anywhere in your integration list — that's a dealbreaker for us.; why_real=supported HRIS list is Workday/BambooHR/Gusto/Rippling only
plan_gates: transcript_id=TG-003; deal_alias=Deal-CFE7F4; amount=32000; feature=Custom report builder; tier_required=Enterprise; quote=I tried to build a custom report combining recognition frequency with turnover and couldn't — is that possible on our current plan?
enablement_issues: transcript_id=TG-004; deal_alias=Deal-84DBA6; amount=16000; feature=Slack integration recognition adoption; quote=We turned on the Slack integration in July, but half our managers still haven't given a single recognition — nobody ever trained them on it.; why_enablement=Slack integration exists on all plans; managers were never trained
excluded_rep_voice: transcript_id=TG-005; line=Full transparency — we don't have a native mobile app for hourly workers yet, though it's on the roadmap.; reason=rep voice, not prospect-raised
allowed_new: TG-001, TG-002, TG-003, TG-004, TG-005, SCIM user provisioning, ADP Workforce Now integration, Custom report builder
graded checks: real_gaps · plan_gate_classified · enablement_classified · gap_summary

Model's actual answer

show the model's full answer
### True Product Gaps

1. Deal-EC3025 ($ amount not provided): "We need SCIM user provisioning — our security team will not approve any tool that requires manual account management." This is a **real gap** because SCIM user provisioning is not listed as a supported capability in the product docs.
2. Deal-D0D6B5 ($ amount not provided): "Our payroll runs on ADP Workforce Now and I don't see ADP anywhere in your integration list — that's a dealbreaker for us." This is a **real gap** because ADP Workforce Now integration is not listed as a supported capability in the product docs.

### Non-Gaps

1. Deal-CFE7F4: This is a **plan gate** because the custom report builder is available on the Enterprise tier, but the prospect is on a lower plan.
2. Deal-84DBA6: This is a **rollout/enablement issue** because the Slack integration was already turned on, but the managers were not trained on how to use it.
3. Deal-36C33F: This is not a gap because the prospect is aware that there is no native mobile app for hourly workers, but it is on the roadmap, and the web version is sufficient for their office staff.

**Summary of True Product Gaps:**

- SCIM user provisioning (Deal-EC3025)
- ADP Workforce Now integration (Deal-D0D6B5)

Note: $ amounts are not provided for these deals.
rep-performance
stale-pipeline-by-repFAIL 0.00

? The Question

The snapshot date is 2026-09-05. Using the open deals and the engagements-by-deal table, list every open deal with no logged email, call, or meeting in the last 7 days. Compute recency from the engagements table's last_email/last_call/last_meeting fields, NOT from any date field on the deal (the deal's last_contacted_field is unreliable). For each stale deal give: deal alias, owner name, stage, amount, days since last contact. Group by owner, order by amount descending within each owner. Then state, per owner, how many stale deals they carry and the total stale amount. (Do not write outreach text.)
cost $0.0000 · 71s · in 18,446 / out 1,098 tok
✗ stale_recall_ge_80✗ grouped_by_owner✗ jake_top_amount✗ kevin_stale_amt✗ jenn_stale_amt✗ stale_count

✓ Correct Answer (ground truth)

stale_count: 65
jake_amt: 626243.0
kevin_amt: 252905.03
jenn_amt: 261645.0
top_alias: Deal-2D1F1B
top_amount: 240000.0
graded checks: stale_recall_ge_80 · grouped_by_owner · jake_top_amount · kevin_stale_amt · jenn_stale_amt · stale_count

Model's actual answer

show the model's full answer
The code failed due to a ValueError. The error message indicates that the code is trying to set a DataFrame with multiple columns to a single column 'days_since_last_contact'. 

To fix this issue, we need to modify the code to correctly calculate the days since last contact for each deal and then merge this information with the deals and owners DataFrames. 

Here's the corrected code:

```python
import pandas as pd
from datetime import datetime, timedelta

deals_df = pd.read_csv('deals_open.csv')
engagements_df = pd.read_csv('engagements_by_deal_90d.csv')
owners_df = pd.read_csv('owners.csv')

snapshot_date = datetime.strptime('2026-09-05', '%Y-%m-%d')

# Calculate days since last contact
def calculate_days_since_last_contact(row):
    last_email = row['last_email']
    last_call = row['last_call']
    last_meeting = row['last_meeting']
    
    if last_email != '':
        last_email_date = datetime.strptime(last_email, '%Y-%m-%d')
    else:
        last_email_date = datetime.min
        
    if last_call != '':
        last_call_date = datetime.strptime(last_call, '%Y-%m-%d')
    else:
        last_call_date = datetime.min
        
    if last_meeting != '':
        last_meeting_date = datetime.strptime(last_meeting, '%Y-%m-%d')
    else:
        last_meeting_date = datetime.min
        
    last_contact_date = max([last_email_date, last_call_date, last_meeting_date])
    
    if last_contact_date == datetime.min:
        return float('inf')
    else:
        return (snapshot_date - last_contact_date).days

engagements_df['days_since_last_contact'] = engagements_df.apply(calculate_days_since_last_contact, axis=1)

# Filter out deals with less than 7 days since last contact
stale_deals = engagements_df[engagements_df['days_since_last_contact'] >= 7]

# Merge with deals and owners
stale_deals = pd.merge(stale_deals, deals_df, on='deal_id')
stale_deals = pd.merge(stale_deals, owners_df, on='owner_id')

# Sort by amount descending within each owner
stale_deals = stale_deals.sort_values(by=['owner_name', 'amount'], ascending=[True, False])

print(stale_deals[['deal_alias', 'owner_name', 'stage', 'amount', 'days_since_last_contact']])

# Group by owner and calculate total stale amount
owner_stale_amounts = stale_deals.groupby('owner_name')['amount'].sum().reset_index()
print(owner_stale_amounts)

print(stale_deals.groupby('owner_name').size())
```
activity-mix-vs-outcome0.40

? The Question

The snapshot date is 2026-09-05. For each sales rep (owner), compute the last-30-day totals of emails, calls, and meetings from the engagements table, and the number of deals that entered DS2 in the last 30 days (t_ds2 within 30 days of the snapshot). Report per rep: the activity mix as percentages (emails/calls/meetings share of that rep's total activities), total activities per DS2 entry, and rank the reps by that efficiency ratio (lowest activities per DS2 entry = most efficient). Name the most efficient rep and the highest-volume rep, and note if they differ. Do not attribute cause.
cost $0.0000 · 71s · in 35,195 / out 1,172 tok
✗ justin_ds2✗ justin_volume_high✓ efficient_named✗ mix_present✓ no_causal_claim

✓ Correct Answer (ground truth)

justin_ds2: 4
graded checks: justin_ds2 · justin_volume_high · efficient_named · mix_present · no_causal_claim

Model's actual answer

show the model's full answer
The error message indicates that there is a KeyError: 'deal_id' when trying to merge the deals_df and engagements_df dataframes. This means that the 'deal_id' column does not exist in one or both of the dataframes.

Upon reviewing the code, it appears that the 'deal_id' column is not present in the deals_df dataframe after the groupby operation. The groupby operation is grouping by 'owner_id' and counting the 'ds2_in_last_30_days' column, which results in a dataframe with only two columns: 'owner_id' and 'ds2_count'. 

To fix this error, you need to make sure that the 'deal_id' column is present in both dataframes before trying to merge them. 

Here is the corrected code:

```python
import pandas as pd
from datetime import datetime, timedelta

deals_df = pd.read_csv('deals_open.csv')
deals_df['t_ds2'] = pd.to_datetime(deals_df['t_ds2'])
deals_df['snapshot_date'] = pd.to_datetime('2026-09-05')
last_30_days = deals_df['snapshot_date'] - timedelta(days=30)
deals_df['ds2_in_last_30_days'] = deals_df['t_ds2'] > last_30_days

deals_df = deals_df[deals_df['ds2_in_last_30_days'] == True]

engagements_df = pd.read_csv('engagements_by_deal_90d.csv')

# Merge deals_df and engagements_df on 'deal_id'
merged_df = pd.merge(deals_df, engagements_df, on='deal_id', how='inner')

# Group merged_df by 'owner_id' and calculate 'ds2_count' and 'total_activities'
grouped_df = merged_df.groupby('owner_id')[['ds2_in_last_30_days', 'emails_30d', 'calls_30d', 'meetings_30d']].sum().reset_index()
grouped_df.columns = ['owner_id', 'ds2_count', 'emails_30d', 'calls_30d', 'meetings_30d']

# Calculate 'total_activities'
grouped_df['total_activities'] = grouped_df['emails_30d'] + grouped_df['calls_30d'] + grouped_df['meetings_30d']

# Calculate 'activity_mix'
grouped_df['activity_mix'] = grouped_df[['emails_30d', 'calls_30d', 'meetings_30d']].div(grouped_df['total_activities'], axis=0)

# Calculate 'activities_per_ds2'
grouped_df['activities_per_ds2'] = grouped_df['total_activities'] / grouped_df['ds2_count']

print(grouped_df)

print('\nMost efficient rep: ' + str(grouped_df.loc[grouped_df['activities_per_ds2'].idxmin()]['owner_id']) + '\nHighest volume rep: ' + str(grouped_df.loc[grouped_df['total_activities'].idxmax()]['owner_id']))
```

This code first merges the deals_df and engagements_df dataframes on 'deal_id', then groups the merged dataframe by 'owner_id' and calculates the 'ds2_count' and 'total_activities'. Finally, it calculates the 'activity_mix' and 'activities_per_ds2' and prints the results.
ae-qtd-scorecard0.50

? The Question

Build a QTD scorecard for the named AE as of 2026-09-05: bookings vs quota with attainment percent, new vs expansion split, active pipeline by stage with amount, rolling 90-day DS2-to-won rate, win and loss counts with top loss reason, activity volume by type in the last 30 days. Exclude any closed-won deal dated before the quarter. Close with three coaching observations grounded in the numbers.
cost $0.0033 · 224s · in 29,360 / out 1,263 tok
✗ bookings✓ quota✗ attainment✗ new_expansion_split✓ top_loss_reason✓ coaching_obs

✓ Correct Answer (ground truth)

owner: Alex Franklin
quarter: 2026-Q3
snapshot_date: 2026-09-05
bookings: 150000
quota: 200000
attainment_pct: 75.0
new_bookings: 113500
new_count: 5
expansion_bookings: 36500
expansion_count: 3
pipeline_by_stage: {"DS1": {"count": 20, "amount": 284621}, "DS2": {"count": 28, "amount": 353760}, "DS3": {"count": 67, "amount": 552705}, "DS4": {"count": 5, "amount": 23574}, "DS5": {"count": 5, "amount": 45730}}
open_deals_count: 125
ds2_to_won: window_start=2026-06-07; won_in_window=8; closed_in_window=35; rate=0.2286
wins_qtd: 8
losses_qtd: 27
top_loss_reason: reason=Lost- Timing (1 year or more); count=13
activity_30d_totals: emails_30d=807; calls_30d=112; meetings_30d=128; notes_30d=50
prior_quarter_excluded: deal_alias=Deal-B3E6F1; close_date=2026-06-20; amount=24000
allowed_new: 18 items — e.g. Deal-A1C3E5, Deal-B7D2F4, Deal-C9E1A6, Deal-D4B8C2
graded checks: bookings · quota · attainment · new_expansion_split · top_loss_reason · coaching_obs

Model's actual answer

show the model's full answer
To build the QTD scorecard for Alex Franklin as of 2026-09-05, we'll need to calculate the following metrics: 

1. Bookings vs quota with attainment percent
2. New vs expansion split
3. Active pipeline by stage with amount
4. Rolling 90-day DS2-to-won rate
5. Win and loss counts with top loss reason
6. Activity volume by type in the last 30 days

We only have data up to 2026-09-05.

### Active Pipeline

We'll exclude closed deals and only consider open deals. 

```csv
deal_id,deal_alias,owner,stage,amount,close_date,status,is_won,deal_type,loss_reason,entered_ds2
...
63680235890,Deal-7A2454,Alex Franklin,DS3,1275,2026-09-04,open,,,,2026-08-12
64627627692,Deal-1FC049,Alex Franklin,DS4,1920,2026-09-11,open,,,,2026-09-03
...
```

Let's focus on Q3 deals (2026-07-01 onwards). 

The pipeline by stage:

- DS1: 2 deals (Deal-1D532E, Deal-B038F0) with amount $10,800
- DS2: 7 deals (Deal-F436DA, Deal-6A544F, Deal-DCA846, Deal-F0F288, Deal-EC93DA, Deal-635B8E, Deal-4F775F) with amount $33,240
- DS3: 17 deals (Deal-8E27DA, Deal-403845, Deal-180D02, Deal-357C30, Deal-87412C, Deal-4F775F, Deal-C6D97A, Deal-EE195F, Deal-46988D, Deal-6A544F, Deal-9D0060, Deal-DD7659, Deal-FA053A, Deal-001FF4, Deal-5D8CEE, Deal-DBF65A, Deal-5FDCE4) with amount $117,331
- DS4: 3 deals (Deal-79B7A1, Deal-4062CF, Deal-530B50) with amount $29,100
- DS5: 5 deals (Deal-403845, Deal-A2B47C, Deal-15D24F, Deal-47AE31, Deal-C61CF7) with amount $30,760

Total pipeline amount: $221,231

### Bookings and Quota

Quota for Alex Franklin in Q3: $200,000

To calculate bookings, we'll consider only won deals in Q3. 

```csv
deal_id,deal_alias,owner,stage,amount,close_date,status,is_won,deal_type,loss_reason,entered_ds2
70000000009,Deal-B3E6F1,Alex Franklin,CLOSED_WON,24000,2026-06-20,won,true,new,,2026-05-10
...
```

No won deals in Q3. 

Bookings: $0

Attainment percent: 0%

### New vs Expansion Split

We'll consider only won deals in Q3. 

New deals: 0

Expansion deals: 0

New vs expansion split: N/A

### Rolling 90-day DS2-to-won rate

To calculate the DS2-to-won rate, we need the number of deals that entered DS2 and the number of won deals in the last 90 days. 

```csv
deal_id,deal_alias,owner,stage,amount,close_date,status,is_won,deal_type,loss_reason,entered_ds2
...
63680235890,Deal-7A2454,Alex Franklin,DS3,1275,2026-09-04,open,,,,2026-08-12
...
```

Deals that entered DS2 in the last 90 days: 

- Deal-7A2454
- Deal-1FC049
- Deal-F436DA
- Deal-6A544F
- Deal-DCA846
- Deal-F0F288
- Deal-EC93DA

Total deals that entered DS2: 7

Won deals in the last 90 days: 0

DS2-to-won rate: 0%

### Win and Loss Counts

Won deals in Q3: 0

Lost deals in Q3: 

```csv
deal_id,deal_alias,owner,stage,amount,close_date,status,is_won,deal_type,loss_reason,entered_ds2
61129575303,Deal-5885B9,Alex Franklin,CLOSED_LOST,7200,2026-07-29,lost,false,,MIA,2026-07-08
...
```

Total lost deals: 34

Top loss reason: Lost- Timing (1 year or more) with 8 deals

### Activity Volume

Activity volume in the last 30 days:

- Emails: 145
- Calls: 24
- Meetings: 21
- Notes: 56

Here are three coaching observations:

1. **Low bookings**: Alex Franklin has not won any deals in Q3, resulting in a 0% attainment percent. He needs to focus on closing deals to meet his quota.
2. **High loss rate**: Alex Franklin has lost 34 deals in Q3, with the top loss reason being "Lost- Timing (1 year or more)". He needs to work on improving his sales strategy to reduce the loss rate.
3. **Low DS2-to-won rate**: The DS2-to-won rate is 0% in the last 90 days, indicating that deals are not moving forward from the DS2 stage. Alex Franklin needs to identify the bottlenecks and work on improving the conversion rate.
multithreading-gapPASS 1.00

? The Question

Find every open deal that is single-threaded (fewer than 2 active contacts) or under-threaded (fewer than 3, or all contacts in one persona). Active means engaged in the last 60 days and not marked former. Personas: economic buyer, champion, HR admin, IT security, finance. For each flagged deal: amount, stage, active contact count, personas present, personas missing, the most valuable persona to add given the stage, and any on-file unengaged contact at that company who fits; otherwise say none on file.
cost $0.0028 · 286s · in 22,585 / out 1,758 tok
✓ flagged_recall✓ persona_language✓ single_thread_term✓ on_file_fit

✓ Correct Answer (ground truth)

active_window_start: 2026-07-07
persona_universe: economic buyer, champion, HR admin, IT security, finance
flag_rule: flag if active_contacts < 2 (single-threaded) or active_contacts < 3 or all active contacts share one persona (under-threaded); active = engaged within 60 days and not former
best_persona_rule: DS2/DS3: economic buyer > IT security > finance > HR admin > champion; DS4/DS5: economic buyer > finance > IT security > HR admin > champion; first persona not present among active contacts
flagged: deal_alias=Deal-36C33F; amount=15000; stage=DS2; active_count=1; reason=single-threaded; best_persona_to_add=economic buyer | deal_alias=Deal-50D386; amount=36000; stage=DS2; active_count=2; reason=under-threaded; best_persona_to_add=economic buyer | deal_alias=Deal-5408B0; amount=14850; stage=DS4; active_count=2; reason=under-threaded; best_persona_to_add=economic buyer | deal_alias=Deal-5BFE3B; amount=18000; stage=DS2; active_count=2; reason=under-threaded; best_persona_to_add=economic buyer | deal_alias=Deal-885F45; amount=9300; stage=DS2; active_count=2; reason=under-threaded; best_persona_to_add=IT security | deal_alias=Deal-92D97D; amount=60000; stage=DS2; active_count=1; reason=single-threaded; best_persona_to_add=economic buyer … (+5 more)
healthy_not_flagged: Deal-4B0BEB, Deal-84DBA6, Deal-D348E1
allowed_new: 59 items — e.g. C-077A0E, C-0D15DF, C-1BDFE0, C-2AE3AA
graded checks: flagged_recall · persona_language · single_thread_term · on_file_fit

Model's actual answer

show the model's full answer
To identify under-threaded deals, I'll first determine which contacts are active (not former and engaged in the last 60 days). Then, I'll flag deals with fewer than 3 active contacts or deals where all active contacts share the same persona.

1. **Deal-EC3025**:
   - Active contacts: CT-047C54 (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 1
   - Personas present: champion
   - Personas missing: economic buyer, HR admin, IT security, finance
   - Most valuable persona to add given the stage: economic buyer (assuming early stages require economic buyer engagement)
   - On-file unengaged contact: CT-6827DB (Chief People Officer, economic buyer)

2. **Deal-92D97D**:
   - Active contacts: CT-01F5B4 (HR admin), CT-A902AE (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 2
   - Personas present: HR admin, champion
   - Personas missing: economic buyer, IT security, finance
   - Most valuable persona to add given the stage: economic buyer
   - On-file unengaged contact: None matching the company and required persona

3. **Deal-50D386**:
   - Active contacts: CT-AA41B2 (champion), CT-B9C35B (HR admin)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 2
   - Personas present: champion, HR admin
   - Personas missing: economic buyer, IT security, finance
   - Most valuable persona to add given the stage: economic buyer
   - On-file unengaged contact: CT-A1C4B3 (Chief People Officer, economic buyer)

4. **Deal-D0D6B5**:
   - Active contacts: CT-87CED4 (champion), CT-DE6D7C (champion), CT-FD70B2 (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 3
   - However, all contacts have the same persona (champion), making it under-threaded.
   - Personas present: champion
   - Personas missing: economic buyer, HR admin, IT security, finance
   - Most valuable persona to add given the stage: economic buyer
   - On-file unengaged contact: CT-1FA4DB (Chief People Officer, economic buyer)

5. **Deal-5BFE3B**:
   - Active contacts: CT-57123B (champion), CT-5CE757 (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 2
   - Personas present: champion
   - Personas missing: economic buyer, HR admin, IT security, finance
   - Most valuable persona to add given the stage: economic buyer
   - On-file unengaged contact: None matching the company and required persona

6. **Deal-84DBA6**:
   - Active contacts: CT-BAA9D3 (champion), CT-60834D (economic buyer), CT-3F23A4 (IT security)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 3
   - Personas present: champion, economic buyer, IT security
   - Personas missing: HR admin, finance
   - Most valuable persona to add given the stage: HR admin
   - On-file unengaged contact: CT-2A0169 (Controller, finance)

7. **Deal-36C33F**:
   - Active contacts: CT-4FE556 (IT security), CT-405B45 (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 2
   - Personas present: IT security, champion
   - Personas missing: economic buyer, HR admin, finance
   - Most valuable persona to add given the stage: economic buyer
   - On-file unengaged contact: CT-1DB73E (Chief People Officer, economic buyer)

8. **Deal-4B0BEB**:
   - Active contacts: CT-A96531 (champion), CT-DE5BDC (economic buyer), CT-1543C8 (HR admin), CT-3E135F (finance)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 4
   - This deal is well-threaded and does not meet the criteria for being under-threaded.

9. **Deal-885F45**:
   - Active contacts: CT-51C81E (economic buyer), CT-D9A0E8 (champion)
   - Amount and stage: Not provided in deal_contacts.csv
   - Active contact count: 2
   - Personas present: economic buyer, champion
   - Personas missing: HR admin, IT security, finance
   - Most valuable persona to add given the stage: HR admin
   - On-file unengaged contact: CT-B3F25D (IT Security Lead, IT security)

10. **Deal-FCBE5B**:
    - Active contacts: CT-4A5317 (champion)
    - Amount and stage: Not provided in deal_contacts.csv
    - Active contact count: 1
    - Personas present: champion
    - Personas missing: economic buyer, HR admin, IT security, finance
    - Most valuable persona to add given the stage: economic buyer
    - On-file unengaged contact: None matching the company and required persona

11. **Deal-5408B0**:
    - Active contacts: CT-D33AE4 (champion), CT-8742FD (HR admin)
    - Amount and stage: Not provided in deal_contacts.csv
    - Active contact count: 2
    - Personas present: champion, HR admin
    - Personas missing: economic buyer, IT security, finance
    - Most valuable persona to add given the stage: economic buyer
    - On-file unengaged contact: CT-07FA76 (Chief People Officer, economic buyer)

12. **Deal-D348E1**:
    - Active contacts: CT-4EA0A4 (champion), CT-2164AD (economic buyer), CT-EC404C (IT security), CT-08E5FA (finance), CT-BEDF5E (HR admin)
    - Amount and stage: Not provided in deal_contacts.csv
    - Active contact count: 5
    - This deal is well-threaded and does not meet the criteria for being under-threaded.

13. **Deal-C6D97A**:
    - Active contacts: CT-223DDC (champion), CT-B03555 (champion), CT-4E8A2B (champion)
    - Amount and stage: Not provided in deal_contacts.csv
    - Active contact count: 3
    - However, all contacts have the same persona (champion), making it under-threaded.
    - Personas present: champion
    - Personas missing: economic buyer, HR admin, IT security, finance
    - Most valuable persona to add given the stage: economic buyer
    - On-file unengaged contact: None matching the company and required persona

14. **Deal-F9A08A**:
    - Active contacts: CT-931B10 (champion)
    - Amount and stage: Not provided in deal_contacts.csv
    - Active contact count: 1
    - Personas present: champion
    - Personas missing: economic buyer, HR admin, IT security, finance
    - Most valuable persona to add given the stage: economic buyer
    - On-file unengaged contact: CT-697541 (Chief People Officer, economic buyer)

Deals that are single-threaded or under-threaded, along with the most valuable persona to add and any on-file unengaged contacts, are listed above. Note that amounts and stages for these deals are not provided in the given files, and thus cannot be included in the analysis.
talk-track-from-transcriptsPASS 1.00

? The Question

From this rep's last 10 calls: what they lead with in the first five minutes, how they handle the three most common objections, how often a concrete next step is agreed (rate), and every competitor a prospect raised. Quote at most one line per finding and only lines that appear in the transcripts. End with two coaching notes.
cost $0.0025 · 77s · in 23,498 / out 357 tok
✓ objection_count✓ next_step_rate✓ competitors✓ coaching✓ quote_used

✓ Correct Answer (ground truth)

rep: Alex Franklin
n_transcripts: 10
opener_theme: theme=opens with a customer recognition win story (400-person retailer, 18% turnover reduction); count=8; total=10; quote=Quick one to kick off: a 400-person retailer we work with cut regretted turnover 18% in two quarters after automating milestone awards, and I wanted to walk you through exactly how they did it.; transcript_id=TT-001
objections: objection=budget; count=4; quote=Honestly, budget is locked until next fiscal year — I can't add a new line item right now.; transcript_id=TT-001 | objection=timing; count=3; quote=This is good, but can we revisit it next quarter? Open enrollment starts in October and we're underwater.; transcript_id=TT-002 | objection=in-house; count=3; quote=We already do recognition with a spreadsheet and quarterly gift cards — why would we change?; transcript_id=TT-004
objection_count: 3
next_step: agreed=7; total=10; rate=0.7
competitors_prospect_raised: Awardco, Kudos
competitor_quotes: Awardco=We're also in late talks with Awardco — their rewards catalog looks bigger than yours.; Kudos=How are you different from Kudos? Our CEO used them at her last company.
rep_raised_competitors_excluded: Workhuman
allowed_new: 13 items — e.g. TT-001, TT-002, TT-003, TT-004
graded checks: objection_count · next_step_rate · competitors · coaching · quote_used

Model's actual answer

show the model's full answer
In the first five minutes, Alex Franklin leads with: "Quick one to kick off: a 400-person retailer we work with cut regretted turnover 18% in two quarters after automating milestone awards, and I wanted to walk you through exactly how they did it."

The three most common objections are:
1. "Honestly, budget is locked until next fiscal year — I can't add a new line item right now."
2. "This is good, but can we revisit it next quarter? Open enrollment starts in October and we're underwater."
3. "We already do recognition with a spreadsheet and quarterly gift cards — why would we change?"

He handles these objections by:
1. Responding with examples of how other teams fund the solution out of turnover savings: "Totally fair. Most teams fund this out of turnover savings — that retailer saved about $210k in avoided backfills, which is how their finance team signed off."
2. Offering a 90-day pilot to provide internal data before the next quarter's planning: "What if we scope a 90-day pilot with one department so you have internal data before next quarter's planning?"
3. Highlighting the benefits of automation and analytics: "Spreadsheets work until they scale — the difference is automation: milestones fire without HR lifting a finger, and you get analytics on who is being recognized."

A concrete next step is agreed 6 out of 10 times (60% agreement rate).

Competitors mentioned by prospects are:
- Awardco
- Workhuman
- Kudos

Two coaching notes:
1. Consider emphasizing the unique value proposition earlier in the conversation, especially for prospects who are comparing solutions.
2. Offer more tailored solutions or case studies to address common objections and concerns.
reporting-analytics
q3-weighted-forecastFAIL 0.00

? The Question

Below are the open deals in the default sales pipeline with a close date between 2026-07-01 and 2026-10-15, pulled from the CRM warehouse on 2026-09-05. Stages: DS1 (discovery) through DS5 (contract). Build the Q3 2026 forecast (quarter = 2026-07-01 to 2026-09-30). Weighting rule: 100 percent of COMMIT plus 35 percent of BEST_CASE. PIPELINE deals count zero. Only deals with a close date inside the quarter count. Report: COMMIT total, BEST_CASE total, weighted forecast, count of deals in each category inside the quarter, the deals you excluded for being outside the quarter (count and total amount), and the top 5 BEST_CASE deals by amount inside the quarter. Show arithmetic. Then, in a final '## Data quality' section of no more than four sentences, name the data quality problems in this extract that would make the forecast unreliable if it were run unattended.
cost $0.0000 · 47s · in 19,528 / out 740 tok
✗ commit_total_44729✗ best_case_total_203565✗ weighted_115976.75✗ commit_count_7✗ best_case_count_24✗ excluded_count_32✗ excluded_amount_227575✗ top5_aliases✗ flags_blank_owner✗ flags_missing_why_buys

✓ Correct Answer (ground truth)

graded checks: commit_total_44729 · best_case_total_203565 · weighted_115976.75 · commit_count_7 · best_case_count_24 · excluded_count_32 · excluded_amount_227575 · top5_aliases · flags_blank_owner · flags_missing_why_buys

Model's actual answer

show the model's full answer
To calculate the Q3 2026 forecast, I will first filter the deals to only include those with a close date between 2026-07-01 and 2026-09-30.

Next, I will calculate the total amount for COMMIT and BEST_CASE deals.

Then, I will calculate the weighted forecast using the formula: 100% of COMMIT + 35% of BEST_CASE.

Finally, I will count the number of deals in each category and identify the top 5 BEST_CASE deals by amount.

## Step 1: Filter deals by close date
I will filter the deals to only include those with a close date between 2026-07-01 and 2026-09-30.

```python
import pandas as pd

# Load the deals.csv file
deals = pd.read_csv('deals.csv')

# Filter deals by close date
deals_inside_quarter = deals[(deals['close_date'] >= '2026-07-01') & (deals['close_date'] <= '2026-09-30')]
```

## Step 2: Calculate COMMIT and BEST_CASE totals
I will calculate the total amount for COMMIT and BEST_CASE deals.

```python
# Calculate COMMIT total
commit_total = deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'COMMIT']['amount'].sum()

# Calculate BEST_CASE total
best_case_total = deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'BEST_CASE']['amount'].sum()
```

## Step 3: Calculate weighted forecast
I will calculate the weighted forecast using the formula: 100% of COMMIT + 35% of BEST_CASE.

```python
# Calculate weighted forecast
weighted_forecast = commit_total + (best_case_total * 0.35)
```

## Step 4: Count deals in each category
I will count the number of deals in each category.

```python
# Count COMMIT deals
commit_count = len(deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'COMMIT'])

# Count BEST_CASE deals
best_case_count = len(deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'BEST_CASE'])

# Count PIPELINE deals
pipeline_count = len(deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'PIPELINE'])
```

## Step 5: Identify top 5 BEST_CASE deals
I will identify the top 5 BEST_CASE deals by amount.

```python
# Sort BEST_CASE deals by amount in descending order
best_case_deals = deals_inside_quarter[deals_inside_quarter['forecast_category'] == 'BEST_CASE'].sort_values(by='amount', ascending=False)

# Get top 5 BEST_CASE deals
top_5_best_case_deals = best_case_deals.head(5)
```

## Step 6: Calculate excluded deals
I will calculate the number of deals excluded for being outside the quarter and the total amount of these deals.

```python
# Filter deals outside the quarter
deals_outside_quarter = deals[(deals['close_date'] < '2026-07-01') | (deals['close_date'] > '2026-09-30')]

# Count excluded deals
excluded_count = len(deals_outside_quarter)

# Calculate total amount of excluded deals
excluded_total = deals_outside_quarter['amount'].sum()
```

Now, let's combine all the steps into a single function and execute it using the iPython tool. Please see below:
aha-moment-2x20.83

? The Question

Test the activation hypothesis on the company cohort below: companies with 5+ unique givers (m1_users >= 5) AND 1+ successful redemption (m1_redemptions >= 1) in their first calendar month retain better at 24 months than those with one signal or neither. Every company in this extract is already 25+ months old, so current_status = 'active' means retained at 24 months. Report the full 2x2 (cohort size and 24-month retention rate for: both signals, givers-only, redemption-only, neither), state how many companies were excluded from the denominator and why (if none, say so), name the single signal with the largest retention lift, and state what this does and does not prove.
cost $0.0000 · 43s · in 10,410 / out 852 tok
✓ both_66✓ givers_47✓ redemp_31✓ neither_40✓ excluded_0✗ largest_lift_givers

✓ Correct Answer (ground truth)

graded checks: both_66 · givers_47 · redemp_31 · neither_40 · excluded_0 · largest_lift_givers

Model's actual answer

show the model's full answer
The 2x2 table for the cohort analysis is as follows:
- Both signals: 47 companies, 65.96% retention
- Givers only: 49 companies, 46.94% retention
- Redemption only: 29 companies, 31.03% retention
- Neither: 95 companies, 40.00% retention

No companies were excluded from the denominator.

The single signal with the largest retention lift is Redemption only.

This analysis proves that companies with both signals have higher retention rates than those with one signal or neither. However, it does not prove causation between the signals and retention.
arr-rollforward-reconciliation0.60

? The Question

Reconcile ARR between CRM company records and billing subscriptions as of 2026-09-05. Billing ARR is MRR x 12. Report both totals, the variance, and a decomposition into buckets (status mismatch, rounding, missing records, other) that sums exactly to the variance. List each mismatched account with a suggested owner. Business rule: any subscription with a term other than 12 months must have cf_agreement_end_date populated; list violations.
cost $0.0000 · 52s · in 2,670 / out 680 tok
✓ billing_total✓ crm_total✗ variance✗ buckets_sum✓ violations_listed

✓ Correct Answer (ground truth)

as_of: 2026-09-05
billing_arr_total: 604739.28
crm_arr_total: 603581.76
variance: 1157.52
variance_definition: billing_arr_total - crm_arr_total (billing ARR = sum of MRR x 12 over status=active subscriptions)
buckets: {"status_mismatch": {"amount": "-13158.48", "accounts": [{"company_alias": "C-0C8323BF", "billing_arr": "0.00", "hubspot_arr": "4905.24", "diff": "-4905.24", "suggested_owner": "Dana Mercer"}, {"compa
bucket_sum_equals_variance: True
n_mismatched_accounts: 7
rule: term_months != 12 requires cf_agreement_end_date
violations: subscription_id=SUB-0002; company_alias=C-1794A52C; term_months=24 | subscription_id=SUB-0019; company_alias=C-22170CA1; term_months=36
n_companies: 40
graded checks: billing_total · crm_total · variance · buckets_sum · violations_listed

Model's actual answer

show the model's full answer
The billing ARR total is $617,897.76 and the CRM ARR total is $603,581.76. The variance between the two is -$14,316.00. This variance can be decomposed into buckets: status mismatch ($13,158.48), rounding ($0.00), missing records ($16,497.24), and other (-$43,971.72). There are 15 mismatched accounts between the CRM and billing subscriptions. Additionally, there are 2 violations of the business rule that cf_agreement_end_date must be populated for subscriptions with a term other than 12 months.
kvm-month-over-month0.60

? The Question

Report the four core KVMs for 2026-08 against 2026-07: giving rate, redemptions per user, 1:1 meetings engagement, pulse check engagement. For each: value, prior value, absolute and relative change, direction. Name the KVM with the largest relative move and the segment (plan_tier or size_band) driving it if the data supports that; otherwise say the data does not. Under 200 words plus one table.
cost $0.0000 · 104s · in 6,112 / out 1,289 tok
✓ four_kvms✓ biggest_mover_named✗ direction_correct✗ segment_named✓ word_cap

✓ Correct Answer (ground truth)

aggregation: simple mean of company-level values per month
kvms: {"giving_rate": {"2026-07": 0.6023, "2026-08": 0.6027, "abs_change": 0.0004, "rel_change_pct": 0.07, "direction": "up"}, "redemptions_per_user": {"2026-07": 1.73, "2026-08": 1.7302, "abs_change": 0.00
biggest_mover: pulse_engagement
driving_segment: size_band=enterprise; 2026-07=0.55; 2026-08=0.2743; rel_change_pct=-50.13
segment_detail: {"smb": {"2026-07": 0.6588, "2026-08": 0.6573, "rel_change_pct": -0.23}, "mid_market": {"2026-07": 0.593, "2026-08": 0.5942, "rel_change_pct": 0.2}, "enterprise": {"2026-07": 0.55, "2026-08": 0.2743,
n_company_rows_per_month: 30
graded checks: four_kvms · biggest_mover_named · direction_correct · segment_named · word_cap

Model's actual answer

show the model's full answer
The four core KVMs for 2026-08 against 2026-07 are:
- Giving Rate: 0.6027 (2026-08), 0.6023 (2026-07), absolute change: 0.0004, relative change: 0.07%
- Redemptions per User: 1.7302 (2026-08), 1.7300 (2026-07), absolute change: 0.0002, relative change: 0.01%
- 1:1 Meetings Engagement: 0.4472 (2026-08), 0.4469 (2026-07), absolute change: 0.0003, relative change: 0.06%
- Pulse Check Engagement: 0.5086 (2026-08), 0.6006 (2026-07), absolute change: -0.0920, relative change: -15.31%
The KVM with the largest relative move is Pulse Check Engagement with a relative change of -15.31%. The data does not support identifying the segment (plan_tier or size_band) driving this change.
rewards-ytd-sectionPASS 1.00

? The Question

Produce the redemption section of the weekly rewards report through the last completed month (2026-08): redemption count, spend, unique redeemers, redemptions per redeemer, provider mix as percent of spend, top 5 countries by redemptions. Say which month is the last completed month. Provider shares must sum to 100.
cost $0.0000 · 31s · in 32,281 / out 438 tok
✓ count✓ spend✓ unique_redeemers✓ month_named✓ provider_mix✓ top_country

✓ Correct Answer (ground truth)

redemption_count: 378
total_spend_usd: 27846.00
unique_redeemers: 235
redemptions_per_redeemer: 1.61
provider_mix_pct_of_spend: TangoCard=11.6; Tremendous=30.54; custom=39.05; Snappy=18.81
top5_countries_by_count: country=US; count=244 | country=CA; count=24 | country=AU; count=21 | country=GB; count=17 | country=NL; count=17
graded checks: count · spend · unique_redeemers · month_named · provider_mix · top_country

Model's actual answer

show the model's full answer
The redemption count is 378, the total spend is $27,846.00, the number of unique redeemers is 235, the average redemptions per redeemer is 1.61, the provider mix as a percent of spend is Snappy (18.81%), TangoCard (11.60%), Tremendous (30.54%), and custom (39.05%), and the top 5 countries by redemptions are US (244), CA (24), AU (21), GB (17), and NL (17). The last completed month is 2026-08.
customer-success
churn-save-eligibility0.60

? The Question

Which at-risk accounts qualify for a churn-save offer under the documented eligibility rules, what amount is at stake per account and in total, and which play fits each (usage revival, executive touch, commercial concession)? Cite the signal that justifies each play. List accounts that look at risk but do not qualify and why.
cost $0.0024 · 139s · in 24,167 / out 772 tok
✓ eligible_set✗ total_at_stake✓ plays_cited✓ noneligible_named✗ rules_applied

✓ Correct Answer (ground truth)

snapshot_date: 2026-09-05
rules: health_score < 60, churn_save_eligible_amount > 0, renewal within 120 days of snapshot
eligible: account_alias=C-0F6C0F34; amount_at_stake=49707.00; play=executive touch; justifying_signal=champion_active is false - no executive sponsor engaged | account_alias=C-0B827671; amount_at_stake=25365.00; play=usage revival; justifying_signal=usage_trend_3m=declining over the last 3 months | account_alias=C-0B360C78; amount_at_stake=35748.00; play=commercial concession; justifying_signal=usage stable/growing with seat utilization 75% - risk is commercial, not adoption | account_alias=C-0B0F1BAB; amount_at_stake=5494.00; play=executive touch; justifying_signal=champion_active is false - no executive sponsor engaged | account_alias=C-0CA21961; amount_at_stake=16829.00; play=usage revival; justifying_signal=seat utilization 26% is below 50% | account_alias=C-0E9C27D1; amount_at_stake=41235.00; play=commercial concession; justifying_signal=usage stable/growing with seat utilization 85% - risk is commercial, not adoption … (+2 more)
total_amount_at_stake: 224601.00
non_eligible_at_risk: account_alias=C-0BC71BDD; health_score=55 | account_alias=C-0BA71F12; health_score=52 | account_alias=C-0F6694C3; health_score=43 | account_alias=C-0BE96399; health_score=54 | account_alias=C-0F876796; health_score=47 | account_alias=C-0FCCD2DF; health_score=43 … (+1 more)
n_accounts: 30
graded checks: eligible_set · total_at_stake · plays_cited · noneligible_named · rules_applied

Model's actual answer

show the model's full answer
The following at-risk accounts qualify for a churn-save offer:

1. C-0F6C0F34: $49,707 (executive touch)
2. C-0B827671: $25,365 (usage revival)
3. C-0B360C78: $35,748 (usage revival)
4. C-0B0F1BAB: $5,494 (executive touch)
5. C-0CA21961: $16,829 (commercial concession)
6. C-0E9C27D1: $41,235 (usage revival)
7. C-0CEF69FD: $32,621 (executive touch)
8. C-0D3278C7: $17,602 (usage revival)

The total amount at stake is $197,991.

The following accounts look at risk but do not qualify:

1. C-0BC71BDD - Churn-save eligibility amount is 0.
2. C-0BA71F12 - Renewal date is outside the 120-day window.
3. C-0F6694C3 - Churn-save eligibility amount is 0.
4. C-0BE96399 - Churn-save eligibility amount is 0.
5. C-0F876796 - Renewal date is outside the 120-day window.
6. C-0FCCD2DF - Churn-save eligibility amount is 0.
7. C-10A56B0F - Churn-save eligibility amount is 0.
expansion-kit0.67

? The Question

A customer replied to outreach (reply included). Build the expansion kit: seat coverage (licensed over headcount), two lines on usage health, headroom in seats and ARR at the current per-seat rate, who replied and whether they can buy, the right buyer from our contacts, and a reply email under 150 words that moves toward the right person without being pushy and cites one real usage fact.
cost $0.0000 · 58s · in 1,579 / out 490 tok
✓ coverage_pct✗ headroom_arr✓ right_buyer✓ replier_not_buyer✗ usage_fact✓ email_under_150

✓ Correct Answer (ground truth)

company_alias: C-0DDFC9A7
coverage_pct: 37.5
headroom_seats: 250
per_seat_annual_rate: 60.00
headroom_arr: 15000.00
replier: Maria S.
replier_can_buy: False
right_buyer: name=Dana R.; title=VP People
usage_facts: active_users_2026_08=126; active_users_2026_03=88; growth_pct_6m=43.2; licensed_seat_utilization_pct=84.0
usage_health_lines: Monthly active users grew from 88 (2026-03) to 126 (2026-08), +43.2% over 6 months., Last month 126 of 150 licensed seats were active (84.0% utilization), approaching the seat cap.
graded checks: coverage_pct · headroom_arr · right_buyer · replier_not_buyer · usage_fact · email_under_150

Model's actual answer

show the model's full answer
The seat coverage is 37.5% (150 licensed seats / 400 headcount). 

The usage health is good, with monthly active users climbing and the recognition feed busy every week.

There is headroom for 250 more seats (400 headcount - 150 licensed seats), which could bring in an additional $90,000 in ARR at the current per-seat rate ($360 per seat).

Maria S., People Operations Coordinator, replied to the outreach, but she is not the right person to make purchasing decisions. 

The right buyer is Dana R., VP People. 

Here is a potential reply email that moves toward the right person without being pushy and cites one real usage fact:

"Hi Maria, thanks for getting back to me. I’d love to discuss our usage numbers with Dana R. Would you be able to introduce us? Best, [Your Name]"
onboarding-status0.50

? The Question

Prep the CSM for the mid-onboarding call: what is complete (integrations connected, allowance set, admins added, first recognition given, first redemption), what is not, early engagement signals, and the three things to cover on the call. Mark nothing complete without a data field that shows it.
cost $0.0000 · 22s · in 685 / out 362 tok
✓ complete_items✓ incomplete_items✗ three_items✗ grounded

✓ Correct Answer (ground truth)

company_alias: C-0D284E42
days_live: 25
checklist: {"slack_integration_connected": {"complete": true, "field": "integration_slack", "value": "2026-08-12"}, "hris_integration_connected": {"complete": false, "field": "integration_hris", "value": ""}, "a
engagement_signals: avg_active_givers_week1=4.3; avg_active_givers_last_week=13.0; latest_active_givers=15; days_with_activity=25
call_items: Connect the HRIS integration (integration_hris is empty) to automate user provisioning and offboarding., Get to first redemption (first_redemption_at is empty): walk admins through the rewards catalog and confirm allowance funding., Build the giving habit: daily active givers averaged 4.3 in week 1 vs 13.0 last week - agree on manager nudges and a recognition cadence.
graded checks: complete_items · incomplete_items · three_items · grounded

Model's actual answer

show the model's full answer
The CSM prep file has been created at /Users/amaniphipps/csm_prep.txt with the following content:

Integration with Slack: COMPLETE (2026-08-12)
Integration with HRIS: NOT COMPLETE
Allowance set: COMPLETE (2026-08-13)
Admins added: COMPLETE (2 admins)
First recognition: COMPLETE (2026-08-15 14:22)
First redemption: NOT COMPLETE
Early engagement signals: 3 active givers on 2026-08-11, 5 active givers on 2026-08-15, 15 active givers on 2026-09-03
Call topics: 1) Review early engagement signals, 2) Discuss first recognition and redemption, 3) Plan next steps for HRIS integration and first redemption
renewal-risk-conflicting-datesPASS 1.00

? The Question

Produce a 90-day renewal risk brief. Two systems hold renewal dates and disagree on some accounts; decide which to trust per account and say why (multi-year contracts are known to be wrong in ChurnZero). For every renewal: company, CSM, ARR, date used, seat utilization, 3-month usage trend, risk rating with one sentence of evidence. Flag every disagreement. Close with total ARR renewing and ARR at risk.
cost $0.0000 · 55s · in 6,248 / out 1,076 tok
✓ total_renewing✓ arr_at_risk✓ disagreements_flagged✓ trust_rule

✓ Correct Answer (ground truth)

snapshot_date: 2026-09-05
window: 2026-09-05 to 2026-12-04
trust_rule: multi-year contracts: Chargebee is authoritative (ChurnZero known wrong); otherwise systems agree or Chargebee wins
accounts: 20 items — e.g. account_alias=C-0B144C78; csm=Cole Ingram; arr=30899.00; trusted_renewal_date=2026-11-02; trusted_source_why=systems agree (annual term); in_90d_window=True; dates_disagree=False; seat_utilization_pct=75.4; usage_3m_ratio=1.03; risk=low; evidence=3-month usage ratio 1.03 (last3 avg 103 vs prior3 100), seat utilization 75% | account_alias=C-0B20DB64; csm=Dana Mercer; arr=21770.00; trusted_renewal_date=2026-10-07; trusted_source_why=systems agree (annual term); in_90d_window=True; dates_disagree=False; seat_utilization_pct=56.6; usage_3m_ratio=1.0; risk=medium; evidence=3-month usage ratio 1.00 (last3 avg 295 vs prior3 295), seat utilization 57% | account_alias=C-0B344485; csm=Elena Sinclair; arr=64384.00; trusted_renewal_date=2026-11-16; trusted_source_why=systems agree (annual term); in_90d_window=True; dates_disagree=False; seat_utilization_pct=78.0; usage_3m_ratio=1.04; risk=low; evidence=3-month usage ratio 1.04 (last3 avg 241 vs prior3 231), seat utilization 78% | account_alias=C-0B369871; csm=Dana Mercer; arr=85128.00; trusted_renewal_date=2026-10-29; trusted_source_why=systems agree (annual term); in_90d_window=True; dates_disagree=False; seat_utilization_pct=75.1; usage_3m_ratio=1.04; risk=low; evidence=3-month usage ratio 1.04 (last3 avg 330 vs prior3 316), seat utilization 75%
disagreements: account_alias=C-0B7D2C30; cz_renewal_date=2026-09-10; cb_renewal_date=2026-09-15; is_multi_year=True; trusted=2026-09-15 | account_alias=C-0BBE3E60; cz_renewal_date=2027-09-26; cb_renewal_date=2026-09-26; is_multi_year=True; trusted=2026-09-26 | account_alias=C-0BCDB8C2; cz_renewal_date=2027-09-18; cb_renewal_date=2026-09-18; is_multi_year=True; trusted=2026-09-18 | account_alias=C-0D2AB865; cz_renewal_date=2026-09-10; cb_renewal_date=2026-09-22; is_multi_year=True; trusted=2026-09-22 | account_alias=C-0F5D2323; cz_renewal_date=2026-09-10; cb_renewal_date=2026-09-29; is_multi_year=True; trusted=2026-09-29
n_disagreements: 5
total_arr_renewing_90d: 1048715.00
arr_at_risk_90d: 359409.00
n_accounts: 20
graded checks: total_renewing · arr_at_risk · disagreements_flagged · trust_rule

Model's actual answer

show the model's full answer
The 90-day renewal risk brief shows that there are 20 accounts with renewals coming up, with a total ARR of $1,048,715.00. The ARR at risk is $170,066.00, which is approximately 16.2% of the total ARR renewing. The accounts with the highest risk rating are C-0F5D2323, with a low seat utilization of 28.46%. The accounts with declining usage trends are C-0B7D2C30, C-0BCDB8C2, C-0D2AB865, C-0BBE3E60, C-0F5D2323, C-0EC6999D, C-0B20DB64, C-0BBC4E7A, C-0FD551AB, C-0F9F8F13, C-0BC34584, C-0B7A7546, C-0B369871, C-0B144C78, C-0FC4DBB8, C-0D5BBE3A, C-0FB9D5AF, C-0B344485, C-0CB2C1B4, and C-22170CA1. 

The disagreements between the two systems are:
- C-0B7D2C30: ChurnZero renewal date is 2026-09-10, while Chargebee renewal date is 2026-09-15.
- C-0BCDB8C2: ChurnZero renewal date is 2027-09-18, while Chargebee renewal date is 2026-09-18.
- C-0D2AB865: ChurnZero renewal date is 2026-09-10, while Chargebee renewal date is 2026-09-22.
- C-0BBE3E60: ChurnZero renewal date is 2027-09-26, while Chargebee renewal date is 2026-09-26.
- C-0F5D2323: ChurnZero renewal date is 2026-09-10, while Chargebee renewal date is 2026-09-29.
ticket-theme-synthesis0.20

? The Question

Synthesize the quarter's support tickets into 4 to 7 themes. Do not trust existing tags; read the text. Per theme: name, count, share, distinct accounts, ARR affected, two ticket ids, one-line recommendation. Separate broad patterns from single-account noise and rank by ARR exposure, not volume.
cost $0.0000 · 62s · in 4,702 / out 1,353 tok
✗ theme_count_range✗ counts_verifiable✗ single_account_flagged✓ arr_ranked✗ ticket_ids

✓ Correct Answer (ground truth)

quarter_window: 2026-06-01 through 2026-08-31
total_tickets: 80
themes: {"points_not_posting": {"count": 20, "share_pct": 25.0, "distinct_accounts": 9, "arr_affected": "31100.00", "example_ticket_ids": ["IC-460001", "IC-460002"], "single_account": false}, "slack_sync": {"
ranking_by_arr_exposure: hris_provisioning, redemption_failures, billing_dispute, points_not_posting, slack_sync
single_account_noise_theme: billing_dispute
note: existing tags are noisy/unreliable; classify by text
sample_ticket_ids: 80 items — e.g. IC-460004, IC-460016, IC-460001, IC-460041
graded checks: theme_count_range · counts_verifiable · single_account_flagged · arr_ranked · ticket_ids

Model's actual answer

show the model's full answer
The code failed to execute due to a TypeError. The error message indicates that the 'body_text' variable is of type float, which is not iterable. This means that the code is trying to check if a string is present in a float value, which is not possible.

To fix this issue, we need to ensure that the 'body_text' variable is of type string before trying to check if a substring is present in it. We can do this by converting the 'body_text' variable to a string using the str() function.

Here is the corrected code:

```python
import pandas as pd
from collections import defaultdict
from operator import itemgetter

df = pd.read_csv('intercom_tickets.csv')

ticket_counts = defaultdict(int)
arr_affected = defaultdict(float)
distinct_accounts = defaultdict(set)
ticket_ids = defaultdict(list)

for _, row in df.iterrows():
    body_text = str(row['body_text'])  # Convert body_text to string
    arr = row['arr']
    account_alias = row['account_alias']
    ticket_id = row['ticket_id']

    # Simple categorization based on keywords
    if 'points' in body_text and ('not posting' in body_text or 'never arrived' in body_text):
        category = 'Points not posting'
    elif 'Slack' in body_text and ('integration' in body_text or 'sync' in body_text or 'slash command' in body_text):
        category = 'Slack integration issues'
    elif 'HRIS' in body_text and ('provisioning' in body_text or 'sync' in body_text):
        category = 'HRIS provisioning issues'
    elif 'billing' in body_text and ('invoice' in body_text or 'tier price' in body_text or 'seat count' in body_text):
        category = 'Billing issues'
    elif 'redemption' in body_text and ('failed' in body_text or 'gift card' in body_text):
        category = 'Redemption issues'
    else:
        category = 'Other'

    ticket_counts[category] += 1
    arr_affected[category] += arr
    distinct_accounts[category].add(account_alias)
    ticket_ids[category].append(ticket_id)

# Calculate share and rank by ARR exposure
themes = []
for category, count in ticket_counts.items():
    share = count / len(df)
    arr_exposure = arr_affected[category]
    distinct_account_count = len(distinct_accounts[category])
    ticket_id1 = ticket_ids[category][0] if ticket_ids[category] else None
    ticket_id2 = ticket_ids[category][1] if len(ticket_ids[category]) > 1 else None
    themes.append((category, count, share, distinct_account_count, arr_exposure, ticket_id1, ticket_id2))

themes.sort(key=itemgetter(4), reverse=True)

print('Theme,Count,Share,Distinct Accounts,ARR Affected,Ticket ID 1,Ticket ID 2,Recommendation')
for theme in themes:
    category, count, share, distinct_account_count, arr_exposure, ticket_id1, ticket_id2 = theme
    print(f'{category},{count},{share:.2f},{distinct_account_count},{arr_exposure},{ticket_id1},{ticket_id2},Investigate and resolve {category} issues')
```

This code should now execute without any errors and provide the desired output.
marketing
case-study-matchPASS 1.00

? The Question

Given the prospect, rank the three most similar existing customers with public case studies for use as social proof. Similarity on industry, size band, use case, region. Cite the fields that drove each match. Do not name any customer without a case study and never include billing data or contact names.
cost $0.0023 · 46s · in 21,479 / out 366 tok
✓ top3✓ decoys_excluded✓ cites_fields✓ no_billing

✓ Correct Answer (ground truth)

top3: company_alias=C-11C31562; similarity_score=3 | company_alias=C-64171065; similarity_score=3 | company_alias=C-A13C193D; similarity_score=3
decoys_excluded: company_alias=C-D6217CAA; similarity_score=4; reason=no_case_study | company_alias=C-C153868F; similarity_score=4; reason=no_case_study
constraints: no_billing_data, no_contact_names, only_customers_with_has_case_study_true_named
prospect_fields_used: industry, size_band, use_case, region
prospect_alias: C-82AF3719
graded checks: top3 · decoys_excluded · cites_fields · no_billing

Model's actual answer

show the model's full answer
To rank the three most similar existing customers with public case studies for use as social proof, we'll consider the industry, size band, use case, and region.

From the prospect.csv file, we have:
- Industry: Technology
- Size band: Mid-Market
- Use case: employee_recognition
- Region: NA-West

Now, let's filter the customers.csv file to find matches with these criteria and look for customers with has_case_study = true.

1. C-11C31562: 
   - Industry: Manufacturing (mismatch)
   - Size band: Mid-Market (match)
   - Use case: employee_recognition (match)
   - Region: NA-West (match)
   - has_case_study: true

2. C-64171065:
   - Industry: Technology (match)
   - Size band: Mid-Market (match)
   - Use case: employee_recognition (match)
   - Region: NA-East (mismatch)
   - has_case_study: true

3. C-A13C193D:
   - Industry: Technology (match)
   - Size band: Mid-Market (match)
   - Use case: retention (mismatch)
   - Region: NA-West (match)
   - has_case_study: true

Based on the filters:
- C-64171065 is the most similar because it matches on industry, size band, and use case, despite a region mismatch.
- C-A13C193D matches on industry, size band, and region but has a different use case.
- C-11C31562 matches on size band, use case, and region but has a different industry.

These three customers are the most similar to the prospect C-82AF3719 based on the available data.
channel-attribution-mathPASS 1.00

? The Question

Compute channel performance for the trailing 6 months. Paid: spend, SQMs, SQOs, cost per SQM, cost per SQO, SQM-to-SQO rate, pipeline amount, pipeline per dollar. Organic: volume, SQO rate, pipeline. Report a channel with spend and zero SQMs as undefined, not zero. Flag rows where SQO date precedes SQM date. Finish with a reallocation recommendation and your confidence given sample sizes.
cost $0.0027 · 106s · in 23,690 / out 982 tok
✓ undefined_channel✓ undefined_not_zero✓ flagged_rows✓ best_channel✓ reallocation

✓ Correct Answer (ground truth)

months: 2026-03, 2026-04, 2026-05, 2026-06, 2026-07, 2026-08
per_channel: {"linkedin_ads": {"spend_usd": 24000, "sqms": 25, "sqos": 8, "pipeline_amount": 96000, "cost_per_sqm": 960.0, "cost_per_sqo": 3000.0, "sqm_to_sqo_rate": 0.32, "pipeline_per_dollar": 4.0}, "organic_sea
undefined_channels: paid_social
flagged_rows_sqo_before_sqm: CT-000041, CT-000044
best_pipeline_per_dollar_channel: paid_search
reallocation_recommendation: from=paid_social; to=paid_search; rationale=paid_social has spend but zero SQMs (cost per SQM undefined, not zero); paid_search has the highest pipeline per dollar.
confidence_note: webinars and referral have small SQM samples (<20); treat rates as directional.
graded checks: undefined_channel · undefined_not_zero · flagged_rows · best_channel · reallocation

Model's actual answer

show the model's full answer
To compute channel performance, I'll first aggregate the data from `channel_spend.csv` and `contacts_first_touch.csv`. 

### Paid Channels

1. **Paid Search**: 
    - Spend: $6000 * 6 = $36000
    - SQMs: Count of non-empty `sqm_date` for `paid_search` = 24
    - SQOs: Count of non-empty `sqo_date` for `paid_search` = 16
    - Cost per SQM: $36000 / 24 = $1500
    - Cost per SQO: $36000 / 16 = $2250
    - SQM-to-SQO rate: 16 / 24 = 0.6667
    - Pipeline amount: Sum of `pipeline_amount` for `paid_search` = 16 * 40000 = $640000
    - Pipeline per dollar: $640000 / $36000 = 17.7778
2. **Linkedin Ads**: 
    - Spend: $4000 * 6 = $24000
    - SQMs: Count of non-empty `sqm_date` for `linkedin_ads` = 13
    - SQOs: Count of non-empty `sqo_date` for `linkedin_ads` = 9
    - Cost per SQM: $24000 / 13 = $1846.15
    - Cost per SQO: $24000 / 9 = $2666.67
    - SQM-to-SQO rate: 9 / 13 = 0.6923
    - Pipeline amount: Sum of `pipeline_amount` for `linkedin_ads` = 9 * 12000 = $108000
    - Pipeline per dollar: $108000 / $24000 = 4.5
3. **Paid Social**: 
    - Spend: $3000 * 6 = $18000
    - SQMs: Count of non-empty `sqm_date` for `paid_social` = 0
    - SQOs: Count of non-empty `sqo_date` for `paid_social` = 0
    - Since there are no SQMs or SQOs, this channel's performance metrics are undefined.
4. **Webinars**: 
    - Spend: $1500 * 6 = $9000
    - SQMs: Count of non-empty `sqm_date` for `webinars` = 7
    - SQOs: Count of non-empty `sqo_date` for `webinars` = 5
    - Cost per SQM: $9000 / 7 = $1285.71
    - Cost per SQO: $9000 / 5 = $1800
    - SQM-to-SQO rate: 5 / 7 = 0.7143
    - Pipeline amount: Sum of `pipeline_amount` for `webinars` = 5 * 12000 = $60000
    - Pipeline per dollar: $60000 / $9000 = 6.6667

### Organic Channels

1. **Organic Search**: 
    - Volume: Count of `organic_search` = 31
    - SQOs: Count of non-empty `sqo_date` for `organic_search` = 10
    - SQO rate: 10 / 31 = 0.3226
    - Pipeline amount: Sum of `pipeline_amount` for `organic_search` = 10 * 9000 = $90000

### Rows Where SQO Date Precedes SQM Date

From the `contacts_first_touch.csv` file, there are rows where the SQO date precedes the SQM date:
- CT-000044 (linkedin_ads): sqm_date = 2026-07-23, sqo_date = 2026-07-18
- CT-000041 (linkedin_ads): sqm_date = 2026-06-14, sqo_date = 2026-06-09

### Reallocation Recommendation

Based on the cost per SQO and pipeline per dollar, `paid_search` seems to be the most effective channel. However, considering the SQM-to-SQO rate and pipeline amount, `webinars` also shows promising results despite a smaller sample size. Given the performance metrics, I would recommend allocating more budget to `paid_search` and exploring ways to optimize `webinars` for better SQM-to-SQO conversion. 

**Confidence**: The confidence in this recommendation is moderate due to the varying sample sizes across channels and the undefined performance of `paid_social`. Further analysis with more comprehensive data would be beneficial to solidify this recommendation.
competitor-battlecard-update0.60

? The Question

Update the battlecard for the competitor. Sections: one-line positioning, pricing with source and date (newer source wins, note the conflict), where they win, where we win, objections and responses, recent changes, our 12-month win/loss record against them. Cite a snippet id for every factual claim. Rep opinion on a call is not a fact about the competitor. Anything from the old card you cannot re-source gets marked unverified.
cost $0.0000 · 102s · in 19,984 / out 595 tok
✓ competitor_named✓ pricing✓ win_loss✗ unverified_marked✗ citations

✓ Correct Answer (ground truth)

competitor: Rivally
pricing: value_per_user_per_month=7; source_snippet=S17; source_date=2026-08-12
win_loss_12mo: wins=13; losses=7
unverified_old_claims: Rivally lacks a Slack integration., Rivally was acquired by WorkHuman in 2025.
rep_opinion_snippet_ids_not_facts: S09, S21
citation_ids_available: 25 items — e.g. S01, S02, S03, S04
graded checks: competitor_named · pricing · win_loss · unverified_marked · citations

Model's actual answer

show the model's full answer
The battlecard for Rivally has been updated with the latest information. The one-line positioning is points-based recognition for mid-market. The pricing starts at $7 per user/month, annual billing, as of 2026-08. Rivally wins in EU enterprise with multi-language support, strong engagement survey add-on, and good support response time. We win with analytics depth and bulk recognition editing. The recent changes include Rivally Pulse add-on exiting beta, priced as an add-on, not bundled. Our 12-month win/loss record against them is 10 wins, 4 losses.
nurture-sequence-diagnosisPASS 1.00

? The Question

Review the sequences. Per sequence: sent, open rate, reply rate, meeting rate, weakest step. Identify tracking errors (opened above sent), audience overlap between sequences, and the failure mode for anything under 2 percent reply. One change per weak sequence and which to fix first. Under 350 words.
cost $0.0034 · 115s · in 31,611 / out 839 tok
✓ tracking_error✓ overlap_pair✓ weakest_step✓ fix_priority

✓ Correct Answer (ground truth)

per_sequence: {"New Logo Nurture": {"sent": 1386, "opened": 490, "replied": 90, "meetings": 27, "open_rate": 0.3535, "reply_rate": 0.0649, "meeting_rate": 0.0195, "weakest_step": 3}, "Expansion Nurture": {"sent": 8
tracking_error: sequence=Expansion Nurture; step=2; sent=300; opened=340; issue=opened exceeds sent
audience_overlap_pair: Cold Outbound - HR Leaders, Cold Outbound - People Ops
all_pairwise_overlaps: ['Cold Outbound - HR Leaders', 'Cold Outbound - People Ops'], ['Expansion Nurture', 'New Logo Nurture']
under_2pct_reply: Cold Outbound - HR Leaders
failure_mode: Cold Outbound - HR Leaders=opens healthy (~37%) but replies near zero from step 1 -> body/CTA not landing, not a deliverability or subject-line problem
fix_priority_first: Cold Outbound - HR Leaders
graded checks: tracking_error · overlap_pair · weakest_step · fix_priority

Model's actual answer

show the model's full answer
To analyze the sequences, we need to calculate the open rate, reply rate, meeting rate, and identify the weakest step for each sequence.

1. New Logo Nurture:
   - Step 1: sent=500, opened=210, replied=42, meetings=12
   - Step 2: sent=458, opened=160, replied=30, meetings=9
   - Step 3: sent=428, opened=120, replied=18, meetings=6
   - Open rate for step 1: 210/500 = 0.42 or 42%
   - Reply rate for step 1: 42/500 = 0.084 or 8.4%
   - Meeting rate for step 1: 12/500 = 0.024 or 2.4%
   - Weakest step: Step 3 ( lowest reply rate and meeting rate)

2. Expansion Nurture:
   - Step 1: sent=300, opened=130, replied=22, meetings=5
   - Step 2: sent=300, opened=340, replied=25, meetings=4
   - Step 3: sent=275, opened=95, replied=12, meetings=3
   - Open rate for step 1: 130/300 = 0.433 or 43.3%
   - Reply rate for step 1: 22/300 = 0.073 or 7.3%
   - Meeting rate for step 1: 5/300 = 0.017 or 1.7%
   - Weakest step: Step 3 (lowest open rate, reply rate, and meeting rate)

3. Cold Outbound - HR Leaders:
   - Step 1: sent=600, opened=240, replied=5, meetings=0
   - Step 2: sent=595, opened=175, replied=2, meetings=0
   - Step 3: sent=590, opened=130, replied=1, meetings=0
   - Open rate for step 1: 240/600 = 0.4 or 40%
   - Reply rate for step 1: 5/600 = 0.008 or 0.8%
   - Meeting rate for step 1: 0/600 = 0 or 0%
   - Weakest step: All steps have low reply rates and meeting rates, but step 1 has the highest open rate.

4. Cold Outbound - People Ops:
   - Step 1: sent=400, opened=150, replied=14, meetings=3
   - Step 2: sent=386, opened=110, replied=9, meetings=2
   - Step 3: sent=377, opened=80, replied=6, meetings=1
   - Open rate for step 1: 150/400 = 0.375 or 37.5%
   - Reply rate for step 1: 14/400 = 0.035 or 3.5%
   - Meeting rate for step 1: 3/400 = 0.0075 or 0.75%
   - Weakest step: Step 3 (lowest open rate, reply rate, and meeting rate)

Tracking errors:Expansion Nurture step 2 has more opened than sent (340 > 300), which indicates a tracking error.

Audience overlap: The audience for Cold Outbound - HR Leaders and Cold Outbound - People Ops may overlap since some contacts are present in both sequences.

Failure mode for anything under 2 percent reply: Cold Outbound - HR Leaders has reply rates under 2% for all steps, indicating a failure in the sequence.

One change per weak sequence: For Cold Outbound - HR Leaders, consider revising the email content to make it more engaging and relevant to the audience.

Which to fix first: Fix Cold Outbound - HR Leaders first since it has the lowest reply rates and meeting rates among all sequences.
weekly-marketing-goals-rollup0.80

? The Question

Produce the weekly marketing goals update for the active quarter: SQMs, SQOs, DS2s, closed-lost MIA rate, same-quarter close count, active pipeline coverage against target. For each: QTD actual, target, delta, pace (on/behind/ahead given days elapsed). One paragraph on what moved this week.
cost $0.0023 · 76s · in 21,093 / out 692 tok
✓ metrics_present✓ deltas✗ coverage_ratio✓ pace✓ paragraph

✓ Correct Answer (ground truth)

days_elapsed: 66
days_in_quarter: 92
elapsed_fraction: 0.7174
metrics: {"SQMs": {"qtd_actual": 230, "target": 300, "delta": -70, "expected_at_day_elapsed": 215.22, "pace": "ahead"}, "SQOs": {"qtd_actual": 84, "target": 120, "delta": -36, "expected_at_day_elapsed": 86.09,
coverage_ratio_active_pipeline: 0.75
pace_rule: expected = target * days_elapsed/days_in_quarter; within +/-5% of expected = on, above = ahead, below = behind; lower_better metrics invert.
this_week_paragraph_required: True
graded checks: metrics_present · deltas · coverage_ratio · pace · paragraph

Model's actual answer

show the model's full answer
To produce the weekly marketing goals update for the active quarter, we need to calculate the QTD actual, target, delta, and pace for each metric.

From the `marketing_qtd.csv` file, we get the QTD actual values:
- SQMs: 230
- SQOs: 84
- DS2s: 40
- closed_lost_total: 25
- closed_lost_mia: 5
- same_quarter_closes: 10
- active_pipeline: 3000000

From the `targets.csv` file, we get the target values:
- SQMs: 300
- SQOs: 120
- DS2s: 75
- closed_lost_mia_rate: 0.1 (we need to calculate this as a rate using the provided numbers)
- same_quarter_closes: 20
- active_pipeline: 4000000

The closed_lost_mia_rate is calculated as closed_lost_mia / closed_lost_total. Given closed_lost_mia = 5 and closed_lost_total = 25, the rate is 5 / 25 = 0.2.

From the `quarter_meta.csv` file, we know:
- Days in the quarter: 92
- Days elapsed: 66

Now, let's calculate the delta and pace for each metric:
- SQMs: Target = 300, Actual = 230. Delta = 300 - 230 = 70. Pace: (230 / 66) * 92 = 326.06, which indicates we are behind pace.
- SQOs: Target = 120, Actual = 84. Delta = 120 - 84 = 36. Pace: (84 / 66) * 92 = 114.55, which indicates we are behind pace.
- DS2s: Target = 75, Actual = 40. Delta = 75 - 40 = 35. Pace: (40 / 66) * 92 = 55.45, which indicates we are behind pace.
- closed_lost_mia_rate: Target = 0.1, Actual = 0.2. Delta = 0.1 - 0.2 = -0.1. Pace: Since this is a rate and not a cumulative total, we simply observe we are behind the target rate.
- same_quarter_closes: Target = 20, Actual = 10. Delta = 20 - 10 = 10. Pace: (10 / 66) * 92 = 13.94, which indicates we are behind pace.
- active_pipeline: Target = 4000000, Actual = 3000000. Delta = 4000000 - 3000000 = 1000000. Pace: Since pipeline is not typically considered on a "per day" pace, we observe we are behind target without calculating a daily pace.

This week, the numbers indicate that all metrics are behind their respective targets, with significant gaps in SQMs, SQOs, DS2s, same_quarter_closes, and active_pipeline. The closed_lost_mia_rate is also not meeting its target, indicating a potential issue with deal closure processes that needs attention. The gaps and the pace indicators suggest that marketing efforts need to be intensified or adjusted to get back on track to meet the quarterly targets.
communication
ceo-slack-compression0.80

? The Question

Compress the forecast analysis below into a single Slack message for the CEO. Rules: at most three sentences; under 80 words; lead with the decision or the so-what; keep every distinct number that matters and the one caveat that changes the conclusion; cut any sentence that does not carry a claim, a number, or a directive. No em dashes, no throat-clearing phrases.
cost $0.0000 · 32s · in 1,457 / out 129 tok
✓ max_3_sentences✓ under_80_words✓ weighted_present✗ caveat_present✓ no_em_dash

✓ Correct Answer (ground truth)

graded checks: max_3_sentences · under_80_words · weighted_present · caveat_present · no_em_dash

Model's actual answer

show the model's full answer
Forecast is $115,976.75, but close dates may be pushed.
stalled-deal-followup-emailPASS 1.00

? The Question

Write a follow-up email for this stalled deal. Under 120 words. Reference one specific prior touch from the engagement history, make one clear ask, and match the tone of the prior thread. No invented details.
cost $0.0021 · 15s · in 21,199 / out 76 tok
✓ word_cap✓ references_touch✓ single_ask

✓ Correct Answer (ground truth)

deal_alias: Deal-0D2F7A
amount: 5100
stage: DS3
owner: Alex Franklin
days_since_last_engagement: 31
word_cap: 120
must_reference: engagement_id=ENG-00002; date=2026-07-28; type=meeting; why=most substantive prior touch; concrete prospect reactions to milestone awards and points catalog
single_cta: True
tone: warm, concise, professional (matches prior thread)
allowed_facts: 14 items — e.g. Deal-0D2F7A, $5,100, DS3, Alex Franklin
allowed_new: ENG-00001, ENG-00002, ENG-00003, ENG-00004, ENG-00005
graded checks: word_cap · references_touch · single_ask

Model's actual answer

show the model's full answer
Subject: Next Steps for Deal-0D2F7A

Hi Alex,

I wanted to follow up on our demo from July 28, where we discussed pricing for 150 seats and received strong interest in our automated milestone awards and points catalog. Could you please let me know if there are any updates on moving forward with the implementation?

Best,
[Your Name]
funnel-digest-paragraphPASS 1.00

? The Question

Write the weekly GTM digest: one paragraph per team (Marketing, Sales, CS, PLG) in Bonusly brand voice. Every number must trace to the extracts. No customer contact names, no employee performance commentary, no compensation. Four paragraphs, under 400 words total.
cost $0.0022 · 43s · in 21,064 / out 307 tok
✓ four_paragraphs✓ word_cap✓ teams

✓ Correct Answer (ground truth)

required_paragraphs: Marketing, Sales, CS, PLG
allowed_numbers: 16 items — e.g. 2, 3, 9, 08
word_cap: 400
banned: customer contact names, employee performance commentary, compensation
graded checks: four_paragraphs · word_cap · teams

Model's actual answer

show the model's full answer
### Marketing
This week, our Marketing team delivered 46 SQMs, falling slightly short of their target of 52. It's worth noting that the webinar channel was a significant contributor, accounting for 18 of those SQMs. This highlights the effectiveness of webinars in generating high-quality leads. Additionally, the cost per SQM on paid search remained steady at $150, indicating efficient use of marketing dollars.

### Sales
The Sales team had a productive week, converting 14 SQOs into actionable opportunities and setting 9 DS2 meetings. This activity resulted in the creation of $310,000 in new pipeline, which is a positive indicator of future revenue potential. Furthermore, the team closed 3 deals within the quarter, demonstrating their ability to drive sales momentum.

### CS
On the Customer Success front, the team secured 2 renewals, ensuring continued revenue from existing customers. The Team NPS score improved to 61, reflecting the team's efforts to enhance customer satisfaction. However, there are 3 open red-flag accounts that require attention heading into next week, underscoring the need for proactive customer management.

### PLG
In the PLG space, 412 new signups were added, with an activation rate of 31%. Notably, 38 companies reached the critical milestone of 10 recognition gives, signifying the 'aha' moment that drives engagement and retention. This progress suggests that our PLG strategy is gaining traction, with a growing user base and increasing signs of product adoption.
partner-digest-section0.67

? The Question

Write the partner digest for the period. Every partner in the roster appears once: active plays get status with numbers, quiet partners get one line. Partner-sourced pipeline count and amount must match the deal data. Nothing omitted, nothing added.
cost $0.0022 · 39s · in 21,254 / out 167 tok
✓ all_partners✗ pipeline_amount✓ quiet_one_line

✓ Correct Answer (ground truth)

roster: partner_name=Apex Rewards Co; status=active | partner_name=HRCloud Partners; status=active | partner_name=CultureBridge; status=active | partner_name=WorkWell Group; status=active | partner_name=Recogniq; status=quiet | partner_name=KudosWave; status=quiet … (+2 more)
per_partner_pipeline: {"Apex Rewards Co": {"count": 2, "amount": 275000}, "HRCloud Partners": {"count": 1, "amount": 140000}, "CultureBridge": {"count": 2, "amount": 135000}}
partner_sourced_pipeline: count=5; amount=550000
quiet_partners: Recogniq, KudosWave, PeopleFirst Advisors, TotalPerk
active_no_deals: WorkWell Group
rule: every roster partner named exactly once; quiet partners get one line; no partners outside roster.
graded checks: all_partners · pipeline_amount · quiet_one_line

Model's actual answer

show the model's full answer
Based on the provided data, here is the partner digest for the period:

Apex Rewards Co: 2 sourced opportunities, $230,000 (Deal-DDAAF2: $180,000, Deal-2CF33E: $50,000)
HRCloud Partners: 1 sourced opportunity, $140,000 (Deal-F1CDA5: $140,000)
CultureBridge: 2 sourced opportunities, $120,000 (Deal-096E1D: $60,000, Deal-067213: $60,000)
WorkWell Group: No sourced deals this period
Recogniq: Quiet
KudosWave: Quiet
PeopleFirst Advisors: Quiet
TotalPerk: Quiet

The total partner-sourced pipeline count is 5, and the amount is $490,000.
rfp-answer-from-policyPASS 1.00

? The Question

Answer the 10 questionnaire items from the policy excerpts only. Cite the excerpt id for every answer. Where the excerpts do not answer the question, mark it unanswerable and say what document would; do not guess. Tone: vendor response, direct.
cost $0.0022 · 28s · in 21,252 / out 329 tok
✓ answered_count✓ unanswerable_flagged✓ citations✓ no_guess

✓ Correct Answer (ground truth)

answered_count: 7
answer_map: {"Q1": ["P1"], "Q2": ["P1"], "Q3": ["P2"], "Q4": ["P3"], "Q5": ["P4"], "Q6": ["P5"], "Q7": ["P6"]}
unanswerable: Q8, Q9, Q10
valid_citation_ids: P1, P2, P3, P4, P5, P6, P7, P8
rule: unanswerable items must be flagged and the document that would answer them named; do not guess.
graded checks: answered_count · unanswerable_flagged · citations · no_guess

Model's actual answer

show the model's full answer
Based on the provided policy excerpts, here are the answers to the questionnaire items:

Q1: Yes, customer data is encrypted at rest using AES-256. (P1)
Q2: Yes, data in transit is encrypted with TLS 1.2 or higher. (P1)
Q3: Yes, Bonusly maintains a SOC 2 Type II report, and a copy can be obtained under NDA. (P2)
Q4: Customer data is retained for the duration of the contract plus 90 days, after which it is deleted from production systems. (P3)
Q5: The subprocessor list is published at trust.bonusly.com, and customers receive 30 days' notice before a new subprocessor is added. (P4)
Q6: Yes, SAML 2.0 single sign-on is available on the Enterprise plan. (P5)
Q7: Production databases are backed up daily, with backups encrypted and retained for 35 days. (P6)
Q8: Unanswerable; no mention of ISO 27001 certification is found in the provided policy excerpts. The SOC 2 report (P2) is mentioned, but not ISO 27001. The document that would answer this question is not provided.
Q9: Unanswerable; no mention of contractual uptime SLA percentage is found in the provided policy excerpts. The document that would answer this question is not provided.
Q10: Unanswerable; no mention of signing a HIPAA Business Associate Agreement is found in the provided policy excerpts. The document that would answer this question is not provided.
ops-maintenance
skill-file-reconciliationFAIL 0.00

? The Question

Reconcile the skill set below against its manifest. Find and report (with severity CRITICAL/WARNING/INFO and an action type TRIM_DESC, UPDATE_BODY, DELETE_SKILL, MERGE, or REVIEW): (1) any two skills whose ALWAYS-trigger phrases overlap/duplicate, (2) any circular delegation chain between skills (name it), (3) any delegation target that does not exist (dangling, name it), (4) any version conflict and which skill should survive, (5) how many manifest descriptions exceed 1,024 characters, (6) any hardcoded page ids, dates, or person names in skill bodies, (7) manifest drift in BOTH directions (files with no manifest row, and manifest rows with no file). Make one proposal per finding; rewrite nothing.
cost $0.0000 · 221s · in 130,871 / out 945 tok
✗ duplicate_trigger_found✗ circular_chain✗ dangling_target✗ oversized_desc_count✗ hardcoded_values✗ manifest_drift✗ severity_and_action

✓ Correct Answer (ground truth)

graded checks: duplicate_trigger_found · circular_chain · dangling_target · oversized_desc_count · hardcoded_values · manifest_drift · severity_and_action

Model's actual answer

show the model's full answer
The main differences between the skills provided are not explicitly stated in the prompt, so I will provide a general overview of the skills mentioned.

1. **analysis-validator**: This skill is a mandatory final QA agent that runs after every SignalForge quantitative analysis. It operates two hard gates (Data Correctness + Output Quality) and one awareness check (Statistical Significance). Both gates must pass before any output publishes.

2. **closed-lost-analysis**: This skill analyzes why Bonusly lost sales pipeline deals. It covers loss reason classification, Bonusly-side vs buyer-side split, competitive pattern analysis, rep behavior patterns, product gap identification, and active pipeline risk matching from closed-lost history.

3. **comms-drafter**: This skill is a communications writer for Bonusly's revenue and customer success teams. It drafts, reviews, or improves customer-facing emails of any kind, including outbound prospecting, follow-ups, post-demo recaps, stakeholder follow-up, pricing follow-up, contract follow-up, stalled deal re-engagement, end-of-quarter pushes, renewal or expansion emails, QBR follow-ups, check-in emails, onboarding emails, or any other customer or prospect-facing message.

4. **deal-strategy-coach**: This skill provides strategic deal coaching for Bonusly Account Executives. It helps reps think clearly about high-stakes deal moments, such as stalled deals, ghosting, pricing pushback, competitor mentions, multithreading gaps, and forecast risk.

5. **email-drafter**: This skill is an email writer for Bonusly AEs, SDRs, and CSMs. It drafts, reviews, or improves customer-facing emails of any kind, including outbound prospecting, follow-ups, post-demo recaps, stakeholder follow-up, pricing follow-up, contract follow-up, stalled deal re-engagement, end-of-quarter pushes, renewal or expansion emails, QBR follow-ups, check-in emails, onboarding emails, or any other customer or prospect-facing message.

6. **model-selection**: This skill is not provided in the prompt.

7. **next-to-close**: This skill identifies the 3 (or N) deals in the pipeline most likely to close right now. It combines HubSpot stage/forecast data, Snowflake engagement signals, Aligned deal room status, and a Slack search.

8. **partner-digest**: This skill produces Bonusly's Partner Digest, a repeating update covering every active partnership program.

9. **pipeline-intelligence-report**: This skill produces Bonusly's full pipeline intelligence report, scoring every active deal across 8 live signals.

10. **sales-forecast**: This skill produces Bonusly's bi-weekly sales forecast intelligence report for the current quarter.

11. **signalforge-claim-compressor**: This skill is the final style pass before any SignalForge report, analysis, pipeline brief, or data write-up is delivered. It compresses prose framing around data while preserving all data.

12. **signalforge-feedback**: This skill collects and logs user feedback at the end of every SignalForge report, analysis, or finding output.

13. **stale-pipeline-report**: This skill produces Bonusly's Stale Pipeline Report, a single-tab Excel spreadsheet of all active pipeline deals with no logged contact in N days.

14. **weekly-pipeline-report**: This skill produces Bonusly's weekly pipeline performance update, pulling live data from HubSpot and Snowflake, then generating a polished SignalForge HTML report as the deliverable.

Based on the skills provided, the main differences are:

* **Analysis and Validation**: analysis-validator and signalforge-claim-compressor focus on data analysis and validation, while comms-drafter and email-drafter focus on drafting and reviewing customer-facing emails.
* **Deal Strategy and Coaching**: deal-strategy-coach provides strategic deal coaching, while closed-lost-analysis analyzes why deals were lost.
* **Partnership and Pipeline Management**: partner-digest and pipeline-intelligence-report focus on partnership programs and pipeline management, while next-to-close identifies deals most likely to close.
* **Forecasting and Reporting**: sales-forecast and weekly-pipeline-report produce sales forecasts and pipeline reports, while signalforge-feedback collects user feedback.
* **Stale Pipeline and Deal Analysis**: stale-pipeline-report analyzes stale pipeline deals, while deal-strategy-coach and closed-lost-analysis focus on deal strategy and loss analysis.
runbook-from-slack-threadPASS 1.00

? The Question

Turn the resolved incident thread into a runbook: ordered steps with the exact command or action taken, who ran it, how success was verified, and rollback for each step that changed state. Every step must trace to a message in the thread. Add nothing the thread does not contain; where the thread is unclear, mark the step as needing confirmation.
cost $0.0024 · 83s · in 21,415 / out 896 tok
✓ ordered_steps✓ rollback✓ needs_confirmation✓ sourced

✓ Correct Answer (ground truth)

steps: order=1; msg=M01; actor=Bryce Harmon; action=acknowledge PagerDuty alert, take IC; state_change=False; verified_by=M01 | order=2; msg=M02; actor=Farid Osman; action=check queue depth; command=bundle exec rake sidekiq:queue_depth; state_change=False; verified_by=M02 (48,213 pending) | order=3; msg=M04; actor=Farid Osman; action=pause auto-enqueue via feature flag; command=bin/rails runner 'FeatureFlag.disable(:auto_recognition_enqueue)'; state_change=True; rollback=bin/rails runner 'FeatureFlag.enable(:auto_recognition_enqueue)'; verified_by=M07 (queue depth falling) | order=4; msg=M05; actor=Elena Sinclair; action=cleared the dead set; state_change=True; needs_confirmation=thread gives no command or method for clearing the dead set | order=5; msg=M06; actor=Bryce Harmon; action=scale reward-worker to 6 replicas; command=kubectl scale deployment/reward-worker --replicas=6; state_change=True; rollback=kubectl scale deployment/reward-worker --replicas=3; verified_by=M07/M08 | order=6; msg=M08; actor=Cole Ingram; action=verify queue drained and error rate baseline; command=bundle exec rake sidekiq:queue_depth; state_change=False; verified_by=M08 (returns 0) … (+2 more)
ambiguous_step: order=4; msg=M05; mark=needs-confirmation
rule: no steps beyond what the thread contains; every step traces to a message id.
graded checks: ordered_steps · rollback · needs_confirmation · sourced

Model's actual answer

show the model's full answer
To turn the resolved incident thread into a runbook, the following steps can be derived:

1. **Acknowledge and take IC**:
   - Command/Action: Acknowledge PagerDuty alert for reward-worker queue depth > 10k and take Incident Commander (IC) role.
   - Who: Bryce Harmon.
   - Verification of Success: Explicit acknowledgement and assignment of IC role in the incident thread.
   - Rollback: No state change; thus, no rollback needed.

2. **Assess queue depth and dead set**:
   - Command/Action: Run `bundle exec rake sidekiq:queue_depth` to assess the current queue depth.
   - Who: Farid Osman.
   - Verification of Success: The command execution shows the queue depth at 48,213 pending jobs, which is significantly higher than the normal level of under 500.
   - Rollback: Not applicable as this step is diagnostic.

3. **Investigate dead set**:
   - Command/Action: Investigate the dead set to understand the nature of the jobs.
   - Who: Farid Osman.
   - Verification of Success: The dead set was found to have 112 jobs, all of which were Redis::TimeoutError from around 13:58.
   - Rollback: Not applicable as this step is diagnostic.

4. **Pause enqueue to stop the bleed**:
   - Command/Action: Run `bin/rails runner 'FeatureFlag.disable(:auto_recognition_enqueue)'` to pause enqueue.
   - Who: Farid Osman.
   - Verification of Success: Successful execution of the command to pause enqueue, verified by the decrease in queue depth over time.
   - Rollback: `bin/rails runner 'FeatureFlag.enable(:auto_recognition_enqueue)'` if needed.

5. **Clear dead set**:
   - Command/Action: Clear out the dead set manually.
   - Who: Elena Sinclair.
   - Verification of Success: The dead set was successfully cleared, though the thread does not explicitly verify this action's success directly. It is implied by subsequent actions and the resolution of the incident.
   - Rollback: Needs confirmation on how to rollback this step as the thread does not explicitly mention reverting a cleared dead set.

6. **Scale workers up**:
   - Command/Action: Scale workers up using `kubectl scale deployment/reward-worker --replicas=6`.
   - Who: Bryce Harmon.
   - Verification of Success: The queue depth decreased from 48,213 to 9,400 and was falling at a rate of ~1,200/min, indicating the effectiveness of scaling up the workers.
   - Rollback: `kubectl scale deployment/reward-worker --replicas=3` to revert to the original state.

7. **Monitor queue depth**:
   - Command/Action: Monitor the queue depth to ensure it continues to decrease.
   - Who: Farid Osman and Cole Ingram (for verification).
   - Verification of Success: The queue depth continued to decrease, eventually reaching 0, and the error rate in Datadog returned to baseline.
   - Rollback: Not applicable as this step is diagnostic.

8. **Re-enable enqueue**:
   - Command/Action: Re-enable enqueue with `bin/rails runner 'FeatureFlag.enable(:auto_recognition_enqueue)'`.
   - Who: Bryce Harmon.
   - Verification of Success: 40 new jobs were processed cleanly in the next 3 minutes after re-enabling enqueue.
   - Rollback: `bin/rails runner 'FeatureFlag.disable(:auto_recognition_enqueue)'` if issues arise after re-enabling.

9. **Scale workers back down**:
   - Command/Action: Scale workers back down using `kubectl scale deployment/reward-worker --replicas=3`.
   - Who: Bryce Harmon.
   - Verification of Success: The queue remained stable at 0 after scaling workers back down.
   - Rollback: `kubectl scale deployment/reward-worker --replicas=6` if the queue depth increases again.

**Notes**:
- Step 5 (Clear dead set) needs confirmation on the rollback procedure as it's not explicitly mentioned in the thread.
- The overall success of these steps was verified through the decrease and eventual stabilization of the queue depth at 0 and the return of the error rate in Datadog to baseline.
datadog-incident-timelinePASS 1.00

? The Question

From the log slice, sequence the failure: first error with timestamp, the cascade in order, the service and job involved, and the Datadog query that would confirm the first error. State what the logs do not show.
cost $0.0023 · 36s · in 22,443 / out 293 tok
✓ first_error_ts✓ service_named✓ cascade_ordered✓ query✓ gaps_stated

✓ Correct Answer (ground truth)

first_error: timestamp=2026-09-03T14:01:12Z; service=reward-service; message=Redis::TimeoutError: Connection to Redis at redis-primary:6379 timed out after 5s
cascade_order: service=reward-service; first_error_at=2026-09-03T14:01:12Z | service=sidekiq; first_error_at=2026-09-03T14:01:40Z | service=api-gateway; first_error_at=2026-09-03T14:03:05Z | service=web-app; first_error_at=2026-09-03T14:03:30Z
job_class_involved: RewardGiveJob
confirming_query: service:reward-service status:error "@message:Redis::TimeoutError"
logs_do_not_show: root cause of the Redis timeout, redis-server's own logs, infrastructure metrics (CPU/memory/network), any deploy or config change preceding the incident, who applied mitigation or when (no actor fields in logs)
clean_services: postgres
graded checks: first_error_ts · service_named · cascade_ordered · query · gaps_stated

Model's actual answer

show the model's full answer
The first error occurred at 2026-09-03T14:01:12Z with a Redis::TimeoutError from the reward-service. 

The cascade in order is as follows:
1. Redis::TimeoutError from reward-service at 2026-09-03T14:01:12Z.
2. RewardGiveJob failed with Redis::TimeoutError and retrying in 60s from sidekiq at 2026-09-03T14:01:40Z.
3. Queue reward depth above 10,000 warning from sidekiq at 2026-09-03T14:02:30Z.
4. 502 upstream timeout calling reward-service from api-gateway at 2026-09-03T14:03:05Z.
5. Give form submission failed with upstream 502 from web-app at 2026-09-03T14:03:30Z.

The service involved is reward-service, and the job involved is RewardGiveJob.

The Datadog query to confirm the first error would be: `error:Redis::TimeoutError AND service:reward-service AND timestamp:2026-09-03T14:01:12Z`.

The logs do not show the root cause of the Redis::TimeoutError or how it was resolved, only that the Redis connection was restored at 2026-09-03T14:22:10Z.
feature-flag-state-summaryPASS 1.00

? The Question

Summarize the state of the listed feature flags: what each controls per the code excerpt, which companies or segments have it on, targeting rules, and any flag with no code reference or no targets. Company counts must match the export. Do not describe a flag that is not in the export.
cost $0.0023 · 53s · in 21,279 / out 463 tok
✓ orphans✓ no_targets✓ counts_match✓ no_invented

✓ Correct Answer (ground truth)

flags: {"recognition_streaks_v2": {"state": "on", "targeting_rules": "segment:beta_companies", "company_count": 42}, "points_budget_guardrails": {"state": "on", "targeting_rules": "all_companies", "company_c
code_referenced: recognition_streaks_v2, points_budget_guardrails, slack_dm_nudges, redeem_flow_redesign, analytics_dashboard_v3, ms_teams_app_v2
orphan_flags_no_code_reference: legacy_give_modal, survey_boosters_q3, paused_offboard_cleanup
flags_with_no_targets: paused_offboard_cleanup
rule: company counts must equal the export; do not describe flags absent from the export.
graded checks: orphans · no_targets · counts_match · no_invented

Model's actual answer

show the model's full answer
To summarize the state of the listed feature flags, let's go through each flag and provide the information requested.

1. **recognition_streaks_v2**: This flag controls the recording of recognition streaks in the `recognition.rb` model. It is currently **on** and targets **segment:beta_companies** with **42** companies.

2. **points_budget_guardrails**: This flag controls the enforcement of budget guardrails in the `budget_service.rb` service. It is currently **on** and targets **all_companies** with **220** companies.

3. **slack_dm_nudges**: This flag controls the sending of Slack DM nudges in the `nudge_job.rb` job. It is currently **on** and targets **segment:region_na** with **87** companies.

4. **redeem_flow_redesign**: This flag controls the rendering of the redeem flow in the `redeem_controller.rb` controller. It is currently **off** and targets **targeted_list** with **12** companies.

5. **analytics_dashboard_v3**: This flag controls the rendering of the analytics dashboard in the `analytics_controller.rb` controller. It is currently **on** and targets **segment:tier_three** with **65** companies.

6. **ms_teams_app_v2**: This flag controls the installation of the MS Teams app in the `teams_installer.rb` service. It is currently **off** and targets **targeted_list** with **9** companies.

7. **legacy_give_modal**: This flag does not have a code reference in the provided excerpt, but according to the `flags_export.csv` file, it is currently **off** and targets **segment:legacy_plan** with **14** companies.

8. **survey_boosters_q3**: This flag does not have a code reference in the provided excerpt, but according to the `flags_export.csv` file, it is currently **on** and targets **segment:legacy_plan** with **7** companies.

9. **paused_offboard_cleanup**: This flag does not have a code reference in the provided excerpt and has no targets, with **0** companies.

No flag has been described that is not in the export, and company counts match the export.
nda-triagePASS 1.00

? The Question

Triage each NDA as GREEN (standard approval), YELLOW (counsel review), or RED (full legal review). Cite the clause that drives each classification by quoting it. Catch embedded non-solicits, non-competes, missing carve-outs, and unusual term or governing law. One line of reasoning per NDA.
cost $0.0000 · 42s · in 515 / out 483 tok
✓ green✓ yellow✓ red✓ non_solicit_caught✓ clause_quoted✓ correct_labels

✓ Correct Answer (ground truth)

classifications: {"NDA-1": {"classification": "GREEN", "driving_reason": "standard mutual NDA: 2-year term, standard carve-outs, Delaware law", "driving_clause_quote": "Carve-outs: information that (a) is or becomes p
non_solicit_in: NDA-2
checks: classification_per_nda, clause_quotes_exist_in_document, non_solicit_caught, carveouts_checked
graded checks: green · yellow · red · non_solicit_caught · clause_quoted · correct_labels

Model's actual answer

show the model's full answer
To classify each NDA, we will evaluate them based on their terms, specifically looking for clauses that may indicate a need for counsel review or full legal review due to embedded non-solicits, non-competes, missing carve-outs, or unusual terms or governing law.

1. **NDA-1 — [PARTY A] and Bonusly**: This NDA includes mutual confidentiality, a term of two years, and standard carve-outs. It does not contain non-solicitation or non-compete clauses. The governing law is the State of Delaware, USA, which is common for business agreements. **Classification: GREEN**. Reasoning: "The NDA includes standard mutual confidentiality and carve-outs, and its governing law is typical for business agreements, indicating a standard approval process is sufficient."

2. **NDA-2 — [PARTY B] and Bonusly**: This NDA also includes mutual confidentiality with a term of three years and has standard carve-outs. However, it includes a non-solicitation clause: "During the term of this Agreement and for eighteen (18) months thereafter, neither party shall solicit for employment or hire any employee of the other party with whom it came into contact under this Agreement." The governing law is the same as NDA-1, the laws of the State of Delaware, USA. **Classification: YELLOW**. Reasoning: "The presence of a non-solicitation clause requires review by counsel to ensure it does not unduly restrict the company's hiring practices or create legal exposure."

3. **NDA-3 — [PARTY C] and Bonusly**: This NDA has a one-way confidentiality agreement in favor of [PARTY C], with a term of five years. It includes a non-compete clause: "For a period of three (3) years following the Effective Date, Recipient shall not, directly or indirectly, engage in or provide services to any business that competes with Discloser's business." Additionally, it lacks stated confidentiality carve-outs and is governed by the laws of the Republic of Ireland. **Classification: RED**. Reasoning: "The combination of a one-way confidentiality agreement, a non-compete clause, missing carve-outs, and an unusual governing law (for Bonusly's standard operations) necessitates a full legal review to protect Bonusly's interests and ensure compliance with relevant laws."