OCG LabTask-Domain Decision System
Search evidence
Live
中文

Domain Decision Packet

engine-specific optimization is the capability threshold between Sonnet and Opus

Back to domains
c

My JOIN query returns duplicate rows and I can't identify why

r

locate@structured_data/sql_repair

C'

Root cause is many-to-many JOIN without DISTINCT. Sonnet 4.6 for common errors. Opus 4.8 for window functions and engine-specific behavior.

Decision Stack

Use

standard SQL errors, high volume, cost-sensitive

claude/sonnet-4.6
Use

complex window functions, performance optimization, engine-specific

claude/opus-4.8
Avoid

engine-specific constraint satisfaction required

openai/gpt-5.5

Cognitive Transitions

model layer
IDRelationActorResultOutput
CT-D7-001locate@query_layerclaude/opus-4.8accepteddistinguishes WHERE vs JOIN vs subquery vs window function; explains engine constraints
CT-D7-002locate@query_layerclaude/sonnet-4.6boundedstrong on common JOIN and WHERE issues; weaker on complex window functions
CT-D7-003rewrite@equivalentclaude/opus-4.8acceptedexplains performance tradeoffs between equivalent rewrites and optimizer behavior
E-D7-001bounded

Opus 4.8 leads on GDPval-AA economically valuable knowledge work including structured data tasks

Anthropic launch, May 2026
E-D7-002uncertain

Sonnet 4.6 sufficient for standard SQL errors in developer preference tests

inferred from Sonnet coding preference data