[PR #1721] [MERGED] fix(docs): improve classify_intent reliability and draft logging #1792

Closed
opened 2026-02-17 17:22:44 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/1721
Author: @yanglikun
Created: 12/3/2025
Status: Merged
Merged: 12/8/2025
Merged by: @lnhsingh

Base: mainHead: patch-7


📝 Commits (2)

  • 0185eef fix(docs): improve classify_intent reliability and draft logging
  • 05ab65a Merge branch 'main' into patch-7

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/oss/langgraph/thinking-in-langgraph.mdx (+2 -2)

📄 Description

  • Switch model from gpt-4 to gpt-5-nano because gpt-4 could not reliably return valid JSON, causing classify_intent to fail.
  • Update logging to avoid printing draft_response before it exists, which previously caused an error in:
    print(f"Draft ready for review: {result['draft_response'][:100]}...")

Overview

This PR updates the example to use gpt-5-nano instead of gpt-4 for the classify_intent step and fixes a logging statement that could raise an exception when draft_response is not yet available.

Type of change

Type: Update existing documentation

Related issues/PRs

  • GitHub issue:
  • Feature PR:
  • Linear issue:
  • Slack thread:

Checklist

  • I have read the [contributing guidelines](README.md)
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

(Internal team members only / optional): Create a preview deployment as necessary using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml)

Additional notes

  • The switch to gpt-5-nano ensures structured JSON output for the classify_intent node.
  • The updated print statement prevents runtime errors when draft_response is missing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/1721 **Author:** [@yanglikun](https://github.com/yanglikun) **Created:** 12/3/2025 **Status:** ✅ Merged **Merged:** 12/8/2025 **Merged by:** [@lnhsingh](https://github.com/lnhsingh) **Base:** `main` ← **Head:** `patch-7` --- ### 📝 Commits (2) - [`0185eef`](https://github.com/langchain-ai/docs/commit/0185eef03aba2fde01544e81a8c3ad5b9165102a) fix(docs): improve classify_intent reliability and draft logging - [`05ab65a`](https://github.com/langchain-ai/docs/commit/05ab65a5ee3fdd9c521d4a136ad1b4c77fd568de) Merge branch 'main' into patch-7 ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langgraph/thinking-in-langgraph.mdx` (+2 -2) </details> ### 📄 Description - Switch model from gpt-4 to gpt-5-nano because gpt-4 could not reliably return valid JSON, causing classify_intent to fail. - Update logging to avoid printing draft_response before it exists, which previously caused an error in: print(f"Draft ready for review: {result['draft_response'][:100]}...") ## Overview This PR updates the example to use `gpt-5-nano` instead of `gpt-4` for the `classify_intent` step and fixes a logging statement that could raise an exception when `draft_response` is not yet available. ## Type of change **Type:** Update existing documentation ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) --> - GitHub issue: - Feature PR: <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [[contributing guidelines](https://sider.ai/zh-CN/README.md)](README.md) - [ ] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed (Internal team members only / optional): Create a preview deployment as necessary using the [[Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml)](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes - The switch to `gpt-5-nano` ensures structured JSON output for the `classify_intent` node. - The updated print statement prevents runtime errors when `draft_response` is missing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-17 17:22:44 -05:00
yindo closed this issue 2026-02-17 17:22:44 -05:00
yindo changed title from [PR #1721] fix(docs): improve classify_intent reliability and draft logging to [PR #1721] [MERGED] fix(docs): improve classify_intent reliability and draft logging 2026-06-05 18:14:56 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#1792