Skip to content

feat: Add confirmation question flow and multilingual support to research agent #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kahirokunn
Copy link
Contributor

Overview

This PR introduces two major features that significantly enhance the research agent's capabilities:

  1. Confirmation Question Flow: An interactive confirmation step to clarify user intent
  2. Multilingual Support: Automatic language detection and response generation in the user's language

Changes

🎯 Confirmation Question Flow

The agent can now ask clarifying questions before starting research to ensure better understanding of user requirements.

Key changes:

  • Add confirmation_completed and skip_confirmation fields to OverallState
  • Create confirmation_question node to generate clarifying questions
  • Implement conditional routing based on user intent and conversation state
  • Add ConfirmationQuestion schema for structured output
  • Update graph flow to include confirmation step before research

Benefits:

  • Generates more accurate and relevant research results
  • Resolves ambiguity in user requests
  • Prevents unnecessary research execution

🌐 Multilingual Support

All prompts and responses are now automatically generated in the user's language.

Key changes:

  • Add language instructions to all prompts to respond in user's language
  • Update the following instructions:
    • query_writer_instructions
    • reflection_instructions
    • answer_instructions
    • confirmation_question_instructions
  • Enable automatic language detection and response generation in the same language

Supported languages:

  • Japanese, English, Chinese, Korean
  • Any other language supported by the LLM

Testing

  • Verify confirmation question flow works correctly
  • Confirm Japanese input receives Japanese response
  • Confirm English input receives English response
  • Verify skip confirmation option works properly

Related Issues

N/A

Notes

These features enable us to provide a better user experience for a more diverse user base.

- Add confirmation_completed and skip_confirmation fields to OverallState
- Create confirmation_question node to generate clarifying questions
- Implement conditional routing based on user intent and conversation state
- Add ConfirmationQuestion schema for structured output
- Update graph flow to include confirmation step before research

This allows the agent to ask clarifying questions before starting research,
improving the quality and relevance of the final output.

Signed-off-by: kahirokunn <[email protected]>
- Add language instruction to all prompts to respond in user's language
- Update query_writer_instructions, reflection_instructions, answer_instructions, and confirmation_question_instructions
- Enable automatic language detection and response generation in the same language

This allows the system to automatically respond in the same language as the user's input,
supporting Japanese, English, Chinese, Korean, and any other language supported by the LLM.

Signed-off-by: kahirokunn <[email protected]>
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.

1 participant