<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Updated evaluation checks by removing assertions related to the relationship between `corpus_list` and `qa_pairs`, now focusing solely on `qa_pairs` limits. - **Refactor** - Improved content processing to append each paragraph individually to `corpus_list`, enhancing clarity in data structure. - Simplified type annotations in the `load_corpus` method across multiple adapters, ensuring consistency in return types. - **Chores** - Updated dependency installation commands in GitHub Actions workflows for Python 3.10, 3.11, and 3.12 to include additional evaluation-related dependencies. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
22 lines
742 B
Python
22 lines
742 B
Python
from typing import Optional
|
|
|
|
from evals.eval_framework.benchmark_adapters.base_benchmark_adapter import BaseBenchmarkAdapter
|
|
|
|
|
|
class DummyAdapter(BaseBenchmarkAdapter):
|
|
def load_corpus(
|
|
self, limit: Optional[int] = None, seed: int = 42
|
|
) -> tuple[list[str], list[dict[str, str]]]:
|
|
corpus_list = [
|
|
"The cognee is an AI memory engine that supports different vector and graph databases",
|
|
"Neo4j is a graph database supported by cognee",
|
|
]
|
|
question_answer_pairs = [
|
|
{
|
|
"answer": "Yes",
|
|
"question": "Is Neo4j supported by cognee?",
|
|
"type": "dummy",
|
|
}
|
|
]
|
|
|
|
return corpus_list, question_answer_pairs
|