Skip to content

시맨틱 큐레이션 (Catalog)

규칙만이 아니라 유사도로 어떤 에이전트 트레이스를 검토할지 찾아냅니다. 항목에 대한 임베딩 색인이 유사도 검색(“이 실패와 비슷한 트레이스 찾기”)과 동적 slice를 지원하며, slice는 저장된 시맨틱·메타데이터 필터로서 새로 일치하는 트레이스를 자동으로 포함하고 데이터셋으로 큐레이션합니다.

시맨틱 큐레이션은 규칙이나 불확실성만이 아니라 유사도로 무엇을 검토할지 찾도록 돕습니다. 항목에 대한 임베딩 색인이 유사도 검색(“이 실패와 비슷한 트레이스 찾기”)과 동적 slice를 지원합니다. slice는 저장된 시맨틱 필터와 메타데이터 필터로, 새로 일치하는 트레이스를 자동으로 포함하고 데이터셋으로 큐레이션합니다. 규칙 기반 분류와 모델 불확실성 기반 능동 학습을 보완합니다.

활성화

yaml
curation:
  enabled: true
  model_name: all-MiniLM-L6-v2   # any sentence-transformers model
  embed_on_ingest: false          # index runtime-ingested traces on arrival
  text_key: task_description      # which field to embed

임베딩은 지연 로딩됩니다. sentence-transformers는 색인을 만들 때만 임포트되고 시작 시에는 전혀 임포트되지 않으므로 부팅이 빠릅니다. pip install sentence-transformers로 설치하거나 직접 만든 임베더를 연결하세요. 활성화하면 관리자 대시보드에 Catalog 링크가 표시됩니다.

색인 구축, 검색, slice

bash
# Build the index over current items
curl -X POST localhost:8000/admin/catalog/api/build -H "X-API-Key: <key>"
 
# Search by text query (or by an anchor instance to find neighbours)
curl -X POST localhost:8000/admin/catalog/api/search -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" -d '{"query": "tool call failed", "top_k": 10, "threshold": 0.3}'

slice는 현재 색인에 대해 요청 시점에 해석되는 저장된 필터입니다. 그래서 저장한 뒤에 수집된 트레이스도 조건에 맞으면 자동으로 포함됩니다. slice는 선택적인 시맨틱 이웃 범위와 메타데이터 필터를 결합합니다.

bash
curl -X POST localhost:8000/admin/catalog/api/slices -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"name": "tool-errors", "query": "tool call failed", "threshold": 0.3,
       "metadata_filter": [{"field": "metadata.outcome", "equals": "error"}]}'
 
# Curate the resolved instances straight into a dataset
curl -X POST localhost:8000/admin/catalog/api/slices/tool-errors/to_dataset \
  -H "X-API-Key: <key>" -H "Content-Type: application/json" \
  -d '{"dataset": "tool-errors-to-fix"}'

관련 항목