Chuyển đến nội dung
Skillpedia
Học máy41k · #6739

recsys-pipeline-architect

Skill này làm gì

Công cụ này giúp xây dựng các hệ thống chọn những mục tốt nhất cho người dùng, như bảng tin tin tức hoặc gợi ý sản phẩm. Nó chia quy trình này thành các bước rõ ràng.

Khi nào nên dùng

  • ✓Khi bạn xây dựng bảng tin cá nhân hóa.
  • ✓Khi bạn sắp xếp kết quả tìm kiếm.
  • ✓Khi bạn quyết định gửi thông báo nào.

Liên kết skill

https://github.com/wshobson/agents/blob/main/plugins/machine-learning-ops/skills/recsys-pipeline-architect/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wshobson/agents/blob/main/plugins/machine-learning-ops/skills/recsys-pipeline-architect/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn xây dựng một hệ thống gợi ý video cho người dùng dựa trên những gì họ đã xem trước đó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ chia tác vụ thành sáu phần: lấy các mục, bổ sung thông tin, loại bỏ mục không phù hợp, chấm điểm, chọn những mục tốt nhất, và cuối cùng thực hiện thêm các hành động như lưu lại.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Recsys Pipeline Architect

A spec-and-scaffold skill for building composable recommendation, ranking, and feed pipelines. Encodes the six-stage pattern popularized by xAI's open-sourced For You algorithm (Apache 2.0) and applies it to any "top K for (user, context)" problem.

Overview

Most "recommendation systems" in production aren't exotic ML — they're pipelines: fetch candidates from one or more sources, enrich them with metadata, drop the ineligible, score the rest, sort and pick the top K, then fire async side effects. The pattern is universal. The scoring function and the items change; the pipeline shape doesn't.

This skill is an independent reimplementation of the pattern (MIT) — no code copied from the original.

When to Use This Skill

  • Building any system that returns "the top K items for a user/context"
  • Designing or refactoring a personalized feed (content, search results, notifications)
  • Wrapping an LLM/ML scorer in proper pipeline plumbing (sources, hydration, filters, side effects)
  • Adding multi-action prediction with tunable weights (instead of a single relevance score)
  • Building a RAG retrieval reranker (cheap retrieval → expensive rerank)
  • Designing a task prioritizer or alert triage system

The Six-Stage Framework

# Stage Job Parallel?
1 Source Fetch candidates from one or more origins Yes — multiple sources run in parallel
2 Hydrator Enrich candidates with metadata needed for filtering and scoring Yes — independent hydrators run in parallel
3 Filter Drop ineligible candidates (blocked, expired, duplicate, ineligible) Sequential — each filter sees fewer items
4 Scorer Assign each surviving candidate one or more scores Sequential — later scorers see earlier scores
5 Selector Sort by final score, return top K Single op
6 SideEffect Cache, log, emit events, update served-history Async — must never block the response

Why this exact order

  • Sources before hydration: know what candidates exist before paying to enrich
  • Hydration before filtering: many filters need metadata the source didn't provide
  • Filtering before scoring: scoring is the expensive stage — drop the ineligible first
  • Scorer chain (not single scorer): real systems compose ML scoring + diversity reranking + business rules
  • Selector after scoring: keeps scoring deterministic and cacheable
  • SideEffects last and async: side effects must never block the user response

Workflow When Invoked

Walk the user through eight steps:

  1. Clarify the use case (one round, three questions only if missing): items being ranked, input context, language/runtime
  2. Identify the candidate sources (usually in-network + out-of-network, but single-source also valid)
  3. List required hydrations — for each filter and scorer, what data does it need that the source didn't provide?
  4. List the filters — cheap before expensive, universal before user-specific (duplicate, self, age, block/mute, previously-served, eligibility)
  5. Design the scorer chain — primary ML/heuristic → combiner (multi-action with weights) → diversity → business rules
  6. Selector — sort descending by final score, take top K (or stratified mix)
  7. SideEffects — cache served IDs, emit impression events, update counters, log analytics; all fire-and-forget
  8. Generate the scaffold in the user's stack

Key Trade-offs to Surface

Never default silently on these — they are product decisions disguised as technical ones.

1. Single score vs multi-action prediction

  • Single score: train one model to predict relevance. To change behavior → retrain.
  • Multi-action: predict P(action) for many actions (P(read), P(like), P(share), P(skip), P(report)), combine with weights at serving time. To change behavior → change weights. No retraining.

The X For You algorithm uses multi-action with both positive and negative weights. Recommend multi-action when the user expects to tune frequently.

2. Candidate isolation vs joint scoring

  • Isolated: each candidate scored independently. Deterministic, cacheable.
  • Joint: candidates attend to each other during scoring (e.g., transformer over the whole batch). More expressive but non-deterministic across batches.

Default to isolation. Joint only when there's a specific reason (e.g., explicit batch-aware diversity).

…

Câu hỏi thường gặp

Tại sao có thứ tự các bước như vậy?

Thứ tự được thiết kế để hiệu quả: lấy trước, chỉ bổ sung dữ liệu khi cần, loại bỏ những gì không phù hợp trước khi tốn thời gian chấm điểm, và thực hiện các hành động thêm mà không làm chậm phản hồi.

“Multi-action” nghĩa là gì?

Thay vì một điểm “liên quan” duy nhất, hệ thống có thể dự đoán nhiều hành động (như “xem”, “thích”, “bỏ qua”) và bạn điều chỉnh mức quan trọng của từng hành động bằng trọng số, mà không cần huấn luyện lại.

Tôi có thể kết hợp các loại hệ thống khác nhau không?

Có, ý tưởng là các bước như những khối xây dựng bạn có thể ghép lại. Ví dụ, dùng một hệ thống tìm kiếm đơn giản để lấy ứng viên rồi dùng một hệ thống phức tạp hơn để tinh chỉnh lựa chọn.

Chi tiết

Mô tả gốc của tác giả

Design composable recommendation, ranking, and feed pipelines using the six-stage Source→Hydrator→Filter→Scorer→Selector→SideEffect framework popularized by xAI's open-sourced X For You algorithm. Use when building any system that picks "the top K items for a (user, context)" — content feeds, search ranking, RAG rerankers, task prioritizers, notification triage, ad selection.

repo: wshobson/agents

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6739
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự