Skip to content

Commit e344d23

Browse files
committed
Guidelines on execution of the validation.py
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
1 parent f1eed45 commit e344d23

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,45 @@ notes: |
4343
Was I wrong?
4444
api: /analysis/staged
4545
```
46+
47+
48+
## Automated evaluation
49+
50+
Evaluation of Log Detective performance can be performed automatically using
51+
the `validation.py`script. Dependencies for the tool are defined in the
52+
`requirements.txt` file and should be installed in a virtual environment.
53+
54+
Before running the script, the API key for the LLM judge must be set
55+
in an environment variable `OPENAI_API_KEY`.
56+
57+
Example:
58+
59+
```
60+
./validation.py <DATA_PATH> <LOG_DETECTIVE_URL> <LLM_URL> <LLM_NAME>
61+
```
62+
Script sends each of the the stored log files for evaluation by Log Detective,
63+
then submits both results of final analysis from Log Detective and actual issue
64+
in the log to LLM to determine similarity of the two.
65+
66+
Scores are assigned on scale from `1` to `10`. Where `10` stands for absolute and
67+
`1` for no match at all.
68+
69+
Example:
70+
71+
```
72+
[Expected Response]
73+
Build failed due to missing patch file `gnome-shell-notify-gnome-session.patch`.
74+
TFixing the issue, requires making sure that all patch files specified in the `SOURCES` directory.
75+
76+
77+
[Actual Response]
78+
The RPM build failed because the patch file `gnome-shell-notify-gnome-session.patch` was missing from the `SOURCES` directory during the `buildsrpm` phase. This caused the `rpmbuild -bs` command to fail.
79+
80+
To resolve this, ensure that the `gnome-shell-notify-gnome-session.patch` file is present in the `SOURCES` directory and is correctly referenced in the RPM spec file.
81+
82+
83+
Similarity Score: 8/10
84+
--------------------------------------------------------------------------------
85+
```
86+
87+
Scores higher or equal to 6 are considered sufficient for passing.

0 commit comments

Comments
 (0)