Repository navigation
feat(models,analytics): GPT-6 and Claude 5.5 families, prompts tuned for both - #54
Merged
Merged
Conversation
…for both The registry resolves each size to the current model of each family: GPT-6 Luna, GPT-6.1 Sol, and GPT-6 Astra for openai, and Claude Haiku, Sonnet, and Opus 5.5 for anthropic, all GLOBAL inference profiles that answered a structured-output call in us-east-1 on 2026-10-12. Each spec carries list pricing, the vendor's long-context step (GPT-6 over 272K input tokens, Haiku 5.5 over 100K), and the family's measured chars-per-token ratio, which the dry-run plans now use in place of a flat 4 (GPT-6 measured 3.3 and Claude 5.5 measured 2.2 on rendered transcripts). The anthropic family is runnable. AnthropicBedrockProvider sends the Messages body with output_config.format json_schema, passes the schema through anthropic.transform_schema because Claude 5.5 rejects numeric and length constraints, reads text blocks after any thinking block, folds a case-variant enum value onto the declared member, maps stop_reason refusal to RefusalError, and retries a max_tokens stop once at one effort step lower. build_structured_provider picks the adapter per family; the retry codes, effort ladder, and client construction both adapters use live in bedrock_common. The four classifier prompts follow the current OpenAI and Anthropic prompting guides: - one provider-neutral text per pipeline that describes the corpus as sessions with an AI coding agent and names no schema mechanism - the transcript or message first, fenced in tags whose id hashes the content so the content cannot close its own fence, then a one-line request - a shared appendix for the offline operating context, the quality bar, and the output format - examples written as JSON the schema accepts, pinned by a test - "Think the problem through before you answer." on the three judgment prompts, and no prompt asks for reasoning in the output - perceived anchors acknowledged_mistake and contradictory_response on the first user turn after the quoted agent text, and keeps one row per mistake across signals
…fault The transcript renderer writes each tool result as a size stub, "[tool_result <id> <ts>] (5120 chars omitted)", with a note when the step holds a failed result. Tool calls keep their name and 400-character argument preview, because the file paths and commands they carry are the classifier's best evidence of the work. What a tool returned stays in the materialized corpus on disk and never reaches Bedrock. ATIF_SQL_SESSION_TEXT_TOOL_RESULT_BODIES=true restores the bodies, clipped at 50K characters each. Tool results made up 88-91% of rendered transcript characters across three local corpora (537 interactive sessions), and they pushed 210 of those sessions past the 800K-character cap, so the model never saw how those sessions ended. With stubs, the mean rendered session drops from about 1.1M characters to 127K in the largest corpus. The classify and transcript-role prompt lines now describe tool calls as the evidence and say a result can appear as only its size.
…e docs tree README, AGENTS.md, the CLI reference, and the site's home page say that analyze runs on GPT-6 by default or Claude 5.5 with ATIF_SQL_LLM_FAMILY=anthropic, and that tool results reach the model as size stubs unless ATIF_SQL_SESSION_TEXT_TOOL_RESULT_BODIES=true. The architecture, behavior, reference, diagram, analysis, and insights pages cover the Anthropic adapter, the shared Bedrock module, the provider factory, long-context pricing, the per-family chars_per_token ratio, and the fenced prompts, and every path:line citation into a file this branch changed points at the line it names. The atif-embed RETRY_CODES comment names the module that defines the atif-models twin. The Vale baseline drops to 269 warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AnthropicBedrockProvider(output_config.formatoninvoke_model), selected withATIF_SQL_LLM_FAMILY=anthropic. The default family staysopenai.ATIF_SQL_SESSION_TEXT_TOOL_RESULT_BODIES=truerestores the bodies.Evidence
mise run checkpasses: 2661 tests passed, 1 skipped, 1 xfailed.scripts/dev/smoke_llm_models.pyreturns a parsed structured output from all six model ids in us-east-1.The perceived anchoring rule changed after the first judge pass: the two judges disagreed on 7 of 9 rows, mostly over which user turn an
acknowledged_mistakebelongs to, because rule 2 and its own example pointed at different turns. With the rule fixed, they agree on 8 of 11.Tool results
Across three local corpora (537 interactive sessions sampled), tool results were 88-91% of rendered transcript characters, and 210 of the 537 sessions hit the 800K-character cap, so the model never saw how they ended. In the 212-session Claude Code corpus the mean rendered session drops from about 1.09M characters to 127K with stubs.
The same 19-session eval, re-run with stubs in place of result bodies:
The sample was drawn from sessions of 8K-120K characters, so it understates the token cut on real corpora and cannot show the truncation benefit.
Notes
RefusalErrorstays terminal. In the eval, one judge call on Opus 5.5 returnedstop_reason: refusalon a security-themed user message, so an anthropic run should expect a few refusal rows on coding transcripts that discuss security work.ATIF_SQL_LLM_SIZE_CONFLICTS=mediumworth a larger trial.