cognee/.github/workflows
Chaitany 96eb0d448a
feat(#1357): Lexical chunk retriever (#1392)
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->
I Implemented Lexical Chunk Retriever In the LexicalRetriever class is
Inherite the BaseRetriever and The DocumentChunk are lazy loaded when
first time query is made because it save time during object
initialization
and the function get_context and the get_completion are Implemented same
as the ChunksRetriever the only diffrence is that the DocumentChunk are
converted to match the output type of the ChunksRetriever using function
get_own_properties in the utils.

## Type of Change
<!-- Please check the relevant option -->
- [-] Bug fix (non-breaking change that fixes an issue)
- [-] New feature (non-breaking change that adds functionality)
- [-] Breaking change (fix or feature that would cause existing
functionality to change)
- [-] Documentation update
- [-] Code refactoring
- [-] Performance improvement
- [-] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- Added LexicalRetriever base class with customizable tokenizer & scorer
     - Implemented caching of DocumentChunk tokens and payloads 
- Added robust initialization with error handling and logging -
Implemented get_context with top_k ranking and optional scores
- Implemented get_completion consistent with BaseRetriever interface
- Added JaccardChunksRetriever demo using set/multiset Jaccard
similarity
- Support for stopwords and multiset frequency-aware similarity -
Integrated logging for initialization, scoring, and retrieval

## Testing

- Manual tests: initialized retriever, retrieved chunks with toy corpus
    - Edge cases: empty corpus, empty query, scorer/tokenizer errors 
    - Verified Jaccard similarity results for single/multiset cases 
    - Code formatted and linted


## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [-] **I have tested my changes thoroughly before submitting this PR**
- [-] **This PR contains minimal changes necessary to address the
issue/feature**
- [-] My code follows the project's coding standards and style
guidelines
- [-] I have added tests that prove my fix is effective or that my
feature works
- [-] I have added necessary documentation (if applicable)
- [-] All new and existing tests pass
- [-] I have searched existing PRs to ensure this change hasn't been
submitted already
- [-] I have linked any relevant issues in the description
- [-] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->
Relates to  #1392
## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->
Int the cognee/modules/chunking/models/DocumentChunk.py
don't remove the optional  from is_part_of attributes.

## 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.

---------

Co-authored-by: Andrej Milicevic <milicevicandrej@yahoo.com>
Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Igor Ilic <igorilic03@gmail.com>
Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
Co-authored-by: Boris <boris@topoteretes.com>
Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
2025-09-19 18:24:33 +02:00
..
approve_dco.yaml Update approve_dco.yaml 2025-02-09 15:47:21 +01:00
backend_docker_build_test.yml feat: Return CI test for docker build (#977) 2025-06-12 06:10:21 -04:00
basic_tests.yml Fix 2025-08-26 09:35:53 +02:00
clean_stale_pr.yaml Update clean_stale_pr.yaml 2025-02-09 15:40:03 +01:00
cli_tests.yml refactor: Move cli tests to run in parallel with all tests 2025-09-11 22:34:26 +02:00
community_greetings.yml Main merge vol5 (#1252) 2025-08-14 21:17:17 +02:00
db_examples_tests.yml fix: unintentionally uninstall required deps when "uv sync" 2025-08-15 09:48:23 +01:00
disable_independent_workflows.sh feat(#1357): Lexical chunk retriever (#1392) 2025-09-19 18:24:33 +02:00
docker_compose.yml feat: New tests (#678) 2025-04-10 10:52:48 +02:00
dockerhub-mcp.yml fix: run cognee in Docker [COG-1961] (#775) (#779) 2025-04-23 21:35:48 +02:00
dockerhub.yml feat: codegraph improvements and new CODE search [COG-1351] (#581) 2025-02-26 20:15:02 +01:00
e2e_tests.yml refactor: Make CI/CD faster add more OS tests 2025-08-26 21:05:30 +02:00
examples_tests.yml test: Add test for memify pipeline 2025-09-11 17:58:42 +02:00
graph_db_tests.yml fix: unintentionally uninstall required deps when "uv sync" 2025-08-15 09:48:23 +01:00
notebooks_tests.yml Merge dev with main (#921) 2025-06-07 07:48:47 -07:00
pr_lint Version 0.1.21 (#431) 2025-01-10 19:37:50 +01:00
relational_db_migration_tests.yml fix: uv uninstalls rest of packages in some workflows 2025-08-15 09:48:23 +01:00
release_discord_action.yml Version 0.1.21 (#431) 2025-01-10 19:37:50 +01:00
reusable_notebook.yml fix: uv uninstalls rest of packages in some workflows 2025-08-15 09:48:23 +01:00
search_db_tests.yml fix: unintentionally uninstall required deps when "uv sync" 2025-08-15 09:48:23 +01:00
temporal_graph_tests.yml feat: adds temporal graph integration and structural tests 2025-08-29 18:21:24 +02:00
test_different_operating_systems.yml Update .github/workflows/test_different_operating_systems.yml 2025-08-27 07:38:05 -04:00
test_llms.yml feat(#1357): Lexical chunk retriever (#1392) 2025-09-19 18:24:33 +02:00
test_mcp.yml feat: replace Owlready2 with RDFLib (#981) 2025-06-17 14:49:53 +02:00
test_ollama.yml Refactor CI workflows to replace Poetry with uv for dependency management and execution 2025-08-15 09:48:23 +01:00
test_s3_file_storage.yml Refactor CI workflows to replace Poetry with uv for dependency management and execution 2025-08-15 09:48:23 +01:00
test_suites.yml feat(#1357): Lexical chunk retriever (#1392) 2025-09-19 18:24:33 +02:00
update-contributors.yml Create update-contributors.yml 2025-02-09 15:45:03 +01:00
vector_db_tests.yml fix: uv uninstalls rest of packages in some workflows 2025-08-15 09:48:23 +01:00
weighted_edges_tests.yml Merge branch 'dev' into move_to_gpt5 2025-08-17 12:20:57 +02:00