Skip to content

Include simplified llm prompting, tts reformatting, and history#2448

Open
ShaohongZ wants to merge 5 commits intomainfrom
simplify_llm_prompts
Open

Include simplified llm prompting, tts reformatting, and history#2448
ShaohongZ wants to merge 5 commits intomainfrom
simplify_llm_prompts

Conversation

@ShaohongZ
Copy link
Copy Markdown
Contributor

@ShaohongZ ShaohongZ commented Mar 7, 2026

Adds a simplified LLM plugin and action stack for small local models (nemotron-3-nano) used in the greeter robot, along with TTS text normalization improvements and better conversation summary handling.

Overview

[Provide a brief overview of the changes in this pull request.]
(If applicable, linked issue: [ ])

Type of change

  • Bug fix
  • [v] New feature
  • Documentation improvement
  • Bounty issue submission

Changes

Simplified LLM stack:

  • src/llm/plugins/qwen_llm_simplified.py — LLM plugin that builds Actions directly, bypassing convert_function_calls_to_actions to preserve field names for single-field interfaces. Includes text fallback for when the model returns plain text instead of tool calls.
  • src/actions/greeting_conversation_simplified/interface.py — Single-field interface (response: str) with a short docstring optimized for small LLMs.
  • src/actions/greeting_conversation_simplified/connector/greeting_conversation_kokoro_simplified.py — Self-contained connector that hardcodes conversation state values and applies TTS normalization.

TTS text normalization (src/providers/tts_text_utils.py):

  • Added address abbreviation expansion (St→Street, Ave→Avenue, Blvd→Boulevard, etc.)
  • Added directional abbreviation expansion (N/S/E/W → North/South/East/West)
  • Added time reformatting ("11:00" → "11", "3:30" → "3 30")
  • Added non-ASCII character stripping to prevent TTS issues with non-English text

Improved history summarization handling:

  • Added summary detection filters in qwen_llm_simplified.py to prevent the model from speaking conversation summaries back to users.

Fuser fix:

  • Included filters for low confidence knowledge base retrievals
  • Fixed question_prompt undefined variable error when AVAILABLE ACTIONS section is empty
  • Added logic to skip LAWS and AVAILABLE ACTIONS sections when their content is empty

…ed history summarisation for the small llm
@ShaohongZ ShaohongZ requested review from a team as code owners March 7, 2026 02:35
@github-actions github-actions bot added robotics Robotics code changes python Python code labels Mar 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 51.20773% with 101 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/llm/plugins/qwen_llm_simplified.py 21.42% 88 Missing ⚠️
src/providers/tts_text_utils.py 0.00% 11 Missing ⚠️
src/providers/llm_history_manager_simplified.py 96.96% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ShaohongZ ShaohongZ requested a review from a team as a code owner March 9, 2026 17:44
@github-actions github-actions bot added the config Configuration files label Mar 9, 2026
@github-actions github-actions bot added the tests Test files label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration files python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant