Skip to content

Final answers cut off mid-sentence — max_tokens=300 too low for prompt's response length - #5

Draft
langsmith-engine[bot] wants to merge 1 commit into
devfrom
issues-agent/5e029be0-2827-4e23-84f5-7f96cd577eab
Draft

Final answers cut off mid-sentence — max_tokens=300 too low for prompt's response length#5
langsmith-engine[bot] wants to merge 1 commit into
devfrom
issues-agent/5e029be0-2827-4e23-84f5-7f96cd577eab

Conversation

@langsmith-engine

Copy link
Copy Markdown

The agent's ChatAnthropic is configured with max_tokens=300 while the system prompt routinely produces 600-2000-token answers, causing roughly half of all traces to cut off mid-sentence, mid-list, or mid-code-block. Auto-evaluator response_completeness averages 0.11 across the 48h window. Affects every long-form ask — concept explanations, code walkthroughs, comparisons.

…orm answers finish

The 300-token cap truncated ~half of traces mid-sentence while the system
prompt routinely asks for 600-2000-token answers. Raise to 2048 and soften
the conflicting brevity instruction in the AGENTS.md seed.
@hosted-langserve

hosted-langserve Bot commented Jun 29, 2026

Copy link
Copy Markdown

LangSmith preview deployment is ready.

This preview is ready for the current PR commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants