refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조

에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Antigravity Agent
2026-07-11 11:05:56 +09:00
parent 6549ead309
commit c24165b8bc
6193 changed files with 1717 additions and 31 deletions
@@ -0,0 +1,158 @@
---
id: wiki-2026-0508-test-time-compute-scaling-추론-시간-
title: Test Time Compute Scaling (추론 시간 계산 스케일링)
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Test-Time Compute, Inference-Time Scaling, Reasoning Models]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [llm, reasoning, scaling, test-time-compute]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: Python
framework: vLLM / Anthropic SDK / OpenAI SDK
---
# Test Time Compute Scaling (추론 시간 계산 스케일링)
## 매 한 줄
> **"매 think longer, get smarter"**. Test-time compute scaling 매 inference 시 더 많은 compute (매 longer chain-of-thought, sampling, search) 로 quality 의 trade off. OpenAI o1 (2024-09) → o3 / DeepSeek-R1 (2025-01) → Claude 4.x extended thinking (2025+) 의 paradigm. 매 training-time scaling laws 의 보완.
## 매 핵심
### 매 두 axes
- **More thinking (long CoT)** — 매 single sample 안 더 긴 reasoning trace. o1, R1, Claude extended thinking.
- **Search / sampling** — 매 multiple samples + verifier (best-of-N, MCTS, beam). AlphaCode, ReST, MathShepherd.
### 매 modern (2025-2026)
- **RL on reasoning** — 매 RLHF + RL on verifiable rewards (math, code) → 매 long CoT 의 emerge. R1-zero, R1.
- **Extended thinking budgets** — 매 Claude 의 `thinking_budget` parameter, OpenAI 의 `reasoning_effort`.
- **Scaling law** — 매 log compute ↔ accuracy linear (Snell 2024, OpenAI o-series chart).
- **Cost shift** — 매 training 1x 의 inference Nx — 매 economics 의 reshape.
### 매 응용
1. Math (AIME, IMO).
2. Code (SWE-bench, competition).
3. Agentic planning (deep tool-use chains).
4. Scientific reasoning (GPQA).
## 💻 패턴
### Claude extended thinking
```python
from anthropic import Anthropic
client = Anthropic()
resp = client.messages.create(
model="claude-opus-4-7",
max_tokens=8000,
thinking={"type": "enabled", "budget_tokens": 16000},
messages=[{"role": "user", "content": "Solve: ..."}],
)
for block in resp.content:
if block.type == "thinking":
print("THINK:", block.thinking[:200])
elif block.type == "text":
print("ANS:", block.text)
```
### OpenAI reasoning effort
```python
from openai import OpenAI
client = OpenAI()
resp = client.responses.create(
model="o3",
input="Prove the AM-GM inequality.",
reasoning={"effort": "high"}, # low / medium / high
)
print(resp.output_text)
```
### Best-of-N + verifier
```python
def best_of_n(prompt, n=8, verifier=None):
samples = [client.messages.create(
model="claude-opus-4-7",
max_tokens=2000,
temperature=0.8,
messages=[{"role": "user", "content": prompt}],
).content[0].text for _ in range(n)]
return max(samples, key=verifier) # 매 verifier: unit test pass count, etc.
```
### Self-consistency (majority vote)
```python
from collections import Counter
answers = [extract_answer(s) for s in samples]
final = Counter(answers).most_common(1)[0][0]
```
### MCTS-style search (sketch)
```python
def expand(node):
children = [llm.continue_from(node.partial, temp=0.9) for _ in range(k)]
return [Node(c, score=verifier(c)) for c in children]
def search(root, depth=4):
frontier = [root]
for _ in range(depth):
candidates = sum((expand(n) for n in frontier), [])
frontier = sorted(candidates, key=lambda n: -n.score)[:beam]
return max(frontier, key=lambda n: n.score)
```
### Budget controller
```python
def adaptive_thinking(prompt, easy_budget=2000, hard_budget=32000):
# 매 difficulty classifier 의 first
diff = client.messages.create(model="claude-haiku-4", ...).content[0].text
budget = hard_budget if "hard" in diff else easy_budget
return client.messages.create(
model="claude-opus-4-7",
thinking={"type": "enabled", "budget_tokens": budget},
messages=[{"role": "user", "content": prompt}],
)
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| Math / code with verifier | RL-trained reasoning model (o3, R1) + search |
| Open-ended reasoning | Extended thinking (Claude 4.x) |
| Latency-critical | Skip — use small fast model |
| Cost-critical batch | Self-consistency 4-8 samples |
| Search exploitable | Best-of-N + verifier |
| Fuzzy quality | Reasoning model > base model |
**기본값**: 매 reasoning model (o3 / Claude extended thinking) 매 hard task, base model 매 easy task — 매 difficulty router 로 split.
## 🔗 Graph
- 부모: [[Scaling-Laws]]
- 변형: [[Chain-of-Thought]] · [[Self-Consistency]] · [[Best-of-N]] · [[MCTS]]
- 응용: [[Code-Generation]]
- Adjacent: [[RLHF]]
## 🤖 LLM 활용
**언제**: 매 hard reasoning task, verifiable output (math/code), agent planning, quality > latency.
**언제 X**: 매 simple lookup / chat — 매 thinking 매 cost waste.
## ❌ 안티패턴
- **Always max thinking budget**: 매 easy task 의 32k thinking 매 cost burn — 매 router 사용.
- **No verifier in best-of-N**: 매 random sample 매 noise — 매 verifier (unit test, math check) 의 essential.
- **Stream thinking to user**: 매 thinking content 매 internal — 매 user UI 에 final text 만.
- **Caching invalidation**: 매 thinking budget 변경 시 cache miss — 매 stable budget 권장.
## 🧪 검증 / 중복
- Verified (OpenAI o1/o3 system cards, DeepSeek-R1 paper 2025-01, Anthropic extended thinking docs, Snell et al. 2024).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — o-series / R1 / Claude extended thinking patterns |