-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_ppt.py
More file actions
691 lines (573 loc) · 30.8 KB
/
Copy pathbuild_ppt.py
File metadata and controls
691 lines (573 loc) · 30.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
"""Generate presentation PPT — The Conversion Engine."""
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
# === Colors ===
DARK = RGBColor(0x1A, 0x1A, 0x2E)
ACCENT = RGBColor(0x00, 0x7A, 0xCC)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_BG = RGBColor(0xF5, 0xF7, 0xFA)
GREEN = RGBColor(0x27, 0xAE, 0x60)
RED = RGBColor(0xE7, 0x4C, 0x3C)
ORANGE = RGBColor(0xF3, 0x9C, 0x12)
GRAY = RGBColor(0x7F, 0x8C, 0x8D)
def add_bg(slide, color=DARK):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = color
def add_text_box(slide, left, top, width, height, text, size=18, bold=False, color=WHITE, align=PP_ALIGN.LEFT):
txBox = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
tf = txBox.text_frame
tf.word_wrap = True
p = tf.paragraphs[0]
p.text = text
p.font.size = Pt(size)
p.font.bold = bold
p.font.color.rgb = color
p.alignment = align
return tf
def add_bullet_slide(slide, left, top, width, height, items, size=16, color=WHITE, spacing=1.2):
txBox = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
tf = txBox.text_frame
tf.word_wrap = True
for i, item in enumerate(items):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.text = item
p.font.size = Pt(size)
p.font.color.rgb = color
p.space_after = Pt(size * spacing)
return tf
def add_table(slide, left, top, width, height, headers, rows, header_color=ACCENT, text_size=13):
n_rows = len(rows) + 1
n_cols = len(headers)
table_shape = slide.shapes.add_table(n_rows, n_cols, Inches(left), Inches(top), Inches(width), Inches(height))
table = table_shape.table
col_width = width / n_cols
for i in range(n_cols):
table.columns[i].width = Inches(col_width)
# Header row
for i, h in enumerate(headers):
cell = table.cell(0, i)
cell.text = h
for p in cell.text_frame.paragraphs:
p.font.size = Pt(text_size)
p.font.bold = True
p.font.color.rgb = WHITE
cell.fill.solid()
cell.fill.fore_color.rgb = header_color
# Data rows
for r_idx, row in enumerate(rows):
for c_idx, val in enumerate(row):
cell = table.cell(r_idx + 1, c_idx)
cell.text = str(val)
for p in cell.text_frame.paragraphs:
p.font.size = Pt(text_size)
p.font.color.rgb = DARK
cell.fill.solid()
cell.fill.fore_color.rgb = WHITE if r_idx % 2 == 0 else LIGHT_BG
return table
# ============================================================
# SLIDE 1: Title
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6]) # blank
add_bg(slide, DARK)
add_text_box(slide, 1, 1.5, 11, 1.2, "The Conversion Engine", size=44, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text_box(slide, 1, 3.0, 11, 0.8, "Automated Lead Generation and Conversion System", size=24, color=ACCENT, align=PP_ALIGN.CENTER)
add_text_box(slide, 1, 3.8, 11, 0.6, "for Tenacious Consulting & Outsourcing", size=20, color=GRAY, align=PP_ALIGN.CENTER)
add_text_box(slide, 1, 5.5, 11, 0.5, "Shuaib • Week 10 Challenge • April 2026", size=16, color=GRAY, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 2: The Problem
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "The Problem Tenacious Faces", size=36, bold=True, color=DARK)
problems = [
"① Manual prospecting — Partners browse LinkedIn ad-hoc, no systematic market coverage",
"② Inconsistent qualification — Same company gets different pitches depending on who writes",
"③ Slow follow-up — 30–40% of qualified conversations stall because the person can't keep up",
]
add_bullet_slide(slide, 0.8, 1.6, 11, 3.5, problems, size=20, color=DARK)
add_text_box(slide, 0.8, 5.2, 11, 1.0,
"Revenue consequence: Conversations stall not because the prospect said no,\nbut because Tenacious didn't keep up.",
size=18, bold=True, color=RED)
# ============================================================
# SLIDE 3: What We Built
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "What We Built", size=36, bold=True, color=DARK)
items = [
"🔍 Finds prospects from public data (Crunchbase, job posts, layoffs.fyi)",
"🔬 Researches each prospect deeply (AI maturity, competitor gaps, hiring velocity)",
"🎯 Qualifies into 4 ICP segments with confidence scoring + abstention",
"✉️ Writes signal-grounded outreach emails (not generic pitches)",
"💬 Handles multi-turn replies with objection handling",
"📅 Books discovery calls via Cal.com",
"📊 Syncs everything to HubSpot CRM",
]
add_bullet_slide(slide, 0.8, 1.5, 11, 5.0, items, size=20, color=DARK, spacing=1.0)
# ============================================================
# SLIDE 4: Architecture
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "System Architecture", size=36, bold=True, color=DARK)
# Left column — components
left_items = [
"ENRICHMENT PIPELINE",
" • Crunchbase ODM (firmographics + funding)",
" • Layoffs.fyi (CSV parser)",
" • Job Posts (Playwright scraper)",
" • Leadership Detection (CB + web)",
" • AI Maturity Scorer (LLM, 0–3)",
" • Competitor Gap Analysis (LLM)",
]
add_bullet_slide(slide, 0.8, 1.5, 5.5, 4.0, left_items, size=15, color=DARK, spacing=0.6)
# Right column — channels + integrations
right_items = [
"CHANNEL HIERARCHY",
" ① Email (Resend) — primary cold outreach",
" ② SMS (Africa's Talking) — warm leads only",
" ③ Voice (Cal.com) — human-delivered call",
"",
"INTEGRATIONS",
" • HubSpot CRM (contacts, deals, notes)",
" • Langfuse (observability + cost tracking)",
" • Kill switch: LIVE_MODE=false by default",
]
add_bullet_slide(slide, 6.8, 1.5, 5.5, 4.5, right_items, size=15, color=DARK, spacing=0.6)
add_text_box(slide, 0.8, 6.0, 11, 0.6,
"FastAPI Orchestrator • Deployed on Render • All outputs marked draft: true",
size=14, color=GRAY, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 5: Enrichment Pipeline
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Enrichment Pipeline — 6 Signal Sources", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 4.5,
["Signal", "Source", "What It Tells Us"],
[
["Firmographics", "Crunchbase ODM (1,001 companies)", "Industry, size, location, funding history"],
["Funding", "Crunchbase funding rounds", "Series A/B in 180 days → fresh budget, buying window"],
["Layoffs", "layoffs.fyi CSV", "Cost pressure → route to Segment 2 (restructuring)"],
["Job Posts", "Playwright career page scraper", "Hiring velocity, tech stack, AI/ML roles"],
["Leadership", "Crunchbase + web scrape", "New CTO in 90 days → Segment 3 (transition window)"],
["AI Maturity", "LLM scoring (0–3)", "Gates Segment 4, shifts pitch language for Seg 1 & 2"],
])
add_text_box(slide, 0.8, 6.3, 11, 0.5,
"Plus: Competitor Gap Analysis — compares prospect against sector top quartile",
size=16, bold=True, color=ACCENT)
# ============================================================
# SLIDE 6: AI Maturity Scoring
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "AI Maturity Scoring (0–3)", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.4, 5.5, 2.8,
["Score", "Meaning", "Signal Pattern"],
[
["0", "No public AI signal", "Zero HIGH-weight signals"],
["1", "Early signals", "1–2 MEDIUM/LOW, no AI roles"],
["2", "Active engagement", "AI roles OR named AI leadership"],
["3", "Mature AI function", "Multiple HIGH signals across categories"],
], text_size=12)
# Signal weights on the right
weight_items = [
"6 Weighted Signal Inputs:",
"",
"HIGH: AI-adjacent open roles",
"HIGH: Named AI/ML leadership",
"MED: Public GitHub AI activity",
"MED: Executive AI commentary",
"LOW: Modern data/ML stack",
"LOW: Strategic communications",
]
add_bullet_slide(slide, 7.0, 1.4, 5.5, 3.0, weight_items, size=14, color=DARK, spacing=0.5)
add_text_box(slide, 0.8, 4.8, 11, 0.5, "How it changes the pitch:", size=18, bold=True, color=DARK)
pitch_items = [
"• Score < 2 → Segment 4 BLOCKED (hard gate — never pitch AI consulting to non-AI companies)",
"• Score 2–3 + Segment 1: \"Scale your AI team faster than hiring can support\"",
"• Score 0–1 + Segment 1: \"Stand up your first AI function with a dedicated squad\"",
]
add_bullet_slide(slide, 0.8, 5.4, 11, 1.8, pitch_items, size=14, color=DARK, spacing=0.5)
# ============================================================
# Save after first batch
# ============================================================
prs.save("presentation.pptx")
print("Saved slides 1-6 → presentation.pptx")
# ============================================================
# SLIDE 7: ICP Classification
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "ICP Classification — 4 Segments + Abstention", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.4, 11.5, 2.8,
["Priority", "Segment", "Trigger", "Pitch Angle"],
[
["1", "Restructuring", "Layoff + funding", "Cost lever"],
["2", "Leadership Transition", "New CTO/VP Eng < 90 days", "Timing lever"],
["3", "Capability Gap", "AI maturity ≥ 2 + gap signal", "Project consulting"],
["4", "Recently Funded", "Series A/B < 180 days", "Speed lever"],
["—", "Abstain", "Confidence < 0.6", "Generic exploratory"],
], text_size=13)
add_text_box(slide, 0.8, 4.6, 11, 0.5, "Hard Gates (absolute disqualifiers):", size=18, bold=True, color=RED)
gates = [
"• Post-layoff → never Segment 1 (don't tell a company cutting costs they're \"scaling fast\")",
"• AI maturity < 2 → never Segment 4 (don't pitch AI consulting to non-AI companies)",
"• Headcount < 50 → never Segment 3 (too small for vendor reassessment pitch)",
"• Layoff > 40% → never Segment 2 (survival mode, not buying vendor services)",
]
add_bullet_slide(slide, 0.8, 5.2, 11, 2.0, gates, size=14, color=DARK, spacing=0.5)
# ============================================================
# SLIDE 8: Honesty Constraints
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Honesty Constraints — Ask, Don't Assert", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 3.0,
["Flag", "Trigger", "Agent Behavior"],
[
["weak_hiring_velocity", "< 5 open roles", "\"It looks like you may be growing\" not \"You're scaling aggressively\""],
["bench_gap_detected", "Stack not on bench", "Acknowledges gap honestly, doesn't promise capacity"],
["weak_ai_maturity", "Low confidence score", "Asks rather than asserts AI readiness"],
["tech_stack_inferred", "No confirmed stack data", "Frames as inference, not fact"],
], text_size=13)
add_text_box(slide, 0.8, 5.2, 11, 1.0,
"Why: Over-claiming damages Tenacious's reputation with a potential client\nmore than silence would. One wrong \"you recently raised\" is unrecoverable.",
size=18, bold=True, color=DARK)
# ============================================================
# SLIDE 9: Signal-Grounded Outreach
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Signal-Grounded vs Generic Outreach", size=36, bold=True, color=DARK)
add_text_box(slide, 0.8, 1.6, 11, 0.4, "❌ Generic (what most SDR tools produce):", size=18, bold=True, color=RED)
add_text_box(slide, 1.2, 2.2, 10.5, 1.0,
"\"Hi, I noticed your company might benefit from offshore engineering talent...\"",
size=18, color=GRAY)
add_text_box(slide, 0.8, 3.4, 11, 0.4, "✅ Signal-grounded (what our system produces):", size=18, bold=True, color=GREEN)
add_text_box(slide, 1.2, 4.0, 10.5, 1.5,
"\"You closed a $14M Series B in February and your open Python-engineering\nroles tripled since then — the typical bottleneck for teams in that state\nis recruiting capacity, not budget.\"",
size=18, color=DARK)
add_text_box(slide, 0.8, 5.8, 11, 1.0,
"The difference: the second message is verifiable against the prospect's own\npublic record and therefore hard to object to.",
size=18, bold=True, color=ACCENT)
# ============================================================
# SLIDE 10: Conversation Manager
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Multi-Turn Conversation Handling", size=36, bold=True, color=DARK)
# Left: Reply classes
add_text_box(slide, 0.8, 1.4, 5.5, 0.4, "6-Class Reply Classification:", size=18, bold=True, color=DARK)
reply_items = [
"Engaged → Qualify + propose discovery call",
"Curious → 3-sentence context + Cal.com link",
"Hard no → No reply, mark opted out",
"Soft defer → Close gracefully + re-engage date",
"Objection → Pattern-matched handling",
"Ambiguous → Route to human",
]
add_bullet_slide(slide, 0.8, 2.0, 5.5, 3.5, reply_items, size=15, color=DARK, spacing=0.7)
# Right: Human handoff
add_text_box(slide, 7.0, 1.4, 5.5, 0.4, "Mandatory Human Handoff:", size=18, bold=True, color=RED)
handoff_items = [
"Pricing outside public bands",
"Staffing beyond bench summary",
"Client reference requested",
"Regulatory/legal terms mentioned",
"C-level at company > 2,000 headcount",
]
add_bullet_slide(slide, 7.0, 2.0, 5.5, 3.5, handoff_items, size=15, color=DARK, spacing=0.7)
add_text_box(slide, 0.8, 5.8, 11, 0.8,
"The agent handles routine conversations automatically but knows exactly when to step aside.",
size=16, color=GRAY, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 11: Production Stack
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Production Stack — All Verified Running", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 3.5,
["Component", "Status", "Evidence"],
[
["Resend (Email)", "✅ Running", "11 test emails in sink, trace out_email_send_test-001_0"],
["Africa's Talking (SMS)", "✅ Running", "Sandbox active, STOP/HELP handling verified"],
["HubSpot Sandbox", "✅ Connected", "4 sink records: contact, company, note, deal"],
["Cal.com", "✅ Running", "Mock slots generated, bookings to sink"],
["Langfuse", "✅ Running", "22 trace entries, dual-write cloud + local JSONL"],
["Render", "✅ Live", "conversion-engine-2nti.onrender.com/health"],
], text_size=12)
add_text_box(slide, 0.8, 5.8, 11, 0.6,
"Kill switch: LIVE_MODE=false by default — all outbound to local sink, all outputs marked draft: true",
size=16, bold=True, color=ACCENT, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 12: τ²-Bench Baseline
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "τ²-Bench Baseline (Act I)", size=36, bold=True, color=DARK)
add_text_box(slide, 0.8, 1.4, 11, 0.6,
"τ²-Bench: Sierra Research's conversational agent benchmark. Retail domain = closest analog to B2B qualification.",
size=16, color=GRAY)
add_table(slide, 0.8, 2.2, 11.5, 2.5,
["Metric", "Instructor Baseline", "Our Reproduction"],
[
["Model", "gpt-4.1 (direct OpenAI)", "gpt-4.1 (via OpenRouter)"],
["Tasks × Trials", "30 × 5 = 150 sims", "30 × 1 = 30 sims"],
["pass@1", "72.67%", "63.3%"],
["95% CI", "[65.0%, 79.2%]", "[45.5%, 78.1%]"],
["Cost/task", "$0.02", "$0.53"],
], text_size=14)
add_text_box(slide, 0.8, 5.2, 11, 0.8,
"CIs overlap → our reproduction is consistent with the instructor baseline.\nThe gap is primarily due to sample size (30 vs 150 simulations).",
size=16, color=DARK)
# ============================================================
# Save after second batch
# ============================================================
prs.save("presentation.pptx")
print("Saved slides 1-12 → presentation.pptx")
# ============================================================
# SLIDE 13: Adversarial Probes
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Adversarial Probing (Act III) — 33 Probes", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.4, 11.5, 4.0,
["Category", "Probes", "Failures", "Status"],
[
["ICP Misclassification", "5", "0", "✅ All correct"],
["Signal Over-Claiming", "4", "0", "✅ Honesty flags work"],
["Bench Over-Commitment", "3", "0", "✅ Bench gating works"],
["Tone Drift", "5", "1", "⚠️ Subject line > 60 chars"],
["Multi-Thread Leakage", "2", "0", "✅ Threads keyed by prospect_id"],
["Cost Pathology", "3", "1", "⚠️ Max-steps reasoning loop"],
["Dual-Control Coordination", "2", "1", "⚠️ Auth never checked"],
["Scheduling Edge Cases", "3", "1", "⚠️ Timezone labels missing"],
["Signal Reliability", "3", "1", "⚠️ Stale Crunchbase data"],
["Gap Over-Claiming", "3", "1", "⚠️ URL validation gap"],
], text_size=12)
add_text_box(slide, 0.8, 5.8, 11, 0.8,
"Target failure: Max-steps loop — 60% trigger rate, $50K–$190K/mo revenue impact, fixable via prompt engineering",
size=16, bold=True, color=RED, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 14: Mechanism Design
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, DARK)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Mechanism Design (Act IV)", size=36, bold=True, color=WHITE)
add_text_box(slide, 0.8, 1.2, 11, 0.5, "Policy-Aware Agent — 3 rules added to system prompt (~80 extra tokens)", size=20, color=ACCENT)
rules = [
"① AUTHENTICATE FIRST",
" Verify user identity before any account action",
"",
"② CONFIRM BEFORE CHANGES",
" State what you'll do, wait for user approval before executing",
"",
"③ FOLLOW POLICY EXACTLY",
" Apply all policy rules strictly — return windows, refund methods, non-returnable items",
]
add_bullet_slide(slide, 1.2, 2.2, 10, 3.0, rules, size=18, color=WHITE, spacing=0.4)
add_text_box(slide, 0.8, 5.4, 11, 1.2,
"Design iteration: First version was 350 tokens with a 5-step workflow\n→ made gpt-4.1 MORE verbose → 3/5 tasks hit max-steps (worse than baseline)\n→ Refined to 80 tokens with just 3 rules → zero max-steps hits",
size=15, color=GRAY)
# ============================================================
# SLIDE 15: Mechanism Results
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Mechanism Results — 30 Tasks × 1 Trial", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 2.5,
["Metric", "Baseline", "Mechanism", "Instructor Ref"],
[
["pass@1", "63.3%", "70.0%", "72.7%"],
["95% CI", "[45.5%, 78.1%]", "[52.1%, 83.3%]", "[65.0%, 79.2%]"],
["DB match", "—", "100%", "—"],
["Cost/task", "$0.53", "$0.15", "$0.02"],
["p95 latency", "49.1s", "38.0s", "551.6s"],
], text_size=14)
add_text_box(slide, 0.8, 4.5, 11, 0.5, "Delta A: +6.7 percentage points (positive)", size=22, bold=True, color=GREEN)
add_text_box(slide, 0.8, 5.2, 11, 0.8,
"Fisher p = 0.39 (not significant at p<0.05 — needs 5 trials for statistical power)\nMechanism nearly matches instructor reference (70.0% vs 72.7%) while being 72% cheaper per task",
size=16, color=DARK)
# ============================================================
# SLIDE 16: Ablation
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Ablation — Which Rule Matters Most?", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 2.8,
["Variant", "Rules Added", "pass@1", "Key Insight"],
[
["Baseline", "None", "20% (dev)", "Default behavior"],
["Auth-only", "Rule 1", "20% (dev)", "No reward impact alone"],
["Confirm-only", "Rule 2", "40% (dev)", "PRIMARY DRIVER"],
["Full mechanism", "Rules 1+2+3", "70% (held-out)", "Best combined result"],
], text_size=14)
add_text_box(slide, 0.8, 4.8, 11, 1.5,
"Key finding: The confirm-before-write rule is the highest-impact single intervention.\nIt forces the agent to restate parameters before executing, catching errors\nthat would otherwise cause DB mismatch and task failure.",
size=18, color=DARK)
# ============================================================
# SLIDE 17: Latency
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "System Latency (40 Real Interactions)", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 3.0,
["Operation", "p50", "p95", "Bottleneck"],
[
["Enrichment (all 6 signals)", "10.1s", "20.9s", "Playwright + LLM calls"],
["Outreach (LLM email composition)", "13.0s", "43.3s", "OpenRouter inference"],
["Reply handling (classify + respond)", "14.5s", "16.3s", "2 sequential LLM calls"],
["Webhooks (email + SMS)", "0.7s", "0.7s", "Pure HTTP, no LLM"],
["Overall", "11.9s", "20.9s", "—"],
], text_size=14)
add_text_box(slide, 0.8, 5.2, 11, 1.0,
"Acceptable for email-based B2B outreach where prospects expect responses\nwithin hours, not seconds. Bottleneck is LLM inference via OpenRouter.",
size=16, color=GRAY)
# ============================================================
# SLIDE 18: Business Impact
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Projected Business Impact", size=36, bold=True, color=DARK)
add_text_box(slide, 0.8, 1.2, 11, 0.5,
"All numbers from Tenacious seed data (baseline_numbers.md + pricing_sheet.md):",
size=14, color=GRAY)
add_table(slide, 0.8, 1.8, 11.5, 2.5,
["Scenario", "Segments", "Outbound/wk", "Reply rate", "Qualified/mo", "ACV range"],
[
["Pilot", "Segment 1 only", "60", "7–12%", "8–14", "$240K–$720K"],
["Two segments", "Seg 1 + 2", "120", "7–12%", "16–28", "$480K–$1.4M"],
["Full deploy", "All 4", "240", "7–12%", "32–56", "$960K–$2.8M"],
], text_size=14)
add_text_box(slide, 0.8, 4.8, 5.5, 1.5,
"Stalled-thread rate:\n Current manual: 30–40%\n System target: < 15%",
size=16, color=DARK)
add_text_box(slide, 7.0, 4.8, 5.5, 1.5,
"Cost per qualified lead:\n Target: < $5\n Achieved: $0.15/task (τ²-Bench)",
size=16, color=DARK)
# ============================================================
# Save after third batch
# ============================================================
prs.save("presentation.pptx")
print("Saved slides 1-18 → presentation.pptx")
# ============================================================
# SLIDE 19: Pilot Recommendation
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, DARK)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Pilot Recommendation", size=36, bold=True, color=WHITE)
add_text_box(slide, 0.8, 1.3, 11, 0.5, "Start with Segment 1 — Recently Funded Series A/B", size=24, bold=True, color=ACCENT)
pilot_items = [
"Why: Clearest signal (Crunchbase funding data), highest bench match, shortest sales cycle",
"Volume: 60 outbound/week (matches current SDR capacity)",
"Budget: $50/week LLM spend + existing Resend/HubSpot free tiers",
"Duration: 30 days",
"Success metric: Reply rate > 5% (vs 1–3% baseline cold email)",
]
add_bullet_slide(slide, 1.2, 2.2, 10, 3.0, pilot_items, size=18, color=WHITE, spacing=0.8)
add_text_box(slide, 0.8, 5.2, 11, 0.5, "Kill-Switch Triggers — pause the system if:", size=18, bold=True, color=RED)
kill_items = [
"• Reply rate < 2% after 200 sends",
"• Any prospect publicly complains about factual errors",
"• Stalled-thread rate exceeds 40% (worse than manual process)",
]
add_bullet_slide(slide, 1.2, 5.8, 10, 1.5, kill_items, size=15, color=ORANGE, spacing=0.5)
# ============================================================
# SLIDE 20: Known Limitations
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Known Limitations & Risks", size=36, bold=True, color=DARK)
limits = [
"① No real reply-rate data — All prospects are synthetic. The 7–12% projection is from industry benchmarks, not measured.",
"",
"② Signal lossiness — Quietly sophisticated companies (AI in private repos) score 0. Loud-but-shallow companies (AI in marketing only) may score 2.",
"",
"③ Gap brief URL validation — LLM-generated source URLs are not verified. 5% error rate on 1,000 emails = 50 wrong-signal emails.",
"",
"④ Single-trial evaluation — 30 tasks × 1 trial. Statistical significance requires 5+ trials (p=0.39 currently).",
"",
"⑤ Stale Crunchbase data — Frozen snapshot, no freshness check.",
]
add_bullet_slide(slide, 0.8, 1.4, 11, 5.5, limits, size=15, color=DARK, spacing=0.3)
# ============================================================
# SLIDE 21: Next Steps
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Next Steps for Production", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 4.5,
["Priority", "Action", "Impact"],
[
["1", "Run 30 × 5 trial evaluation", "Statistical significance for mechanism"],
["2", "Subject line length constraint (< 60 chars)", "+10–15% email open rate"],
["3", "Crunchbase data freshness check", "Prevent stale-signal errors"],
["4", "Validate gap brief source URLs", "Prevent fabricated claims"],
["5", "Add timezone labels to scheduling", "Prevent missed discovery calls"],
["6", "Register AT production sender ID", "Enable live SMS"],
["7", "30-day pilot on Segment 1", "Real reply-rate measurement"],
], text_size=14)
# ============================================================
# SLIDE 22: Demo Highlights
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Demo Highlights", size=36, bold=True, color=DARK)
demos = [
"1. Enrichment: Company name → full hiring signal brief + competitor gap brief in ~10s",
"2. Classification: Post-layoff + funded company correctly routed to Segment 2 (not Segment 1)",
"3. Outreach: Signal-grounded email with verifiable claims, honesty flags respected",
"4. Reply handling: Objection (\"too expensive\") → pricing pattern → human handoff",
"5. HubSpot: All fields populated, enrichment timestamps, deal created on qualification",
"6. Kill switch: Everything routes to local sink, all outputs marked draft",
"7. τ²-Bench: Mechanism achieves 70% pass@1, nearly matching instructor reference (72.7%)",
]
add_bullet_slide(slide, 0.8, 1.5, 11, 5.0, demos, size=17, color=DARK, spacing=0.8)
# ============================================================
# SLIDE 23: Summary
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, WHITE)
add_text_box(slide, 0.8, 0.4, 11, 0.8, "Summary", size=36, bold=True, color=DARK)
add_table(slide, 0.8, 1.5, 11.5, 4.5,
["What", "Result"],
[
["System", "End-to-end lead gen + conversion pipeline"],
["Enrichment", "6 signal sources + competitor gap analysis"],
["Classification", "4 ICP segments + abstention at < 0.6 confidence"],
["Channels", "Email (primary) → SMS (warm) → Voice (human call)"],
["τ²-Bench baseline", "63.3% pass@1 (reproduces instructor's 72.7%)"],
["Mechanism", "70.0% pass@1 (+6.7% over baseline, Delta A positive)"],
["Probes", "33 adversarial probes, 5 active failures identified"],
["Safety", "Kill switch, draft marking, honesty flags, human handoff"],
], text_size=14)
add_text_box(slide, 0.8, 6.2, 11, 0.6,
"The system is ready for a controlled pilot on Segment 1.",
size=20, bold=True, color=GREEN, align=PP_ALIGN.CENTER)
# ============================================================
# SLIDE 24: Thank You
# ============================================================
slide = prs.slides.add_slide(prs.slide_layouts[6])
add_bg(slide, DARK)
add_text_box(slide, 1, 2.0, 11, 1.2, "Thank You", size=48, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_text_box(slide, 1, 3.5, 11, 0.6, "Live API: conversion-engine-2nti.onrender.com/health", size=18, color=ACCENT, align=PP_ALIGN.CENTER)
add_text_box(slide, 1, 5.0, 11, 0.8,
"Find the lead. Ground the conversation.\nRespect the brand. Ship it.",
size=22, color=GRAY, align=PP_ALIGN.CENTER)
# ============================================================
# Final save
# ============================================================
prs.save("presentation.pptx")
print("✅ All 24 slides saved → presentation.pptx")