Installation

The ibm-watsonx-gov python library is available on PyPI


To install the library, run:

pip install ibm-watsonx-gov

Extra requirements

Some functionality of this library requires additional dependencies. You can install them using the following commands:

  • agentic - To evaluate an agentic application using Agentic Evaluator class.

    To install the dependencies, run:

    pip install ibm-watsonx-gov[agentic]
    
  • metrics - To compute the AI metrics using Metrics Evaluator class.

    To install the dependencies, run:

    pip install ibm-watsonx-gov[metrics]
    
  • local-evals - To install the dependencies for computing the metrics with methods which use models in local. The below metrics can also be computed using other methods which do not need local_evals. This extra requires should to be used along with agentic or metrics extras mentioned above.
    Metric methods using local evaluations

    Metric

    Method

    Answer Similarity

    bert_score_recall, sentence_bert_mini_lm

    Faithfulness

    sentence_bert_mini_lm

    Context Relevance

    sentence_bert_bge, sentence_bert_mini_lm

    To install the dependencies, run:

    pip install ibm-watsonx-gov[local-evals]
    
  • tools - To use the tools while building an agentic application.

    To install the dependencies, run:

    pip install ibm-watsonx-gov[tools]
    
  • mre - To evaluate foundational model risk using Model Risk Evaluator class.

    To install the dependencies, run:

    pip install ibm-watsonx-gov[mre]
    
  • visualization - To install the dependencies for visualizing the results using Model Insights class.

    To install the dependencies, run:

    pip install ibm-watsonx-gov[visualization]