ai-recommending
Installation
SKILL.md
ai-recommending
Build an AI recommendation engine using DSPy. The core pattern is two-stage - embedding-based retrieval to get candidate items, then an LM re-ranker that personalizes the ranking using user profile signals and generates human-readable explanations.
Step 1 - Understand the recommendation task
Before writing code, clarify:
- What items are you recommending? Products, articles, support docs, videos, playlists?
- What signals do you have? Purchase history, click history, explicit ratings, topic tags, demographic signals?
- Cold-start scenario? New users with no history need a fallback strategy (popular items, content-based matching).
- How many results? Typically top-5 or top-10. More candidates are retrieved then re-ranked down.
- Latency budget? LM re-ranking adds ~500ms. If you need sub-100ms, do embedding-only retrieval.
Step 2 - Build candidate retrieval
Use embedding similarity to retrieve a broad candidate set before LM re-ranking.