Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving metrics to metrics and adding pass/fail LLM tests #186

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

SinclairHudson
Copy link
Contributor

A PR outlining the interface I have in mind for LLM tests. Right now, only the base classes exists, and there's only one test, but it's mainly to show the code structure. More tests to come once the general structure is agreed upon! A lot of this PR is going through and making the code changes to metrics, that silos them into metrics. I have the following working definitions:
A metric is a function that takes an LLM prediction, prompt (optional), and gold-standard output (optional) and computes a scalar value. These values can be aggregated meaningfully over a dataset of predictions to shed light on properties of a model.

A test is a function that takes an LLM prediction, prompt (optional) and gold-standard output (optional) and computes a boolean, pass/fail output that denotes if the model output meets certain criteria or output. These are less about understanding an LLM's properties and more about assuring it can meet specific requirements, with specific prompts.

There can be overlapping underlying functionality between metrics and tests.

As of right now, there's no way for the user to specify their test suite, but that will come in the form of a spreadsheet interface (next PR). Advanced users can use the library in their own code.

Copy link
Contributor

@benjaminye benjaminye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tests/qa/test_qa_metrics.py and tests/qa/test_qa_tests.py need to be swapped.

Otherwise, LGTM! Good stuff!

tests/qa/test_qa_metrics.py Show resolved Hide resolved
@benjaminye benjaminye merged commit e440a9d into georgian-io:main Jul 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants