Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
沈秋雨
/
weknora_ragas
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
a52cb68a
...
a52cb68a119730b12f0c6cd61b08e9e90687e1d0
authored
2026-04-22 13:26:30 +0800
by
沈秋雨
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bugfix
1 parent
f0c4e2ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
src/weknora_eval/testset.py
src/weknora_eval/testset.py
View file @
a52cb68
...
...
@@ -17,6 +17,9 @@ from ragas.testset.synthesizers.single_hop.base import (
SingleHopQuerySynthesizer
,
SingleHopScenario
,
)
from
ragas.testset.synthesizers.single_hop.specific
import
(
SingleHopSpecificQuerySynthesizer
,
)
from
weknora_eval.config
import
require_config
from
weknora_eval.loaders
import
read_jsonl
,
write_jsonl
...
...
@@ -235,8 +238,9 @@ def _generate_ragas_prechunked(
return
generator
.
generate_with_chunks
(
documents
,
testset_size
=
size
,
query_distribution
=
[(
SingleHopSpecificQuerySynthesizer
(
llm
=
ragas_llm
),
1.0
)],
run_config
=
run_config
,
raise_exceptions
=
Fals
e
,
raise_exceptions
=
Tru
e
,
)
...
...
@@ -253,8 +257,9 @@ def _generate_ragas_langchain_docs(
generator
=
TestsetGenerator
(
llm
=
ragas_llm
,
embedding_model
=
ragas_embeddings
)
generate_kwargs
:
dict
[
str
,
Any
]
=
{
"testset_size"
:
size
,
"query_distribution"
:
[(
SingleHopSpecificQuerySynthesizer
(
llm
=
ragas_llm
),
1.0
)],
"run_config"
:
run_config
,
"raise_exceptions"
:
Fals
e
,
"raise_exceptions"
:
Tru
e
,
}
return
generator
.
generate_with_langchain_docs
(
documents
,
**
generate_kwargs
)
...
...
Please
register
or
sign in
to post a comment