Skip to content

🐛 fix(prompts): enforce user perspective in input completion#13619

Merged
arvinxx merged 1 commit intocanaryfrom
fix/input-completion-perspective
Apr 7, 2026
Merged

🐛 fix(prompts): enforce user perspective in input completion#13619
arvinxx merged 1 commit intocanaryfrom
fix/input-completion-perspective

Conversation

@arvinxx
Copy link
Copy Markdown
Member

@arvinxx arvinxx commented Apr 7, 2026

Summary

  • Fix autocomplete prompt generating completions from assistant perspective (e.g., "How can I help you?") instead of user perspective
  • Add explicit perspective constraints with GOOD/BAD examples to the chainInputCompletion system prompt
  • Validated with 7 perspective edge-case scenarios × 2 models (gpt-5.4-mini, groq/llama-4-scout), all 14 runs PASS

Related

  • LOBE-6813 — 自动补全数据飞轮:构建补全质量闭环与用户视角修正
  • BM-11 — Input Completion Benchmark

Test plan

  • perspective-how-can-i: "How can I" no longer completes as "help you today?"
  • perspective-hi: "Hi" completes as user greeting, not assistant greeting
  • perspective-let-me: user perspective maintained
  • perspective-can-you: user request pattern preserved
  • perspective-help-me: user asking for help, not assistant offering
  • perspective-zh-ni-hao: Chinese greeting handled correctly
  • perspective-i-want-to: user intent expressed correctly
  • All original BM-11 scenarios still pass with v3 prompt

🤖 Generated with Claude Code

The autocomplete prompt was generating completions from the AI assistant's
perspective (e.g., "How can I help you?") instead of the user's perspective.
Added explicit perspective constraints with good/bad examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Apr 7, 2026 9:03am

Request Review

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot
Copy link
Copy Markdown
Member

@ONLY-yours - This is a general chat input completion bug fix (enforcing user perspective in autocomplete prompts). Please take a look.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.68%. Comparing base (5231bbb) to head (e0d8be6).
⚠️ Report is 4 commits behind head on canary.

Additional details and impacted files
@@           Coverage Diff           @@
##           canary   #13619   +/-   ##
=======================================
  Coverage   66.68%   66.68%           
=======================================
  Files        1997     1997           
  Lines      165892   165892           
  Branches    19962    19962           
=======================================
  Hits       110628   110628           
  Misses      55140    55140           
  Partials      124      124           
Flag Coverage Δ
app 58.58% <ø> (ø)
database 92.60% <ø> (ø)
packages/agent-runtime 88.98% <ø> (ø)
packages/context-engine 85.51% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 66.68% <ø> (ø)
packages/model-bank 99.85% <ø> (ø)
packages/model-runtime 84.64% <ø> (ø)
packages/prompts 65.80% <0.00%> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 89.74% <ø> (ø)
packages/web-crawler 88.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 67.12% <ø> (ø)
Services 51.45% <ø> (ø)
Server 66.37% <ø> (ø)
Libs 51.05% <ø> (ø)
Utils 91.01% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arvinxx arvinxx merged commit bd8143c into canary Apr 7, 2026
31 checks passed
@arvinxx arvinxx deleted the fix/input-completion-perspective branch April 7, 2026 09:31
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.

2 participants