Files
semantic-kernel/dotnet/samples/Demos/QualityCheck/python-server/requirements.txt
T
Dmytro Struk 51af5eedc9 .Net: Summarization and translation evaluation examples with Filters (#6262)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

This example demonstrates how to perform quality check on LLM results
for such tasks as text summarization and translation with Semantic
Kernel Filters.

Metrics used in this example:
- [BERTScore](https://github.com/Tiiiger/bert_score) - leverages the
pre-trained contextual embeddings from BERT and matches words in
candidate and reference sentences by cosine similarity.
- [BLEU](https://en.wikipedia.org/wiki/BLEU) (BiLingual Evaluation
Understudy) - evaluates the quality of text which has been
machine-translated from one natural language to another.
- [METEOR](https://en.wikipedia.org/wiki/METEOR) (Metric for Evaluation
of Translation with Explicit ORdering) - evaluates the similarity
between the generated summary and the reference summary, taking into
account grammar and semantics.
- [COMET](https://unbabel.github.io/COMET) (Crosslingual Optimized
Metric for Evaluation of Translation) - is an open-source framework used
to train Machine Translation metrics that achieve high levels of
correlation with different types of human judgments.

In this example, SK Filters call dedicated server which is responsible
for task evaluation using metrics described above. If evaluation score
of specific metric doesn't meet configured threshold, an exception is
thrown with evaluation details.

[Hugging Face Evaluate Metric](https://github.com/huggingface/evaluate)
library is used to evaluate summarization and translation results.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-05-17 14:23:16 +00:00

9 lines
70 B
Plaintext

fastapi
uvicorn
pydantic
bert_score
nltk
evaluate
cmake
unbabel-comet