Skip to content

Natural Language Intent Routing #216

@jerop

Description

@jerop

Problem

The current dispatcher pattern relies on slash commands (@gemini-cli /review, @gemini-cli /triage) limits the natural interaction experience:

  • Rigid syntax: Users must remember exact slash commands (/review, /triage)
  • Poor discoverability: No way to know what commands are available except by reading workflows
  • Unnatural interaction: Doesn't leverage Gemini's natural language understanding capabilities
  • Limited flexibility: Can't handle variations or synonyms (e.g., "please review this" vs "/review")
  • User friction: Have to context-switch to remember command syntax

Solution

Intent routing involves:

  • Parse natural language requests instead of requiring slash commands
  • Automatically detect intent from user requests
  • Route to appropriate workflows based on semantic understanding
  • Provide fallback handling for ambiguous requests

Here are some examples:

  • Review intent: "review", "analyze", "check", "examine", "audit"
  • Triage intent: "categorize", "label", "classify", "organize", "tag"
  • Implement intent: "fix", "update", "change", "modify", "improve"
  • General query intent: "explain", "help", "what", "how", "why"

Example

This is an example routing step:

# Example enhanced dispatcher logic
- name: 'Classify intent'
  if: |-
    ${{ !startsWith(github.event.comment.body, '@gemini-cli /') }}
  env:
    REQUEST_BODY: '${{ github.event.comment.body || github.event.review.body || github.event.issue.body }}'
  uses: 'google-github-actions/run-gemini-cli@main'
  with:
    prompt: |-
      Classify this request into one of: review, triage, invoke
      Request: "${REQUEST_BODY}"
      Return only the classification.

This would be the outcome:

❌ Before: "@gemini-cli /review focus on security"
✅ After: "@gemini-cli please review this PR for security issues"

❌ Before: "@gemini-cli /triage" 
✅ After: "@gemini-cli can you help categorize this issue?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions