Feed ranking (anonymous users):
- score * 0.6 + recency * 0.3 + random * 0.1
- Recency uses 72-hour half-life decay
- 10% randomness prevents filter bubbles
Feed ranking (authenticated users):
- score * 0.5 + recency * 0.2 + tag_affinity * 0.2 + random * 0.1
- Tag affinity built from engagement history:
- Upvoted shader tags: +1.0 per tag
- Downvoted: -0.5 per tag
- Dwell >10s: +0.3, >30s: +0.6
- Over-fetches 3x candidates, re-ranks with affinity, returns top N
Similar shaders endpoint:
- GET /api/v1/feed/similar/{shader_id}
- Finds shaders with overlapping tags
- Ranks by tag overlap count, breaks ties by score
- MCP tool: get_similar_shaders
Fix: PostgreSQL text[] && varchar[] type mismatch
- Used type_coerce() instead of cast() for ARRAY overlap operator
- Affects both shaders search-by-tags and similar-by-tags queries
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| auth.py | ||
| desires.py | ||
| feed.py | ||
| generate.py | ||
| health.py | ||
| mcp_keys.py | ||
| payments.py | ||
| shaders.py | ||
| users.py | ||
| votes.py | ||