Metadata-Version: 2.1
Name: langdiversity
Version: 1.1.5
Summary: A tool to elevate your language models with insightful diversity metrics.
Home-page: https://github.com/lab-v2/langdiversity
Author: Noel Ngu, Nathaniel Lee
Author-email: nngu2@asu.edu, nlee51@asu.edu
License: BSD 3-clause
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp ==3.8.5
Requires-Dist: aiosignal ==1.3.1
Requires-Dist: annotated-types ==0.5.0
Requires-Dist: async-timeout ==4.0.3
Requires-Dist: attrs ==23.1.0
Requires-Dist: certifi ==2023.7.22
Requires-Dist: charset-normalizer ==3.2.0
Requires-Dist: dataclasses-json ==0.5.14
Requires-Dist: frozenlist ==1.4.0
Requires-Dist: greenlet ==2.0.2
Requires-Dist: idna ==3.4
Requires-Dist: langchain ==0.0.281
Requires-Dist: langsmith ==0.0.33
Requires-Dist: marshmallow ==3.20.1
Requires-Dist: multidict ==6.0.4
Requires-Dist: mypy-extensions ==1.0.0
Requires-Dist: numexpr ==2.8.5
Requires-Dist: numpy ==1.25.2
Requires-Dist: openai ==0.28.0
Requires-Dist: packaging ==23.1
Requires-Dist: pydantic ==2.3.0
Requires-Dist: pydantic-core ==2.6.3
Requires-Dist: PyYAML ==6.0.1
Requires-Dist: requests ==2.31.0
Requires-Dist: SQLAlchemy ==2.0.20
Requires-Dist: tenacity ==8.2.3
Requires-Dist: typing-inspect ==0.9.0
Requires-Dist: typing-extensions ==4.7.1
Requires-Dist: urllib3 ==2.0.4
Requires-Dist: yarl ==1.9.2

# LangDiversity

[![PyPI version](https://img.shields.io/pypi/v/langdiversity.svg)](https://pypi.org/project/langdiversity/)
[![Python version](https://img.shields.io/badge/python-3.9%2B-blue)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue)](LICENSE)

Elevate your language models with insightful diversity metrics.

## Links

Paper: https://arxiv.org/abs/2308.11189

Video: https://www.youtube.com/watch?v=BekDOLm6qBI&t=10s&ab_channel=NeuroSymbolic

Check out [LangDiversity Hello World](https://github.com/lab-v2/langdiversity/blob/main/docs/hello-world.md) if you're new.

## Table of Contents

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Bibtex](#bibtex)
- [License](#license)
- [Contacts](#contacts)

## Introduction

LangDiversity is a package that provides tools to calculate diversity measures for a given set of data. Specifically, it can compute measures like Shannon's entropy and Gini impurity. It also offers utilities to select prompts based on their diversity scores when interacting with models like OpenAI's GPT-3.5 Turbo.

The primary goal of this project is to assist researchers and developers in analyzing the diversity of responses generated by language models, thereby aiding in the evaluation and fine-tuning of such models.

## Installation

```bash
pip install langdiversity
```

## Usage

Detailed documentation is available [here](https://github.com/lab-v2/diversity_package/tree/main/docs/langdiversity_library.md).

## Bibtex

If you used this software in your work please cite our paper

```bibtex
@misc{ngu2023diversity,
      title={Diversity Measures: Domain-Independent Proxies for Failure in Language Model Queries},
      author={Noel Ngu and Nathaniel Lee and Paulo Shakarian},
      year={2023},
      eprint={2308.11189},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}
```

## License

This repository is licensed under [BSD-3-Clause](LICENSE)

## Contacts

For any inquiries or feedback, please contact:

- Noel Ngu: [nngu2@asu.edu]()
- Nathaniel Lee: [nlee51@asu.edu]()
- Paulo Shakarian: [pshak02@asu.edu]()
