Skip to content

Commit

Permalink
fix a minor bug v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
potsawee committed Mar 22, 2023
1 parent d641bf6 commit 679b4d4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
selfcheckgpt.egg-info
examples/
dist/
47 changes: 24 additions & 23 deletions DESCRIPTION.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
SelfCheckGPT
=====================================================

- Code for our paper "[SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models](https://arxiv.org/abs/2303.08896)"
- More information can be found on our [project page](https://github.com/potsawee/selfcheckgpt)
- Code for our paper "SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models", https://arxiv.org/abs/2303.08896
- More information can be found on our project page: https://github.com/potsawee/selfcheckgpt

Installation
-----------------------------------------------------

::

pip install selfcheckgpt


Example
-----------------------------------------------------

```python
from selfcheckgpt.modeling_mqag import SelfCheckMQAG
from selfcheckgpt.modeling_bertscore import SelfCheckBERTScore

selfcheck_mqag = SelfCheckMQAG()
selfcheck_bertscore = SelfCheckBERTScore()

sent_scores_mqag = selfcheck_mqag.predict(
sentences,
passage,
[sample1, sample2, sample3],
num_questions_per_sent = 5,
scoring_method = 'bayes_with_alpha',
beta1 = 0.8, beta2 = 0.8,
)
sent_scores_bertscore = selfcheck_bertscore.predict(
sentences,
[sample1, sample2, sample3],
)

```
.. code:: python

from selfcheckgpt.modeling_mqag import SelfCheckMQAG
from selfcheckgpt.modeling_bertscore import SelfCheckBERTScore

selfcheck_mqag = SelfCheckMQAG()
selfcheck_bertscore = SelfCheckBERTScore()

sent_scores_mqag = selfcheck_mqag.predict(
sentences,
passage,
[sample1, sample2, sample3],
num_questions_per_sent = 5,
scoring_method = 'bayes_with_alpha',
beta1 = 0.8, beta2 = 0.8,
)
sent_scores_bertscore = selfcheck_bertscore.predict(
sentences,
[sample1, sample2, sample3],
)
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include DESCRIPTION.txt
include LICENSE
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# calling the setup function
setup(
name='selfcheckgpt',
version='0.1.0',
version='0.1.1',
description='SelfCheckGPT - Assessing text-based responses from LLMs',
long_description=long_description,
url='https://github.com/potsawee/selfcheckgpt',
Expand All @@ -34,5 +34,6 @@
packages=['selfcheckgpt'],
classifiers=CLASSIFIERS,
install_requires=REQUIREMENTS,
keywords='selfcheckgpt'
keywords='selfcheckgpt',
include_package_data=True,
)

0 comments on commit 679b4d4

Please sign in to comment.