https://github.com/accenture/metapromptwiz

https://github.com/accenture/metapromptwiz

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Accenture
  • Language: Python
  • Default Branch: main
  • Size: 26.4 KB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

MetaPromptWiz

MetaPromptWiz is a package that aims to explore configurations for LLM Applications. It takes a program and uses a different search strategies to find a promising configuration.

Table of Contents

Installation

To install MetaPromptWiz, you can use pip: sh pip install config-wiz

Or add it to your pyproject.toml file:

toml [tool.poetry.dependencies] config-wiz = "^0.0.5"

Usage

To get the best configuration for your program, follow these steps:

  1. Construct a MetaPromptWiz object with the following arguments:

    • Configuration Class: A Pydantic model. All fields must be one of: Literal, bool, int/float with both ge/gt and le/lt constraints. You can use Pydantic's field and model validators, but note that invalid configurations will be skipped, although they will count as a run, so you should set a high value for max_runs.
    • Program: A function of (configuration, program_input_type) -> program_output_type.
    • SampleScore: A set of scores for a single input of over the evaluted configuration
    • ConfigurationScore: A scoring function that projects the sample score to the metric of the exploration stratgey (e.g., float)
  2. Call the find_best_configuration method with the following arguments:

    • Dataset: A dataset of [(input, truth_output)].
    • Scoring function: A function of (program_output, expected_output[optional]) -> score. Higher scores mean the program output is closer to the truth output.
    • ProgramRunnerName: A string. Choose one from our program runners. Determines how to get the score of a specific configuration, program, and dataset. For example, run the program on all samples in the dataset, score all outputs, and return the mean score.
    • Strategy_Name: A string. Choose one from our strategies. Determines which configurations to try next based on previous configurations and their scores. For example, grid search.
    • Max_runs: An integer. The maximum number of times to run the program with different configurations.

Examples

Consider the running examlpe provided in paper_run.py, which shows exploration of a Text2SQL application.

Contributing

We welcome contributions! Please read our contributing guidelines for more information.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Owner

  • Name: Accenture
  • Login: Accenture
  • Kind: organization

Accenture Github site

GitHub Events

Total
  • Push event: 1
  • Fork event: 1
  • Create event: 1
Last Year
  • Push event: 1
  • Fork event: 1
  • Create event: 1

Dependencies

poetry.lock pypi
  • annotated-types 0.7.0
  • bayesian-optimization 1.5.1
  • colorama 0.4.6
  • joblib 1.4.2
  • numpy 1.26.4
  • pydantic 2.8.2
  • pydantic-core 2.20.1
  • scikit-learn 1.5.1
  • scipy 1.14.0
  • threadpoolctl 3.5.0
  • tqdm 4.66.5
  • typing-extensions 4.12.2
pyproject.toml pypi
  • bayesian-optimization ^1.5.1
  • numpy ^1.26.4
  • pydantic ^2.7.4
  • python ^3.10
  • scikit-learn ^1.5.0
  • tqdm ^4.66.5