참고 자료 · 09
RAG 품질: 증거 기반 지식 도우미 평가
코퍼스, 검색, 인용, 답변, 기피 및 드리프트를 개별적으로 측정하여 실제로 수정해야 할 사항을 파악합니다.
업데이트됨 · 16 min
이 가이드가 달성하는 목표
- 오류의 원인이 코퍼스, 검색 또는 모델 중 무엇인지 파악
- 모든 인용을 추적
- 적절한 기권에 대한 보상
- 변경 후 드리프트 감지
빠른 확인
- 참조 소스가 승인되었고 최신 정보인지 확인
- 올바른 구절이 상단에 나타나는지 확인
- 모든 결정적인 주장이 뒷받침되는지 확인
- 어시스턴트가 모름을 표시할 수 있는지 확인
- 민감한 사례는 상위 담당자에게 보고되는지 확인
단계별 방법
- 1
유용한 작업 정의
실제 질문, 질문 변형 및 예상되는 비즈니스 결과를 수집합니다. 모호성, 소스 충돌, 만료된 문서 및 범위 외 요청을 추가합니다.
결과물: 사례 및 위험 분류 체계
- 2
코퍼스 정리
모든 소스에 소유자, 권한, 유효 기간 및 상태를 할당합니다. 중복, 고아 조각 및 출처를 알 수 없는 문서를 제거합니다.
결과물: 코퍼스 등록부.
- 3
검색 평가
최종 문구를 평가하기 전에 필요한 구절이 발견되고 순위가 매겨졌는지 측정합니다. 증거가 없는 쿼리를 검토합니다.
결과물: 적용 범위 및 관련성 측정.
- 4
답변 및 인용 평가
구절의 충실도, 완전성, 제한 사항, 인용-주장 관계 및 모순 표시 기능을 확인합니다.
결과물: 충실도 및 유용성 평가 기준표.
- 5
거부 및 공격 테스트
간접 주입, 금지된 데이터 요청, 악성 소스, 허위 우선순위 문서 및 되돌릴 수 없는 작업 추가. 인적 에스컬레이션 정의.
결과물: 보안 결과 및 안전장치.
- 6
변경 사항 모니터링
코퍼스, 인덱스, 설정, 모델 및 지침 버전 관리. 모든 변경 사항에 대해 안정적인 데이터 세트를 재생하고 불필요한 데이터를 보존하지 않고 실제 피드백을 분석합니다.
결과물: 드리프트 대시보드 및 검토 절차.
이해하고 계산하고 판단하기
AI 답변: 품질, 답변 비율, 답변 보류를 구분하기
테스트 질문 수, 생성 답변 수, 검증된 답변 수를 따로 집계합니다. 이 CIE 교육용 계산 체계는 NIST 점수가 아니며 보편적인 승인 기준도 정하지 않습니다.
여기에는 답변이 기대된 질문만 입력하세요. 정확성, 주장을 실제로 뒷받침하는 인용 구절, 허가된 접근, 충분히 최신인 출처를 검증 기준으로 미리 정합니다. 예상된 답변 보류, 모순, 중대한 오류는 따로 평가합니다.
지표와 근거
| 지표 | 해석 | 필요한 근거 |
|---|---|---|
| 테스트 질문 | 답변이 기대된 질문 집합 | 질문, 기준, 고정된 버전 |
| 생성 답변 | 답변을 받은 질문 | 저장된 답변과 답변 보류 기록 |
| 검증된 답변 | 기준을 충족한 답변 | 판정과 근거 구절 |
가상 예시
가상 예시: 100개 질문, 80개 답변, 72개 검증입니다. 답변 품질은 90%, 답변 비율은 80%, 전체 질문 성공률은 72%입니다. 90%만 표시하면 미응답 질문 20개와 검증되지 않은 답변 8개가 가려집니다.
- 72 / 100 · 검증됨
- 8 / 100 · 검증되지 않음
- 20 / 100 · 미응답
100 = 72 + 8 + 20. 미응답 질문도 표시됩니다. 이 사이트의 측정 데이터가 아닙니다.
계산 규칙
품질 = 검증 / 생성. 답변 비율 = 생성 / 테스트. 성공률 = 검증 / 테스트. 분모가 0이면 비율을 계산할 수 없습니다.
가상 예시
예시 상황
내부 지원 도구는 만료된 절차를 포함한 여러 절차에 대한 답변을 제공합니다. 테스트 세트에는 일반적이고 모호하며 답변할 수 없는 질문이 포함되어 있으며, 각 인용문은 문서 버전과 대조하여 확인됩니다.
결정 및 예상 증거
만료된 출처가 제외되고, 지원되지 않는 답변이 거부되고, 코퍼스 소유자가 확인될 때까지 릴리스가 대기합니다.
관리 지표
| 지표 | 측정 대상 | 첫 번째 조치 |
|---|---|---|
| 검색 범위 | 필요한 구절이 발견된 질문 | 모델 적용 전 코퍼스, 청킹 또는 쿼리 수정 |
| 충실도 | 인용된 출처로 진정으로 뒷받침되는 주장 | 근거 없는 답변 차단 또는 재작성 |
| 유용한 기권 | 증거가 없는 사례를 올바르게 거부하거나 상위 부서로 이관 | 신뢰도 임계값 조정 |
| 회귀 분석 | 동일한 데이터 세트에 대한 버전 간 품질 차이 | 원인이 된 변경 사항 식별 |
일반적인 실수
- 쓰기 유창성만 측정
- 검색 실패와 환각 현상 혼합
- 너무 쉬운 평가 세트 사용
- 비교 없이 여러 구성 요소 변경
자주 묻는 질문
필요한 질문 수는 몇 개인가?
중요한 위험을 포괄하는 대표적인 버전 관리 데이터 세트로 시작하십시오. 인위적인 양보다 다양성과 품질이 더 중요합니다.
자동화된 지표 하나만으로 충분할까요?
아닙니다. 분류 속도는 빨라지지만, 민감하거나 모호한 경우, 또는 전문 분야와 관련된 경우에는 명확한 기준과 사람의 검토가 필요합니다.
모든 대화를 보관해야 할까요?
아닙니다. 목적, 접근 권한, 보관 기간이 명확하게 정의된 필수적인 기록만 보관하십시오. 개선을 위해서는 익명화된 사례를 선호합니다.
RAG: 접근 권한, 인용 및 캐시
이 언어판의 상세 참고 설명은 영어로 제공됩니다.
Evaluate an answer alongside its document rights
A relevant citation can support an accurate answer while revealing a forbidden document. RAG evaluation should separate faithfulness, freshness and authorisation of passages actually supplied to the model.
- Annotate permitted documents for each test identity.
- Remove a group and replay an existing conversation and citation.
- Track incorrect answers, missing evidence and out-of-scope exposure separately.
Explore the RAG access matrix and replay cases →
References consulted on · OWASP · LLM08:2025 Vector and Embedding Weaknesses OWASP · API1:2023 Broken Object Level Authorization
AI: JSON 결과 검증
이 언어판의 상세 참고 설명은 영어로 제공됩니다.
A retrieved reference does not prove the extracted value
A RAG system can find the right document and return schema-valid JSON that misstates a field. Separate retrieval, the output contract and passage reconciliation to locate what needs correction.
- Keep an independent reference for decisive fields.
- Test missing values, contradictions and unavailable documents.
- Retain unexecuted checks as such instead of counting them as passes.
Compare the 14 outputs and their reasons →
Sources reviewed on · IETF · RFC 8259 · JSON Schema · Object reference · JSON Schema · Draft 2020-12 validation · Python 3.12 · json decoder · python-jsonschema · Schema validation · OWASP · LLM05:2025 Improper Output Handling
RAG 관련성과 순위
이 언어판의 상세 참고 설명은 영어로 제공됩니다.
A RAG system can retrieve useful documents and still produce an incorrect answer. Retrieval evaluation therefore needs its own questions, relevance judgments and defined reading depth. This dossier explains four ranking measures without confusing them with answer faithfulness, access permissions or guaranteed business outcomes.
Documentary references: Stanford CS276’s evaluation material from the 2019 archive and NIST TREC’s reciprocal-rank definition. The CIE workshop uses binary judgments and one query at a time. RR@k here is truncated at k; MRR is a mean RR across multiple queries and is not computed by this workshop.
Stanford CS276 · Retrieval evaluation · 2019 course archive · PDF pp. 3, 5–6 · consulted 2026-10-23
Four measures, four different questions
| Measure | Workshop calculation | Useful reading | Condition or limitation |
|---|---|---|---|
| Precision@k | Relevant results in the first k / k | Measures the useful proportion in the inspected window. | Unavailable if any judgment is missing in the first k. |
| Recall@k | Relevant results in the first k / R | R is the number of relevant records in the entire small judged corpus. | If R is unknown, publish a value only when it is defined and identical in every possible case. |
| RR@k | 1 / rank of the first relevant result within k | Equals 0 when no relevant record appears in that fully judged window. | An unjudged record before the first relevant result makes that rank uncertain. |
| nDCG@k | DCG@k / IDCG@k | Compares ranking gain with the ideal order at the same k. | Unavailable if the value changes across possible cases or any case has a zero ideal. |
Explicit convention: judgment rᵢ is 0 or 1; DCG@k = Σᵢ₌₁ᵏ rᵢ / log₂(i + 1). With binary relevance, gain 2ʳⁱ − 1 also equals rᵢ. IDCG@k puts min(R, k) relevant records first using the same discount. nDCG@k = DCG@k / IDCG@k when that ideal is defined and nonzero. Keep gain, discount, depth and conventions with any published score.
NIST TREC · Reciprocal rank definition · Repository snapshot 35cf096ba6d5ae08ca4803c056b31ed61a56a6d4 · consulted 2026-10-23
A fictional six-record corpus with declared judgments
Titles and judgments below are created for this exercise. They are neither real search results nor automatic title-based judgments. 1 means relevant, 0 nonrelevant and ? unjudged. Columns Q1–Q5 correspond to the needs displayed in the workshop.
- Q1 · Prepare a restoration test
- Q2 · Authorise a document read
- Q3 · Check a quantum sensor
- Q4 · Restoration test: C judgment missing
- Q5 · Restoration: B unjudged, other records off-topic
| Fictional record | Q1 | Q2 | Q3 | Q4 | Q5 |
|---|---|---|---|---|---|
| A · Restoration procedure | 1 | 0 | 0 | 1 | 1 |
| B · Recovery budget | 1 | 0 | 0 | 1 | ? |
| C · Restoration test log | 1 | 0 | 0 | ? | 0 |
| D · Account and permission guide | 0 | 1 | 0 | 0 | 0 |
| E · Archiving policy | 0 | 0 | 0 | 0 | 0 |
| F · Publication schedule | 0 | 0 | 0 | 0 | 0 |
문서 순위 워크숍
Choose a need and enter an ordered list of A–F identifiers separated by commas. Change k to inspect only the first k results. The list may omit documents, but each identifier must be unique and k cannot exceed its length. Calculation stays local without collection, import, transmission, storage or export.
This reader queries no search engine, private corpus or AI model. It measures neither answer truth, correct citation nor permission security. Scores concern declared judgments in this small fictional universe. Do not present an exercise value as a benchmark of your system or a universal deployment threshold.
A–F, no duplicates, separated by commas; ASCII spaces allowed. k is an integer from 1 to 6, no greater than list length.
결과
Unjudged and nonrelevant are different states ↓
| Rank | Fictional record | Judgment | Discount | DCG contribution |
|---|
Unjudged and nonrelevant are different states
| Situation | CIE educational convention |
|---|---|
| Missing judgment within k | Precision may vary. Reciprocal rank remains known if the first relevant record is identified before any unjudged record. |
| Missing judgment elsewhere | R becomes a range of possibilities. Do not assume recall and nDCG are always unknown: a value may remain constant, for example when the order is ideal in every case. |
| No relevant record in a fully judged corpus | Precision@k and RR@k are 0. The reader shows Recall@k and nDCG@k as unavailable for this zero-denominator case. |
| CIE publication rule | Explore every binary assignment of missing judgments, at most 64 for six records. Publish a measure only if it is defined and identical in every assignment. These are possibilities, with no probabilities assigned and no actual imputation. |
Ten explained scenarios, available without JavaScript
K01 · Relevant records first
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q1 | A,B,C,D,E,F | 3 | Precision@3 = 1, Recall@3 = 1, RR@3 = 1 and nDCG@3 = 1 in this fully judged corpus. |
K02 · Relevant records after cutoff
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q1 | D,E,F,A,B,C | 3 | All four measures are 0 at k = 3. Relevant records exist but are placed after the inspected window. |
K03 · First relevant record at rank two
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q1 | D,A,E,B,F,C | 3 | Precision@3 and Recall@3 are 1/3; RR@3 is 1/2. nDCG considers position and the ideal order. |
K04 · Relevant records omitted
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q1 | A,D,E,F | 3 | R remains 3 in the corpus even though B and C are absent from the list. Recall must not use only returned results as its denominator. |
K05 · Duplicate identifier
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q1 | A,A,B | 3 | Input rejected: A must not be counted twice. Correct the ranking rather than inflating the relevant count. |
K06 · Unjudged before the first relevant record
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q4 | C,A,D,E,B,F | 3 | C is unjudged. Precision@3, Recall@3, RR@3 and nDCG@3 are unavailable under the declared conventions. |
K07 · Unjudged after the window
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q4 | A,B,D,E,F,C | 3 | Precision@3 is 2/3 and RR@3 is 1. Recall@3 and nDCG@3 remain unavailable because C’s corpus judgment is missing. |
K08 · Need with no relevant record
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q3 | A,B,C,D,E,F | 3 | Precision@3 and RR@3 are 0. Recall and nDCG remain unavailable; this is an explicit convention rather than division by zero. |
K09 · Change reading depth
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q2 | A,D,B,C,E,F | 1 | At k = 1 no relevant record is visible. At k = 2, D appears: precision 1/2, recall 1 and RR@2 = 1/2. |
K10 · Unknown relevance, always ideal ordering
| Need | Supplied order | k | Expected reading |
|---|---|---|---|
| Q5 | A,B,C,D,E,F | 2 | B may be relevant or not. Either way, all relevant records are within the first two ranks and the order stays ideal: recall, RR and nDCG are 1. Precision remains unknown. |
Prepare a reproducible evaluation
| Suggested check | Record to retain |
|---|---|
| Needs | Representative and unanswerable questions; specify the documentary need behind each wording. |
| Corpus | Document and index versions, accessible scope and deletion or revocation rules. |
| Judgments | Relevance rule, assessors, disagreements and unjudged state; do not equate clicks with documentary truth. |
| Protocol | Same k, filters, data and conventions before and after a retrieval change. |
| Regression | Per-query and per-need-family results, gaining and losing cases, hypothesis and checks on new documents. |
| Final answer | Evaluate faithfulness, citations, useful refusals and permissions separately; better retrieval scores do not validate this stage. |
For a reviewable decision, keep the question, ranking, judgments, k and corpus limitations with the score. One average can conceal a regression on a critical need. Error tracking and answer review remain necessary even when the first records are relevant.
Sources, editions and credits
Original CIE explanations, six documents, five needs, judgments and scenarios. Conceptual references: Stanford CS276 and NIST TREC’s reciprocal-rank definition. No source chart, ranking example or code is reproduced. The CIE program and its unavailable-value conventions are not a complete trec_eval implementation.
Stanford CS276 · Retrieval evaluation · 2019 course archive · PDF pp. 3, 5–6 · consulted 2026-10-23
SHA-256 : be38261a8cdbc95551a502504d0a1c146ea453ffd9712243ea067ac8538c1826
NIST TREC · Reciprocal rank definition · Repository snapshot 35cf096ba6d5ae08ca4803c056b31ed61a56a6d4 · consulted 2026-10-23
SHA-256 : 64159909e6e1e4e9e4dd3c569b119fdc90696d0b03cd902e6a9358dcd6e84677
공식 참조
참조는 방법을 뒷받침합니다. 상황에 맞게 검사를 조정하십시오. 이는 인증이 아닙니다. 원본 참조 제목 및 소스 문서는 다른 언어로 작성되었을 수 있습니다.
참고 자료 확인일 .
- NIST — AI Risk Management Framework
- NIST — Generative AI Profile
- OWASP · LLM08:2025 Vector and Embedding Weaknesses
- OWASP · API1:2023 Broken Object Level Authorization
- IETF · RFC 8259
- JSON Schema · Object reference
- JSON Schema · Draft 2020-12 validation
- Python 3.12 · json decoder
- python-jsonschema · Schema validation
- OWASP · LLM05:2025 Improper Output Handling
- Stanford CS276 · Retrieval evaluation
- NIST TREC · Reciprocal rank definition
