cognee/evals/eval_framework/benchmark_adapters
lxobr 4b7c21d7d8
feat: retrieve golden contexts [COG-1364] (#579)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->
• Added load_golden_context parameter to BaseBenchmarkAdapter's abstract
load_corpus method, establishing a common interface for retrieving
supporting evidence
• Refactored HotpotQAAdapter with a modular design: introduced
_get_metadata_field_name method to handle dataset-specific fields
(making it extensible for child classes), implemented get golden context
functionality.
• Refactored TwoWikiMultihopAdapter to inherit from HotpotQAAdapter,
overriding only the necessary methods while reusing parent's
functionality
• Added golden context support to MusiqueQAAdapter with their
decomposition-based format
## 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

- **New Features**
- Introduced an option to include additional context during corpus
loading, enhancing the quality and flexibility of generated QA pairs.
- **Refactor**
- Streamlined and modularized the processing workflow across different
adapters for improved consistency and maintainability.
- Updated metadata extraction to refine the display of contextual
information.
- Shifted focus in the `TwoWikiMultihopAdapter` from corpus loading to
context extraction.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-27 13:25:47 +01:00
..
__init__.py feat: Cognee evaluation framework development (#498) 2025-02-11 16:31:54 +01:00
base_benchmark_adapter.py feat: retrieve golden contexts [COG-1364] (#579) 2025-02-27 13:25:47 +01:00
benchmark_adapters.py Cog 1293 corpus builder custom cognify tasks (#527) 2025-02-12 16:44:08 +01:00
dummy_adapter.py Test: Parse context pieces separately in MusiqueQAAdapter and adjust tests [cog-1234] (#561) 2025-02-20 14:23:53 +01:00
hotpot_qa_adapter.py feat: retrieve golden contexts [COG-1364] (#579) 2025-02-27 13:25:47 +01:00
musique_adapter.py feat: retrieve golden contexts [COG-1364] (#579) 2025-02-27 13:25:47 +01:00
twowikimultihop_adapter.py feat: retrieve golden contexts [COG-1364] (#579) 2025-02-27 13:25:47 +01:00