59 Commits

Author SHA1 Message Date
Preston Rasmussen
9422b6f5fb
Node dedupe efficiency (#490)
* update resolve extracted edge

* updated edge resolution

* dedupe nodes update

* single pass node resolution

* updates

* mypy updates

* Update graphiti_core/prompts/dedupe_nodes.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* remove unused imports

* mypy

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-15 13:56:33 -04:00
Preston Rasmussen
9baa9b7b8a
Mmr optimizations (#481)
* update mmr calculations

* update search

* fixes and updates

* mypy
2025-05-12 22:30:23 -04:00
prestonrasmussen
f7b2c3845b test fix 2025-05-08 00:27:05 -04:00
Preston Rasmussen
8bdceaea55
load embedding update (#458)
update
2025-05-08 00:07:53 -04:00
Preston Rasmussen
fd9969b5a1
Update dedupe prompt (#457)
* improve dedupe logic

* cut summary length

* update unit tests
2025-05-07 23:23:31 -04:00
Evan Schultz
5baaa6fa8c
Anthropic cleanup (#431)
* remove temporary debug logging

* add anthropic api to .env.example

* move anthropic int tests to llm_client dir to better match existing test structure

* update `TestLLMClient` to `MockLLMClient` to eliminate pytest warning
2025-05-03 09:15:03 -04:00
Evan Schultz
f2e95a5685
add embedder tests (#430) 2025-05-03 09:13:56 -04:00
Preston Rasmussen
1193b25fa3
add_episode() refactor (#421)
* temporal updates

* update resolve nodes

* dedupe edge updates

* edge dedupe

* extract attributes

* update dynamic pydantic model

* first pass of extract node attributes

* no errors

* bug fixes

* bug fixes

* prompt updates

* prompt updates

* updates

* updates

* remove unused imports

* update tests based on changes

* remove unused import
2025-04-30 12:08:52 -04:00
Preston Rasmussen
7ee4e38616
Eval updates (#404)
* update eval

* make format

* remove unused imports

* mypy
2025-04-27 14:27:47 -04:00
Preston Rasmussen
009467650f
Node episodes list (#381)
* added episode list virtual field

* in progress tests

* add tests

* update search return type

* linter

* copyright notice

* mark integration tests
2025-04-20 23:20:19 -04:00
Evan Schultz
113179f674
Anthropic client (#361)
* update Anthropic client to use tool calling and add tests

* fix linting errors before creating pull request by making literal types for anthropic models
2025-04-16 12:35:07 -07:00
Preston Rasmussen
45b15a06f2
add episode scope to search (#362)
* add episode scope to search

* bump version

* linter

* Update graphiti_core/search/search_helpers.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* mypy

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-15 19:27:56 -04:00
Preston Rasmussen
11e19a35b7
add reranker_min_score (#355)
* add reranker_min_score

* update divide by 0 case

* center node always gets a score of .1

* linter
2025-04-15 12:33:37 -04:00
Preston Rasmussen
c8d5c45269
update to 4.1 models (#352) 2025-04-14 21:02:36 -04:00
Preston Rasmussen
5dce26722e
e2e graph builder eval (#343)
* add partial eval platform

* dedupe updates

* add e2e eval

* Update graphiti_core/prompts/eval.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* clear all outputs

* clear all outputs

* squash eval commits

* Update tests/evals/data/utils.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* add longmemeval disclaimer

* remove gitignore

* add copyright headers

* add cli

* Update tests/evals/data/longmemeval_data/README.md

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Update tests/evals/eval_e2e_graph_building.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* updates

---------

Co-authored-by: jackaldenryan <jackaldenryan@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-12 10:35:22 -04:00
Preston Rasmussen
6aa25a1901
update context string (#346)
* update context string

* Update graphiti_core/search/search_helpers.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* remove unused imports

* bump version

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-10 06:57:58 -04:00
Daniel Chalef
0f6ac57dab
chore: update version to 0.9.3 and restructure dependencies (#338)
* Bump version from 0.9.0 to 0.9.1 in pyproject.toml and update google-genai dependency to >=0.1.0

* Bump version from 0.9.1 to 0.9.2 in pyproject.toml

* Update google-genai dependency version to >=0.8.0 in pyproject.toml

* loc file

* Update pyproject.toml to version 0.9.3, restructure dependencies, and modify author format. Remove outdated Google API key note from README.md.

* upgrade poetry and ruff
2025-04-08 20:47:38 -07:00
Daniel Chalef
9e78890f2e
Gemini support (#324)
* first cut

* Update dependencies and enhance README for optional LLM providers

- Bump aiohttp version from 3.11.14 to 3.11.16
- Update yarl version from 1.18.3 to 1.19.0
- Modify pyproject.toml to include optional extras for Anthropic, Groq, and Google Gemini
- Revise README.md to reflect new optional LLM provider installation instructions and clarify API key requirements

* Remove deprecated packages from poetry.lock and update content hash

- Removed cachetools, google-auth, google-genai, pyasn1, pyasn1-modules, rsa, and websockets from the lock file.
- Added new extras for anthropic, google-genai, and groq.
- Updated content hash to reflect changes.

* Refactor import paths for GeminiClient in README and __init__.py

- Updated import statement in README.md to reflect the new module structure for GeminiClient.
- Removed GeminiClient from the __all__ list in __init__.py as it is no longer directly imported.

* Refactor import paths for GeminiEmbedder in README and __init__.py

- Updated import statement in README.md to reflect the new module structure for GeminiEmbedder.
- Removed GeminiEmbedder and GeminiEmbedderConfig from the __all__ list in __init__.py as they are no longer directly imported.
2025-04-06 09:27:04 -07:00
Preston Rasmussen
1d2417ec26
Search optimizations (#280)
fix node distance search
2025-02-27 11:51:10 -05:00
Preston Rasmussen
9efa6762d7
entity typo (#274) 2025-02-24 12:44:17 -05:00
Preston Rasmussen
088029a80c
node label filters (#265)
* node label filters

* update

* add search filters

* updates

* bump versions

* update tests

* test update
2025-02-21 12:38:01 -05:00
Preston Rasmussen
00fe87679e
Bounded semaphore - limiting concurrency (#244)
* WIP

* add semaphore

* remove unused imports

* remove unused imports

* lower concurrency limit
2024-12-17 13:08:18 -05:00
Pavlo Paliychuk
a9091b06ff
fix: Clean input before passing it to the llm (#238)
* fix: Clean input before passing it to the llm

* chore: Add license

* fix: typo

* chore: Bump graphiti version
2024-12-10 21:27:05 -05:00
Daniel Chalef
445dccc021
refactor: use utc_now() for consistent UTC datetime handling (#234)
* ensure utc timezones

* fix: dep cycle

---------

Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-12-09 10:36:04 -08:00
Preston Rasmussen
732b2f328d
update lucene escaping (#233)
* update lucene escaping

* update unit test
2024-12-09 10:36:46 -05:00
Preston Rasmussen
6a152ab91a
fix node distance reranker (#231) 2024-12-06 12:08:54 -05:00
Preston Rasmussen
397291de4b
add delete nodes by group_id (#217)
* add delete nodes by group_id

* remove unused imports

* bump version
2024-11-18 13:55:18 -05:00
Preston Rasmussen
281fe072cb
add fulltext search limit (#215)
* add fulltext search limit

* format

* update

* update

* update tests

* remove unused imports

* format

* mypy
2024-11-14 12:18:18 -05:00
Preston Rasmussen
3199e893ed
add_fact endpoint (#207)
* add_fact endpoint

* bump version

* add edge invalidation

* update
2024-11-06 09:12:21 -05:00
Preston Rasmussen
ceb60a3d33
Cross encoder reranker in search query (#202)
* cross encoder reranker

* update reranker

* add openai reranker

* format

* mypy

* update

* updates

* MyPy typing

* bump version
2024-10-25 12:29:27 -04:00
Pavlo Paliychuk
544f9e3fba
chore: Set up cross encoder client (#201)
* chore: Set up cross encoder client

* fix: deps

* chore: move voyage to dev deps
2024-10-24 11:36:10 -04:00
Preston Rasmussen
b217d1e51f
Make default DB explicit (#195)
* add default database

* update

* init tests

* update test

* bump version

* removed unused imports
2024-10-21 12:33:32 -04:00
Preston Rasmussen
49aeaf75f2
Add mmr reranking (#180)
* mmr start

* add mmr function

* normalize

* add mmr options to search

* update communities

* build communities

* format

* clean up normalization

* normalize in mmr

* update
2024-10-08 13:55:10 -04:00
Preston Rasmussen
e15c872900
Fix edge invalidation (#174)
* update edge operations

* add new tests
2024-10-07 11:45:31 -04:00
Preston Rasmussen
ec2e51c5ec
test escape characters (#171)
* test escape characters

* format

* tests

* run tests

* copyright
2024-10-03 10:08:30 -04:00
Pavlo Paliychuk
a7148d6260
feat: Dedicated embedder interface (#159)
* feat: Add Embedder interface and implement openai embedder

* feat: Add voyage ai embedder
2024-09-27 12:47:04 -04:00
ARNO
5bd18fc7dd
feat: configurable embedding model (#156)
* feat: configurable embedding model

format

* chore: Update comment

* chore: Pass embedding model in search utils

---------

Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-09-26 13:31:22 -07:00
Preston Rasmussen
fd341a6f16
Add MSC benchmark and improve search performance (#157)
* test cases

* test

* benchmark

* eval updates

* improve search performance

* remove data

* formatting

* add None type to config

* update sanitization

* push version

* maketrans update

* mypy
2024-09-26 16:12:38 -04:00
Preston Rasmussen
794b705664
Group id fix (#152)
* node distance and group_ids fixed

* get all with no group_id passed

* push

* push

* remove comments

* mypy

* mypy ids

* please mypy

* trust

* last one
2024-09-24 15:55:30 -04:00
Preston Rasmussen
5506a01e24
In memory label propagation community detection (#136)
* WIP

* in memory graph detection

* format

* add comments

* update readme

* fixed an issue where solo nodes would throw an error when building communities
2024-09-23 11:05:44 -04:00
Preston Rasmussen
d7c20c1f59
Search refactor + Community search (#111)
* WIP

* WIP

* WIP

* community search

* WIP

* WIP

* integration tested

* tests

* tests

* mypy

* mypy

* format
2024-09-16 14:03:05 -04:00
Preston Rasmussen
85cf8e5840
Improve node distance reranker speed (#107)
* much faster

* clean up code

* variable rename
2024-09-12 11:23:45 -04:00
Preston Rasmussen
c0a740ff60
Community nodes (#103)
* add gds

* community work

* save progress

* community updates

* e2e communities

* troubleshooting

* updates

* communities

* remove unused import
2024-09-11 12:06:35 -04:00
Preston Rasmussen
42fb590606
Add group ids (#89)
* set and retrieve group ids

* update add episode with group id support

* add episode and search functional

* update bulk

* mypy updates

* remove unused imports

* update unit tests

* unit tests

* add optional uuid field

* format

* mypy

* ellipsis
2024-09-06 12:33:42 -04:00
Preston Rasmussen
06d8d9359f
Add Missing Node and edge CRUD (#51)
* add CRUD operations and fix search limit bugs

* format

* update tests

* å

* update tests to double limit call

* add default field

* format

* import correct field
2024-08-27 16:18:01 -04:00
Daniel Chalef
2d0705fc1b
Add get_nodes_by_query method to Graphiti class (#49)
* Add get_nodes_by_query method to Graphiti class

Add a method to the Graphiti class that wraps `get_relevant_nodes` and returns a list of nodes given a query.

* Add `get_nodes_by_query` method to the `Graphiti` class in `graphiti_core/graphiti.py`.
* Import `generate_embedding` from `graphiti_core/llm_client/utils.py`.
* Use `generate_embedding` to generate an embedding for the query.
* Call `get_relevant_nodes` with the generated embedding and return the relevant nodes.

Add an embedding function to `llm_client/utils.py`.

* Add `generate_embedding` function to `graphiti_core/llm_client/utils.py`.
* Accept an embedder and model_id as parameters.
* Generate an embedding for the given text and return it.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).

* address comments left by @danielchalef on #49 (Add get_nodes_by_query method to Graphiti class);

* fix ellipsis name in cla config

* feat: Add get_nodes_by_query method to Graphiti class

* chore: Cleanup unused files, add hybrid node search, add tests

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-08-26 20:00:28 -07:00
Daniel Chalef
7ca4f7fe5b
Update search method to return EntityEdge objects (#48)
---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).
2024-08-26 17:24:35 -07:00
Pavlo Paliychuk
6e8c964aef
chore: Add comments to graphiti methods (#40)
* chore: Add comments to graphiti methods

* chore: Update int test name + add header to test files

* chore: Add comments to episode type
2024-08-26 13:11:50 -04:00
Pavlo Paliychuk
0ed7739bc0
Controlled example (#37)
* chore: Add romeo runner

* fix: Linter

* dedupe fixes

* wip

* wip dump

* allbirds

* chore: Update romeo parser

* chore: Anthropic model fix

* allbirds runner

* format

* wip

* mypy updates

* update

* remove r

* update tests

* format

* wip

* wip

* wip

* chore: Strategically update the message

* chore: Add romeo runner

* fix: Linter

* wip

* wip dump

* chore: Update romeo parser

* chore: Anthropic model fix

* wip

* allbirds

* allbirds runner

* format

* wip

* wip

* mypy updates

* update

* remove r

* update tests

* format

* wip

* chore: Strategically update the message

* rebase and fix import issues

* Update package imports for graphiti_core in examples and utils

* nits

* chore: Update OpenAI GPT-4o model to gpt-4o-2024-08-06

* implement groq

* improvments & linting

* cleanup and nits

* Refactor package imports for graphiti_core in examples and utils

* Refactor package imports for graphiti_core in examples and utils

* chore: Nuke unused examples

* chore: Nuke unused examples

* chore: Only run type check on graphiti_core

* fix unit tests

* reformat

* unit test

* fix: Unit tests

* test: Add coverage for extract_date_strings_from_edge

* lint

* remove commented code

---------

Co-authored-by: prestonrasmussen <prasmuss15@gmail.com>
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2024-08-26 10:30:22 -04:00
Daniel Chalef
c5e52153c4
chore: Fix packaging (#38)
* feat: Update project name and description

The project name and description in the `pyproject.toml` file have been updated to reflect the changes made to the project.

* chore: Update pyproject.toml to include core package

The `pyproject.toml` file has been updated to include the `core` package in the list of packages. This change ensures that the `core` package is included when building the project.

* fix imports

* fix importats
2024-08-25 10:07:50 -07:00