Intent Interact Action

Classifies an utterance against registered intents; adds one or more intents (actions) to interaction.

Intent Interact Action

GitHub release (latest by date) GitHub Workflow Status GitHub issues GitHub pull requests GitHub

The Intent Interact Action is designed for classifying natural language utterances against registered intents, subsequently enriching the interaction process by adding corresponding intents (actions) dynamically. It serves as an essential component within the core action group, enabling accurate intent detection and interaction enhancement within conversational flows.

Package Information

  • Name: jivas/intent_interact_action
  • Author: V75 Inc.
  • Architype: IntentInteractAction

Meta Information

  • Title: Intent Interact Action
  • Description: Classifies an utterance against registered intents; adds one or more intents (actions) to interaction.
  • Group: core
  • Type: interact_action

Configuration

  • Singleton: true
  • Order:
    • Weight: -10
    • Before: all

Dependencies


How To Configure

This guide details how you can properly configure the intent_interact_action for optimal and targeted functionality within your deployment.

Basic Configuration Options

The intent_interact_action is highly configurable to fit your interaction requirements. The key configuration parameters are explained below:

  • strict (bool, default=true): If enabled, only actions associated with explicitly matched intents from the provided anchors will be executed. Disable strict mode (strict=False) to execute other available actions by default, even if their intents are not directly matched.

  • exceptions (list, default=['FunctionInteractAction']): When in strict mode, this list specifies action node names to always include, regardless of intent matching outcomes. Users can add additional node names to ensure certain actions consistently execute despite strict intent classification, e.g.:

    exceptions:
      - FunctionInteractAction
      - CustomAlwaysRunAction
    

Configuring the Language Model

The Intent Interact Action leverages a chosen language model to provide context-aware inferencing and classify intents from conversational history. The following parameters ensure you optimize performance and accuracy of intent inference:

history_size: 5                 # Recent exchanges considered in analysis
max_statement_length: 500       # Maximum input statement length (tokens/chars)
model_action: LangChainModelAction  # Node that supplies the LLM inference capability
model_name: gpt-4o              # LLM model utilized for intent detection
model_temperature: 0.2          # Controls inference determinism (low value = more deterministic)
model_max_tokens: 2048          # Maximum tokens allowed in LLM response

Alter the values above to align with your platform resources, conversational context requirements, response speed, and accuracy precision requirements.

Configuring Anchors for Intent Actions

The IntentInteractAction can interface and trigger any interact action within the pipeline by means of anchors declared in respective actions. An anchor signals the intent under which an action is executed. Below is an example of anchor definitions:

anchors:
  - "MESSAGE is a query requesting the traffic report"
  - "MESSAGE is a query relating to the bridge retraction schedule"

Anchors must succinctly describe intents for reliable inferencing and should clearly specify the conditions for triggering the associated action.


Example YAML Configuration

Here's a comprehensive example demonstrating standard configuration usage:

intent_interact_action:
  strict: true
  exceptions:
    - FunctionInteractAction
    - WeatherInteractAction
  history_size: 5
  max_statement_length: 500
  model_action: LangChainModelAction
  model_name: gpt-4o
  model_temperature: 0.2
  model_max_tokens: 2048

Best Practices

  • Ensure intent definitions (anchors) are clearly phrased to facilitate accurate classification.
  • Evaluate and retrain language models periodically, maintaining high intent-detection accuracy.
  • Test intent interactions thoroughly in staging environments before production deployment.
  • Stay mindful of configured resource limits, ensuring prompt and efficient performance.

🔰 Contributing

  • 🐛 Report Issues: Submit bugs or suggest enhancements for the intent_interact_action project.
  • 💡 Submit Pull Requests: Contribute improvements or fixes by opening your own pull requests.
Contributing Guidelines
  1. Fork the Repository: Start by forking the repository to your GitHub account.
  2. Clone Locally: Clone your fork locally using git:
    git clone https://github.com/jivas/intent_interact_action
    
  3. Create a Branch: Work on a new branch with a clear, descriptive name.
    git checkout -b feature-intent-classifier
    
  4. Make Your Changes: Develop and thoroughly test your changes.
  5. Commit clearly: Use descriptive commit messages to document your updates.
    git commit -m 'Enhanced intent classification accuracy'
    
  6. Push your branch: Push changes to your forked repository.
    git push origin feature-intent-classifier
    
  7. Open a Pull Request: Submit a PR detailing your changes and their rationale.
  8. Review Cycle: Once reviewed and approved, your contribution will be merged. Thank you for contributing!
Contributor Graph

🎗 License

This project is licensed under the terms of the Apache License 2.0. Refer to the LICENSE for details.

Install
jvcli download action jivas/intent_interact_action

Last published

9 months ago

Version

0.0.4

Downloads

281

Author

jivas

Type

interact_action

Visibility

Public

Tags

core
interact_action