Skip to content

Syntactically invalid code blocks in answers - #672

Draft
langsmith-engine-dev[bot] wants to merge 1 commit into
masterfrom
issues-agent/3f261e2c-0f9c-4f35-b9ef-917e0bdc6d65
Draft

Syntactically invalid code blocks in answers#672
langsmith-engine-dev[bot] wants to merge 1 commit into
masterfrom
issues-agent/3f261e2c-0f9c-4f35-b9ef-917e0bdc6d65

Conversation

@langsmith-engine-dev

Copy link
Copy Markdown
Contributor

The agent emits fenced code and configuration snippets that do not parse in the language the fence declares — a python block using a JavaScript // comment token, and a generated langgraph.json whose array is opened with [ and closed with ). The pre-send checklist in the docs agent prompt validates links with a real check_links tool and validates only markdown cosmetics for code (that a block is wrapped in a language fence), so nothing ever verifies that the code inside the fence is parseable or that config snippets are reproduced verbatim from retrieved docs. Every affected answer reads as authoritative and is copy-pasted straight into user code or config, where it fails immediately with a syntax error.

…parse before answers are sent

Links had a real validation tool while code blocks were only checked for
markdown cosmetics, so python blocks with JS comments and langgraph.json
snippets with mismatched brackets shipped to users as copy-pasteable code.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-langchain Ready Ready Preview Aug 12, 2026 6:27pm
chat-langchain-on-mda Ready Ready Preview Aug 12, 2026 6:27pm

Request Review

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