# SciFact · 설계, 실행, 결과 / 2026-10-10

## Interpretation and warnings

- Primary metric: ndcg@10; operating-point utility: utility.
- Design estimates are not measured execution times. Missing values are not zero.
- No training, tuning or holdout evaluation is performed by this renderer.
- Reference not evaluated on this split.
- Reuse not measured. The 70% target is not claimed.
- BEIR published test qrels; not the original SciFact hidden test.
- Retrieval relevance and structural integrity only; no LLM answer generation or factual verification.
- No statistical significance or independent deployment performance claim.
- Peak RSS is a cumulative process peak, not isolated per-model memory.
- 70% reuse and 60–90 minute drill were not measured.
- Reference models, MCP interoperability, conditional branches and parallel execution were not tested.

## Design only: Retrieval branch / merge

```mermaid
flowchart TD
    n0["retrieve (planned)"]
    n1["integrity (planned)"]
    n0 --> n1
    n2["package (planned)"]
    n0 --> n2
    n3["review (planned)"]
    n2 --> n3
    n1 --> n3
```

## Execution evidence

| Stage | Status | Evidence |
| --- | --- | --- |
| Official data profile | executed | manifest.json / profile.json |
| Baseline freeze | executed | baseline_freeze.json |
| Three validation trials | executed | applied_freeze.json |
| Single held-out comparison | executed | holdout_once.json |
| Branch / merge workflow | executed | 300/300 accepted; 1200 trace events |

## Design estimates (not measured runtime)

| Blueprint | Estimated minutes | Tune policy | Guards |
| --- | --- | --- | --- |
| Retrieval branch / merge | Not measured | Not measured | allowlist, contracts, corpus integrity |

## Model results — partitions kept separate

| Model | Partition | Status | ndcg@10 | Fit seconds | Score seconds | Peak RSS bytes | Frozen |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Lexical | validation | executed | 0.622503 | Not measured | 62.2919 | 79028224 | True |
| BM25 b=0.5 | validation | executed | 0.669929 | Not measured | 1.82805 | 131829760 | True |
| Lexical | holdout | executed | 0.59583 | Not measured | 117.476 | 133468160 | True |
| BM25 b=0.5 | holdout | executed | 0.662459 | Not measured | 3.60668 | 133468160 | True |

## Lexical / validation metrics

| Metric | Value |
| --- | --- |
| mrr@10 | 0.59805 |
| ndcg@10 | 0.622503 |
| recall@10 | 0.746377 |

## BM25 b=0.5 / validation metrics

| Metric | Value |
| --- | --- |
| mrr@10 | 0.643848 |
| ndcg@10 | 0.669929 |
| recall@10 | 0.788302 |

## Lexical / holdout metrics

| Metric | Value |
| --- | --- |
| mrr@10 | 0.555886 |
| ndcg@10 | 0.59583 |
| recall@10 | 0.740111 |

## BM25 b=0.5 / holdout metrics

| Metric | Value |
| --- | --- |
| mrr@10 | 0.630967 |
| ndcg@10 | 0.662459 |
| recall@10 | 0.781778 |

## 실험 설계와 범위

공식 BEIR SciFact corpus 5,183개와 query 1,109개를 사용했다. 공개 train query 809개를 seed 20261010의 SHA-256 순서로 development 648개, validation 161개로 분리했다. 학습할 파라미터가 없는 corpus 검색이므로 development query는 튜닝에 사용하지 않았다. BEIR published test 300개는 baseline과 Applied 설정을 동결한 후 한 번 비교했다. 공식 qrels의 미판정 문서는 평가상 relevant로 세지 않으며 실제로 틀린 근거라고 단정하지 않는다.

Baseline은 기존 lexical search를 그대로 실행했다. Applied는 corpus title + text와 기존 tokenizer를 그대로 사용하고, postings index 및 일반 BM25 길이 정규화만 추가했다. k1=1.2를 고정하고 b=0, 0.5, 0.75의 세 후보를 validation nDCG@10으로 선택했다. 예산은 3 trials / 1,200초이며 실행 중 협력적 시간 확인이다. 테스트 qrels는 후보 선택 함수에 전달하지 않았다. corpus 통계는 검색 대상 전체 corpus에서 계산하며 test query나 relevance로 학습하지 않는다.

## 데이터와 누수 검토

corpus JSONL은 _id/title/text/metadata, query JSONL은 _id/text/metadata, qrels TSV는 query-id/corpus-id/score이다. corpus/query 중복 ID, train-test query ID 중첩, 빈 결합 문서, 동일 결합 문서 중복은 모두 0이었다. 이는 모든 의미적 중복·시간 누수·drift를 배제한 검사가 아니다. metadata 전체의 결측률은 측정하지 않았다. 분류 target imbalance와 MCC threshold는 이 retrieval 사례에 적용하지 않는다. manifest의 원본 SHA-256은 각 단계에서 재검증했다. 원본 파일은 읽기 전용으로 보관하고 corpus·query·개별 ranking은 커밋하지 않았다.

## 실행과 workflow

retrieve 이후 package(JSON object 계약)와 integrity(문서 ID·내용·중복·유한 점수)가 분기하고 review에서 병합한다. ToolRouter, ToolContract, compile_plan, execute_with_recovery와 기존 RAG retrieve_context를 재사용한다. 네 단계는 동기적으로 실행하며 parallel 실행, 조건부 branch, autonomous planner 또는 외부 MCP 검증을 뜻하지 않는다. 300개 실제 query에서 workflow 최종 ID 목록과 별도로 평가한 Applied ranking의 정확한 일치를 검사했다. qrels는 이 workflow에 전달하지 않았다. semantic_answer_verified는 false로 유지했다.

## 실패와 수정

기존 Agent suite는 recovery_workflow.py의 literal newline 문법 오류로 4 import error를 재현했다. 이를 수정한 뒤 발견한 구식 tier assertion도 단일 dependency graph assertion으로 변경했다. Applied 첫 시도는 실제 validation 5개 lexical parity 검사에서 Python 3.12의 부동소수점 sum 차이로 후보 평가 전에 실패했다. 기존 sum 연산과 동일하게 합산하여 수정했고 후보 계획·분할은 유지했다. 실패 시도에는 모델 성능을 기록하지 않았다.

전체 로컬 suite 150개가 통과했다(실제 로그 기준, skip 0). 원격 Agent CI도 통과했다: 원격 Agent CI run 38034171452 . CI는 Agent/도구/통합 demo/SciFact fixture 회귀검사이며 실제 데이터 benchmark를 CI에서 재실행한 것은 아니다.

## 재사용과 후속 작업

범용 변경은 SearchIndex와 기존 workflow 오류 수정이다. 사례별 실행·평가·리포트 코드는 benchmarks/scifact에 둔다. 작업시간별 ImplementationUnit을 계측하지 않았으므로 70% 재사용 목표 달성을 주장하지 않는다. FinQA와 scheduling solver 사례는 별도 검증 대상으로 남는다. 이번 결과는 Search + RAG packaging + Structured Output + workflow의 실제 corpus 검증이며 Optimization Solver의 신규 실데이터 검증은 아니다. CHO-FAM 정규 일정은 변경하지 않는다.

## 출처와 권리

- 공식 다운로드: https://public.ukp.informatik.tu-darmstadt.de/thakur/BEIR/datasets/scifact.zip
- BEIR: https://github.com/beir-cellar/beir
- SciFact 및 LICENSE: https://github.com/allenai/scifact / https://github.com/allenai/scifact/blob/master/LICENSE
- 일반 BM25 정의: https://lucene.apache.org/core/9_12_1/core/org/apache/lucene/search/similarities/BM25Similarity.html

SciFact annotation은 CC BY 4.0, abstracts corpus는 S2ORC ODC-By 1.0, 코드 Apache 2.0이다. BEIR 코드 라이선스를 데이터 라이선스와 동일하게 취급하지 않는다. 공개 페이지에는 원문 corpus나 개별 ranking 없이 aggregate 결과만 제공한다. 해커톤 공식 규정의 코드·라이브러리·AI 사용 허용 여부는 이번 실행으로 확인되지 않았다.

## 동결 후 오류 분석

300개 query에서 nDCG@10 개선 71개, 악화 25개, 동일 204개였다. Recall@10=0인 query는 baseline 71개, Applied 59개였다. 의미적 실패 원인은 수작업으로 판정하지 않았으며 이 분석 후 재튜닝하지 않았다.

## 실측 데이터 자원

ZIP 2,816,079 bytes. Corpus JSONL 8,106,566 bytes, query JSONL 209,731 bytes, train qrels 14,502 bytes, test qrels 5,389 bytes. Profiling 0.055868초 / process peak RSS 32,010,240 bytes. Applied index build 0.531113초, 후보 전체 8.299832초. Holdout process peak RSS 133,468,160 bytes, workflow 3.613143초. 검색시간에는 ranking JSON 저장이 포함되며 holdout BM25 시간에는 사전 index build가 포함되지 않는다.
