Skip to content

Commit f5bf23e

Browse files
committed
feat(09-ai-growth): add Prompt 07 RAG explanation + Prompt 08 campaign search engine
1 parent 383c06e commit f5bf23e

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

09-ai-growth/SKILL.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,63 @@ Design the gamification system:
344344
6. Metrics to measure effectiveness (D7 retention, DAU/MAU, streak length)
345345
Return as flow diagram + levels table.
346346
```
347+
348+
---
349+
350+
## Prompt 07 — AI explains how RAG works in campaign targeting *(new)*
351+
352+
**When to use:** Want to understand AI retrieval mechanics to design better campaign targeting, or explain to your team why the personalization engine behaves the way it does.
353+
354+
```
355+
Explain how RAG (Retrieval-Augmented Generation) relates to campaign targeting, using TF-IDF as a concrete example.
356+
357+
My context:
358+
- Campaign pool: [describe size and types — e.g. 20 campaigns: cashback / gamification / referral / urgency]
359+
- User segments: [e.g. new user, active, dormant, high-value]
360+
- Current targeting approach: [e.g. rule-based, manual, ML model]
361+
362+
Explain:
363+
1. What TF-IDF is and how it "matches" users to campaigns (with examples from my campaigns)
364+
2. How RAG differs from TF-IDF — embeddings understand semantics, TF-IDF understands exact terms
365+
3. Why "user who likes games" can match "gamification spin wheel" even without using that word
366+
4. When TF-IDF is enough vs. when you need embeddings / RAG
367+
5. Simplest possible Python code example illustrating the concept (< 30 lines)
368+
```
369+
370+
**Note:** If AI returns 0% score across all campaigns, the query uses terms entirely outside the corpus — review how you describe campaigns or segments.
371+
372+
---
373+
374+
## Prompt 08 — Build a mini campaign search engine in Python *(new)*
375+
376+
**When to use:** Want to build a tool to match user segments with the best-fit campaigns, no ML framework, pure Python only.
377+
378+
```
379+
Help me build a mini campaign search engine in pure Python (no sklearn or ML libraries).
380+
381+
My campaign pool:
382+
[Paste campaign list in this format:
383+
- Name: [campaign name]
384+
Description: [keywords describing mechanic, offer, target — e.g. cashback refund shopping voucher]
385+
]
386+
387+
Segment queries to match:
388+
[e.g.
389+
- New user: "streak check-in points accumulation new users"
390+
- Churned: "winback reactivation lapsed users offer"
391+
- High-value: "vip loyalty premium exclusive tier"
392+
]
393+
394+
Build an engine with:
395+
1. TF-IDF from scratch — explain each step: TF, IDF, score
396+
2. search(query, top_k=3) returning best-fit campaigns with relevance %
397+
3. IDF analysis — which terms are most specific in my pool
398+
4. Edge case: handle when query matches no campaign (score = 0)
399+
5. Comments explaining each code block in marketer language
400+
401+
Expected output: runnable code with results like:
402+
Segment: Churned 60 days
403+
-> Winback churned users 100% ######################
404+
-> VIP loyalty tier 27% ######
405+
```
406+

0 commit comments

Comments
 (0)