부상 중인 최상위 기여자 파악하기

우리가 처음 시도한 것은 리더보드였지만, 이는 순수한 양(예: “수정됐어? 수정됐어? 수정됐어? 여보세요?”)을 품질보다 더 높게 평가하는 경향이 있습니다. 네, "품질"을 알고리즘으로 측정하는 것은 어렵지만 명확하게 개선할 수 있는 부분들이 있습니다.

우리가 진정으로 도움이 되는 사용자를 식별하기 위해 시작한 작업은 다음과 같습니다.

다른 사용자가 첫 번째로 답변한 스레드를 찾는 것
-- Goal: Find topics where first non-OP reply is a non-SonarSourcer

WITH

SonarSourcers AS (
    SELECT u.id AS user_id
    FROM groups g
    INNER JOIN group_users gu ON g.id=gu.group_id
    INNER JOIN users u ON u.id = gu.user_id
    WHERE g.name='sonarsourcers'
),

tagged_topics AS (
    SELECT tt.topic_id
    FROM topic_tags tt
    JOIN tags t on t.id=tt.tag_id
    WHERE name = 'me-too'
),


-- find 'regular' topics created by normal users
topic_user AS (
    SELECT id as topic_id, user_id, created_at
    FROM topics
    LEFT JOIN SonarSourcers ss USING(user_id)
    LEFT JOIN tagged_topics tt on topics.id = tt.topic_id
    WHERE ss.user_id IS NULL  -- omit topics started by SonarSourcers
        AND tt.topic_id IS NULL -- omit topics tagged with me-too
        AND user_id > 0  -- omit DiscoBot's 'Welcome' PM/tutorial threads
        AND visible = TRUE
        AND archived = FALSE
        AND archetype='regular'
        AND created_at::DATE > '2023-07-01'
),

-- find first non-OP reply to user topics
min_response AS (
    SELECT p.topic_id, tu.created_at, MIN(post_number) as post_number
    FROM posts p
    JOIN topic_user tu USING(topic_id)
    WHERE p.post_type = 1
        AND p.user_id != tu.user_id
        AND p.post_number > 1
        AND p.hidden = false
        AND p.deleted_at IS NULL
    GROUP BY topic_id, tu.created_at
)

SELECT p.topic_id, p.user_id, mr.created_at::DATE as thread_date
FROM posts p
JOIN min_response mr ON p.topic_id = mr.topic_id AND p.post_number=mr.post_number
LEFT JOIN SonarSourcers ss ON p.user_id=ss.user_id
LEFT JOIN user_badges ub on p.id = ub.post_id and ub.badge_id=110
WHERE ss.user_id IS NULL -- eliminate topics where SonarSourcer is first to respond
    AND ub.user_id IS NULL -- eliminate topics where a badge has already been granted
ORDER BY mr.created_at DESC

해당 스레드를 식별한 후에는 사용자 답변을 평가하고, 답변한 사용자에게 “사용자가 사용자를 돕다” 배지를 수여하거나 스레드에 (스태프가 아닌 사용자에게는 보이지 않는) “me-too” 태그를 붙입니다. (참고로, 이 사용자 응답 보고서는 클라우드 서비스에서 발생한 문제를 빠르게 발견하는 부수적인 장점이 있습니다. :joy:)

그 이후에는 도움이 되는 사용자에게 추가 보상을 제공하고, 이를 통해 해당 사용자를 식별하여 지속적인 관리(nurturing)를 할 수 있게 됩니다.

5개의 좋아요