README Score 해석 절에 score ↔ retrieval.* 구조 설명 추가: - fusion_score/lexical_score/vector_score/lexical_rank/vector_rank 는 retrieval 내부 (top-level 아님). - single-mode 에서 score==fusion_score==lexical/vector_score 가 같은 값인 것은 정상 (Finding X). search_hit.schema.json score 필드에 score_kind 관계 + single-mode 동일값 이유 설명 추가. search_hit.schema.json retrieval/index_version 설명은 Task 12 커밋에 포함 (같은 hunk). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
2.0 KiB
JSON
50 lines
2.0 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://kb.local/wire/v1/search_hit.schema.json",
|
|
"title": "SearchHit v1",
|
|
"description": "Stub schema — declares the schema_version label and the required top-level fields per design §2.2.",
|
|
"type": "object",
|
|
"required": [
|
|
"schema_version",
|
|
"rank",
|
|
"score",
|
|
"chunk_id",
|
|
"doc_id",
|
|
"doc_path",
|
|
"heading_path",
|
|
"snippet",
|
|
"citation",
|
|
"retrieval",
|
|
"index_version",
|
|
"chunker_version",
|
|
"indexed_at",
|
|
"stale"
|
|
],
|
|
"properties": {
|
|
"schema_version": { "const": "search_hit.v1" },
|
|
"rank": { "type": "integer", "minimum": 1 },
|
|
"score": { "type": "number", "description": "canonical ranking score. 의미는 `score_kind` 가 선언 (rrf/bm25/cosine). single-mode 에서는 fusion 미실행 → `retrieval.fusion_score` 와 동일." },
|
|
"score_kind": {
|
|
"type": "string",
|
|
"enum": ["rrf", "bm25", "cosine"],
|
|
"description": "p9-fb-38: kind of `score` value. `rrf` = RRF normalized [0,1] (hybrid mode); `bm25` = raw BM25 score (lexical-only); `cosine` = raw cosine similarity (vector-only). Older clients that omit this field can treat absence as `rrf` (the historical default)."
|
|
},
|
|
"chunk_id": { "type": "string" },
|
|
"doc_id": { "type": "string" },
|
|
"doc_path": { "type": "string" },
|
|
"heading_path": { "type": "array", "items": { "type": "string" } },
|
|
"section_label": { "type": ["string", "null"] },
|
|
"snippet": { "type": "string" },
|
|
"snippet_full_text": { "type": "boolean" },
|
|
"citation": { "type": "object" },
|
|
"retrieval": { "type": "object" },
|
|
"index_version": { "type": "string" },
|
|
"embedding_model": { "type": ["string", "null"] },
|
|
"chunker_version": { "type": "string" },
|
|
"indexed_at": { "type": "string", "format": "date-time" },
|
|
"stale": { "type": "boolean" },
|
|
"repo": { "type": ["string", "null"] },
|
|
"code_lang": { "type": ["string", "null"] }
|
|
}
|
|
}
|