cognee/cognee
lxobr 9cc357ac1c
Feat/cog 1365 unify retrievers (#572)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->
- Created the `BaseRetriever` class to unify all the retrievers and
searches.
- Implemented seven specialized retrievers (summaries, chunks,
completions, graph, graph-summary, insights, code) with consistent
get_context/get_completion interfaces.
- Added json context dumping feature in the current completion
implementations to enable context comparisons.
- Built a comparison framework to validate old vs new implementations.
## 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 multiple retrieval classes for enhanced search
capabilities, including `BaseRetriever`, `ChunksRetriever`,
`CodeRetriever`, `CompletionRetriever`, `GraphCompletionRetriever`,
`GraphSummaryCompletionRetriever`, `InsightsRetriever`, and
`SummariesRetriever`.
- Enhanced query completions with optional context saving for improved
data persistence.
- Implemented advanced tools to compare retrieval outcomes across
different implementations.

- **Refactor**
- Streamlined internal module organization and updated references for
increased maintainability and consistency.
- Added comments indicating future maintenance tasks related to code
merging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-02-27 12:13:21 +01:00
..
api feat: codegraph improvements and new CODE search [COG-1351] (#581) 2025-02-26 20:15:02 +01:00
exceptions ruff format 2025-01-05 19:09:08 +01:00
infrastructure feat: codegraph improvements and new CODE search [COG-1351] (#581) 2025-02-26 20:15:02 +01:00
modules Feat/cog 1365 unify retrievers (#572) 2025-02-27 12:13:21 +01:00
shared feat: codegraph improvements and new CODE search [COG-1351] (#581) 2025-02-26 20:15:02 +01:00
tasks Feat/cog 1365 unify retrievers (#572) 2025-02-27 12:13:21 +01:00
tests Feat/cog 1365 unify retrievers (#572) 2025-02-27 12:13:21 +01:00
__init__.py feat: Force .env file settings over real environment variable values [COG-1333] (#537) 2025-02-14 20:40:21 +01:00
base_config.py Update base_config.py 2025-01-16 13:19:43 +01:00
fetch_secret.py ruff format 2025-01-05 19:09:08 +01:00
low_level.py fix: custom model pipeline (#508) 2025-02-08 02:00:15 +01:00
pipelines.py feat: expose cognee.pipelines (#125) 2024-07-27 10:01:44 +02:00
root_dir.py ruff format 2025-01-05 19:09:08 +01:00