C.W.K.
Stream
Lesson 04 of 05 · published

Observability: silent decay 감시

~22 min · ops, monitoring

Level 0Scout
0 XP0/41 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

조용히 degrade 가능한 것들

  • Cache hit rate 떨어짐 — 파이프라인 regression, cache key 변경, cache wipe
  • Top-k score 분포 shift — 코퍼스 drift, 임베딩 모델 regression
  • Empty result rate 상승 — 필터 너무 aggressive, score floor 너무 높음, 또는 코퍼스에 갭
  • Latency 슬그머니 상승 — 인덱스 커짐, autovacuum 뒤처짐, GPU 경합
  • LLM 'I don't know' rate 상승 — retrieval 품질 decay 가 LLM 도달

최소 dashboard

시간순 plot 된 카운터 6개가 silent failure 대부분을 유저보다 먼저 잡음:

  1. 분당 query
  2. Median + p95 retrieval latency (stage 별)
  3. Median + p95 top-1 score
  4. Empty-result rate (floor 위 candidate 0)
  5. 임베딩 cache hit rate
  6. LLM 'I don't know' rate

Code

prometheus-client 로 retrieval metric emit·python
from prometheus_client import Histogram, Counter

QUERY_LATENCY = Histogram('retrieval_latency_seconds', 'End-to-end retrieval latency', ['stage'])
TOP1_SCORE    = Histogram('retrieval_top1_score', 'Top-1 similarity score')
EMPTY_RESULT  = Counter('retrieval_empty_total', 'Queries that returned no candidates above floor')

def instrumented_retrieve(question: str, k: int = 5, min_score: float = 0.3):
    with QUERY_LATENCY.labels(stage='embed').time():
        qvec = embed(question)
    with QUERY_LATENCY.labels(stage='search').time():
        results = query(NEW, qvec, k)
    above = [r for r in results if (1 - r['distance']) >= min_score]
    if not above:
        EMPTY_RESULT.inc()
    elif above:
        TOP1_SCORE.observe(1 - above[0]['distance'])
    return above

External links

Exercise

가장 중요한 카운터 4개 (latency, top-1 score, empty-result rate, cache hit rate) 를 retriever 에 wire. 시스템 하루 실행. chart 봐. 새벽 3시에 본인 page 할 단일 숫자 골라 — 그게 본인 SLO.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.