Skip to main content

question handling engine for OVOS

Project description

OVOS Common Query Framework

The OVOS Common Query Framework is designed to answer questions by gathering answers from several skills and selecting the best one

⚠️ Common Query will only be as fast as your slowest CommonQuerySkill, latency will vary depending on which skills you install

Features

  • Utterance Query Type Detection: 🧐:
    If the user utterance does not resemble a question (e.g., no "who", "what", "when" keywords), the system will avoid attempting to answer.

  • Skill Availability Check 🔧:
    If no common query skills are installed, the system will refrain from attempting to respond, ensuring queries are issued only when appropriate skills are available.

  • Improved Answer Selection 🤖:
    A reranker plugin can be integrated to evaluate multiple skill responses and select the most relevant one, ensuring higher-quality answers.

  • Bad Answer Discarding 🚮:
    By integrating a reranker with a minimum score threshold (min_score), poor or irrelevant answers are discarded, improving the overall accuracy of responses.

  • Timeout for Late Answers ⏱️:
    The system will stop waiting for answers after 2 seconds. Any response received after this time will be ignored, ensuring an upper time limit for query handling.

Install

This plugin usually ships with ovos-core by default and should not need to be explicitly installed

pip install ovos-common-query-pipeline-plugin

Configuration

Reranker (Optional)

Rerankers, also referred to as MultipleChoiceSolvers, are optional and need to be explicitly installed. These are used to rank and select the most relevant response from multiple common query skills (e.g., Wolfram Alpha, Wikipedia).

Below is an example configuration to set up a reranker:

"intents": {
    "common_query": {
        "min_self_confidence": 0.5,
        "min_reranker_score": 0.5,
        "reranker": "ovos-flashrank-reranker-plugin",
        "ovos-flashrank-reranker-plugin": {
          "model": "ms-marco-TinyBERT-L-2-v2"
        }
    }
}

Notes:

  • Reranker Plugin: A reranker plugin is optional. You need to install it explicitly for the framework to use it.
  • Model Choice: The example uses the ovos-flashrank-reranker-plugin with ms-marco-TinyBERT-L-2-v2 model, but other plugins/models can be specified depending on your use case and performance requirements.
  • Performance Consideration: Enabling reranking, particularly on devices with limited resources (e.g., Raspberry Pi), may introduce additional latency.

Performance Impact

Be mindful of the performance tradeoffs when enabling rerankers:

  • On resource-constrained devices, such as the Raspberry Pi, reranking models may add extra latency.
  • Adjust the settings to match the device’s capabilities and the expected response time.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_common_query_pipeline_plugin-1.1.13a1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file ovos_common_query_pipeline_plugin-1.1.13a1.tar.gz.

File metadata

File hashes

Hashes for ovos_common_query_pipeline_plugin-1.1.13a1.tar.gz
Algorithm Hash digest
SHA256 076654a6e30f6baf5adb92beefd1c31ebdeaa77731cd10a8003174afb23b883c
MD5 028e484934865f06b8d220add13523fe
BLAKE2b-256 7322d4cbd0c938cd1ed82191d6067ea7642c045fc76312f7c38546e3d5501a7e

See more details on using hashes here.

File details

Details for the file ovos_common_query_pipeline_plugin-1.1.13a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_common_query_pipeline_plugin-1.1.13a1-py3-none-any.whl
Algorithm Hash digest
SHA256 380322652d736ff4f7fef168c25c48dd00f1dec6aef3d68fb8c55514cee2678f
MD5 0e5567fc55e5f0fcb7598298e9c004be
BLAKE2b-256 14cbc0b0ca63112186b017e8abc41cc1c2eededcb9c385fb6440e913dfbabf81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page