0Pricing
Claude Architect · 강의

충돌하는 데이터와 날짜

충돌을 주석으로 표시하고, 날짜로 겉보기 모순을 해소합니다

충돌하는 데이터와 날짜은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 2번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

When Sources Disagree

In a multi-agent research system, two subagents can return facts that flatly contradict each other. One source says a company has 8,000 employees; another says 12,000. The naive move is to silently pick one and report it as truth.

That is an anti-pattern. The architect-grade answer is to annotate the conflict and preserve both claims with their provenance, so a human (or a downstream model) can adjudicate. This lesson teaches how conflicting data is surfaced, and how dates often resolve apparent contradictions that look irreconcilable at first glance.

Provenance Is the Foundation

You cannot annotate a conflict you cannot trace. Provenance means keeping a claim → source mapping for every fact: the URL or document name, the exact quote, and crucially the publication date.

Without this mapping, a contradiction is just noise. With it, you can show the user precisely where each number came from and when it was published — the raw material for resolving disagreement.

claim = {
    "statement": "Headcount is 12,000",
    "source_name": "Q4 2025 Annual Report",
    "url": "https://example.com/ar-2025.pdf",
    "quote": "As of Dec 31, 2025, we employed 12,000 people.",
    "published": "2026-02-15",
}

Annotate, Don't Arbitrate

The core rule: annotate conflicting stats rather than arbitrarily picking one. When sources disagree, the system should NOT collapse them into a single "winner" by coin-flip, recency-bias, or whichever subagent answered last.

Instead, render both claims side by side, each tagged with its source and date, and explicitly flag that they conflict. The model's job is to surface the disagreement with enough context that a human can decide — not to hide it.

Dates Resolve Apparent Contradictions

Here is the key insight of this lesson: many "contradictions" are not contradictions at all — they are two correct snapshots from different points in time.

"Revenue is $4.2B" (FY2023) and "Revenue is $5.1B" (FY2025) do not conflict. They are both true, on their own dates. Once you attach publication and as-of dates to each claim, the apparent contradiction dissolves into a timeline. This is why the publication date is a first-class field in provenance.

Structured Output for Conflict Records

To make conflict annotation reliable, force the model into a JSON Schema via tool_use. This eliminates syntax errors and enforces required fields. A conflict record should carry every claim with its value, source, and date — plus a resolution note.

Set tool_choice: "any" when you must guarantee structured output (the model must call some tool rather than reply with free text).

tools = [{
    "name": "record_conflict",
    "description": "Record two or more conflicting claims with provenance and a date-based resolution.",
    "input_schema": {
        "type": "object",
        "properties": {
            "metric": {"type": "string"},
            "claims": {"type": "array", "items": {"type": "object"}},
            "resolution": {"type": "string"},
        },
        "required": ["metric", "claims"],
    },
}]
# Force structured output
resp = client.messages.create(
    model="claude-sonnet-4-5",
    max_tokens=1024,
    tools=tools,
    tool_choice={"type": "any"},
    messages=messages,
)

Never Require a Possibly-Absent Field

A subtle but exam-critical schema rule: mark a field required only if it is always present. If a source genuinely lacks a publication date, do NOT make published required — a required-but-absent field pushes the model to fabricate one, which silently destroys your date-based resolution.

In the conflict schema above, metric and claims are required; resolution and each claim's published date are optional. Better an honest null than a hallucinated date.

"properties": {
    "value": {"type": "string"},
    "source_name": {"type": "string"},
    "published": {"type": "string", "description": "ISO date if stated; omit if absent"},
},
"required": ["value", "source_name"]  # published intentionally NOT required

Explicit Criteria Beat Vague Instructions

How you instruct the model matters. "Be careful with conflicting data" is vague and inconsistent. An explicit criterion is far stronger:

  • "Flag two values as conflicting only when they describe the same metric for the same entity."
  • "Before flagging, compare their as-of dates; if the dates differ, treat them as a time series, not a contradiction."

Explicit, testable criteria produce repeatable conflict detection. Vague adjectives do not.

Few-Shot the Date Distinction

Conflict-vs-timeline is exactly the kind of ambiguity where 2–4 targeted few-shot examples shine. The model generalizes from them — it doesn't just memorize the specific numbers.

Give one example of a genuine conflict (same date, different values → flag it) and one example of a date-resolved non-conflict (different dates → report as a timeline). The model learns the decision boundary and applies it to unseen metrics.

examples = [
  {"a": "Rev $4.2B (FY2023)", "b": "Rev $5.1B (FY2025)",
   "verdict": "NOT a conflict — different fiscal years; report as timeline"},
  {"a": "Headcount 8,000 (as of 2026-01)", "b": "Headcount 12,000 (as of 2026-01)",
   "verdict": "CONFLICT — same date, same metric; annotate both with sources"},
]

Keep Dates Verbatim in Case Facts

Long research runs get summarized to fit the context window — and progressive summarization makes numbers, percentages, and dates vague. "Published in early 2026" is useless when the whole resolution hinges on Q1 vs Q3.

The fix: pull transactional facts — exact values, sources, and dates — into a separate "case facts" block kept verbatim outside the summary. Summarize the prose; never summarize the dates you need to resolve conflicts.

case_facts = (
    "VERBATIM — DO NOT SUMMARIZE:\n"
    "- Headcount 8,000 | src: 10-K | published 2025-03-01\n"
    "- Headcount 12,000 | src: Press release | published 2026-02-15\n"
)
# Keep separate from the rolling conversation summary

Self-Correction Detects Discrepancies

To catch conflicts mechanically, have the model extract competing values explicitly rather than emitting a single blended figure. In extraction this is the calculated_total vs stated_total pattern; in research it is value-from-source-A vs value-from-source-B.

Once both are surfaced as distinct fields, a Pydantic-style validator can compare them, detect the mismatch, and trigger the conflict-annotation path — no silent averaging.

from pydantic import BaseModel

class MetricClaim(BaseModel):
    source: str
    value: float
    published: str | None = None

def detect_conflict(a: MetricClaim, b: MetricClaim) -> bool:
    if a.published and b.published and a.published != b.published:
        return False  # date resolves it: timeline, not conflict
    return a.value != b.value

Render by Content Type

Once conflicts are annotated and dates reconciled, present the result so a human can adjudicate fast. Match the rendering to the content type:

  • Tables for financials and competing numeric claims — one row per source, columns for value, source, and date.
  • Prose for news and narrative context.
  • Lists for technical findings.

A side-by-side table makes a same-date conflict jump out, and a date-ordered table reveals a timeline instantly — turning raw provenance into an oversight-ready view.

Quick Check: Two Numbers, Two Dates

A research subagent returns: Source X says ARR is $40M (published Mar 2024); Source Y says ARR is $58M (published Feb 2026). Your aggregator must report this to the user. What is the correct architecture-grade behavior?

Recap: Conflicts & Dates

Key takeaways for conflicting data and provenance:

  • Annotate, don't arbitrate — surface conflicting claims with sources; never silently pick one.
  • Dates resolve apparent contradictions — different as-of dates mean a timeline, not a conflict.
  • Provenance is mandatory — keep claim → source mappings with URL, quote, and publication date.
  • Keep dates verbatim in a separate case-facts block; summarization makes dates vague.
  • Don't require absent fields — an optional null date beats a fabricated one.
  • Render by type — tables for numbers so conflicts and timelines are obvious to the human reviewer.

자주 묻는 질문

“충돌하는 데이터와 날짜” 강의는 무료인가요?

네 — “충돌하는 데이터와 날짜” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

“충돌하는 데이터와 날짜”에서 뭘 배우나요?

충돌을 주석으로 표시하고, 날짜로 겉보기 모순을 해소합니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Claude Architect을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 2번째 강의입니다.

“충돌하는 데이터와 날짜” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 주장과 출처 매핑
  2. 충돌하는 데이터와 날짜
  3. 집계 지표가 실패를 숨기는 경우
  4. 층화 표본 추출 및 보정
← Claude Architect(으)로 돌아가기