chatbot icon indicating copy to clipboard operation
chatbot copied to clipboard

Fix/improves eliza fallback responses

Open Aman-Baliyan opened this issue 2 months ago • 1 comments

Fixes #57

This pr improves fallback responses when the chatbot cannot answer a question. Replaces unhelpful Eliza responses (e.g., "Why do you ask?", "Does that question interest you?") with clearer messages that acknowledge uncertainty and guide users.

Screenshot 2025-12-04 000457

Updated the Eliza script (src/main/resources/eliza/script) to replace generic fallback phrases with user-friendly messages that: 1.Acknowledge when the bot doesn't have an answer 2.Suggest rephrasing or asking about specific DBpedia topics 3.Use a helpful, conversational tone

Changes Made- Modified src/main/resources/eliza/script: Updated key: what responses to be more helpful and DBpedia-focused Updated key: why responses to acknowledge limitations instead of psychoanalyzing Added key: how responses with helpful fallback messages Improved other generic fallback responses throughout the script

Summary by CodeRabbit

  • Improvements
    • Enhanced conversational responses with topic-specific guidance and improved context awareness.
    • Integrated DBpedia references to help users better formulate queries and access relevant information.
    • Increased transparency regarding system capabilities and limitations in dialogue exchanges.

✏️ Tip: You can customize this high-level summary in your review settings.

Aman-Baliyan avatar Dec 03 '25 19:12 Aman-Baliyan

📝 Walkthrough

Walkthrough

Updated chatbot response templates in a script file, replacing generic reflex responses with DBpedia-aware alternatives across multiple question categories (what, why, how, you) to provide more context-specific guidance and entity-relevant assistance.

Changes

Cohort / File(s) Summary
Chatbot Response Templates
src/main/resources/eliza/script
Replaced generic reflex responses with DBpedia-aware replies for "what" questions; updated "why" and "why can't i" sections with more cautious, capability-limited statements; introduced new "how" block with DBpedia-centered assistance; expanded "you" responses with more nuanced dialogue; increased context-awareness and entity-specific guidance throughout decomposition branches; minor whitespace/formatting adjustments.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify DBpedia response accuracy, completeness, and relevance to user queries
  • Check consistency in tone and messaging style across all updated response categories
  • Confirm responses directly address questions (validating resolution of issue #57)
  • Validate decomposition patterns and control flow remain functionally correct
  • Assess for potential regressions in specific user interaction scenarios

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix/improves eliza fallback responses' is directly related to the main change, which updates Eliza fallback responses from generic psychoanalytic prompts to DBpedia-aware, context-specific guidance.
Linked Issues check ✅ Passed The PR addresses issue #57 by replacing unhelpful Eliza fallback responses with messages that acknowledge uncertainty and guide users toward DBpedia topics, improving the bot's behavior when unable to answer direct factual questions.
Out of Scope Changes check ✅ Passed All changes are scoped to updating Eliza fallback responses in the script file, directly addressing the issue of improving bot responses when answers are unavailable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Dec 03 '25 19:12 coderabbitai[bot]