cognee/examples/python
lxobr f033f733b5
feat: entity brute force triplet search [COG-1325] (#589)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->
- Refactored `brute_force_triplet_search`, extracting memory projection.
- Built **TripletSearchContextProvider** (extends
**BaseContextProvider**) to create a single memory projection and
perform a triplet search for each entity.
- Refactored `entity_completion` into **EntityCompletionRetriever**
(extends **BaseRetriever**).
- Added **SummarizedTripletSearchContextProvider** (extends
**TripletSearchContextProvider**) for an alternative summarized output
format.
- Developed and tested an example showcasing both context providers,
comparing raw triplets, summaries, and standard search results.
## 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**
- Enhanced text summarization now delivers clearer, more concise
overviews of search results.
- Improved search performance with optimized context retrieval and
memory reuse for faster, more reliable results.
- Introduced advanced entity-based completion for generating more
relevant, context-aware responses.

- **Refactor**
- Streamlined internal workflows and error handling to ensure a smoother
overall experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Boris <boris@topoteretes.com>
2025-03-05 11:17:58 +01:00
..
code_graph_example.py Feat: log pipeline status and pass it through pipeline [COG-1214] (#501) 2025-02-11 16:41:40 +01:00
cognee_simple_document_demo.py Cognee simple document example (#521) 2025-02-11 13:58:35 +01:00
dynamic_steps_example.py Feat: Store descriptive metrics identified by pipeline run id [cog-1260] (#582) 2025-03-03 19:09:35 +01:00
entity_completion_comparison.py feat: entity brute force triplet search [COG-1325] (#589) 2025-03-05 11:17:58 +01:00
graphiti_example.py Transition to new retrievers, update searches (#585) 2025-02-27 15:25:24 +01:00
multimedia_example.py refactor: Refactor search so graph completion is used by default (#505) 2025-02-07 17:16:34 +01:00
simple_example.py refactor: Refactor search so graph completion is used by default (#505) 2025-02-07 17:16:34 +01:00