graphiti/graphiti_core
Daniel Chalef 8770012745
Refactor prompt structure: move MESSAGES after instructions (#980)
* Refactor prompt structure: move MESSAGES after instructions

Reordered prompt structure in extract_nodes.py to place MESSAGES section
after instructions/guidelines in both extract_attributes and extract_summary
functions for improved prompt clarity.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add sentence-aware text truncator for entity summaries

- Created truncate_at_sentence() utility function that truncates text at
  sentence boundaries while respecting max character limits
- Added MAX_SUMMARY_CHARS constant (250 chars) for entity summaries
- Applied truncator to entity summaries in prompts (extract_nodes.py)
- Applied truncator to LLM-generated summaries (node_operations.py)
- Added comprehensive test suite for truncation logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clean up formatting in extract_attributes prompt

- Remove extra blank lines
- Fix indentation of MESSAGES tag

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Bump version to 0.22.0pre3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-04 19:06:32 -07:00
..
cross_encoder fix typo and model selector (#843) 2025-08-18 11:15:45 -04:00
driver remove generic aoss_client interactions for release build (#975) 2025-10-03 13:41:15 -04:00
embedder OpenSearch Integration for Neo4j (#896) 2025-09-09 10:51:46 -04:00
llm_client Add group_id parameter to language extraction function (#952) 2025-10-03 09:05:45 -07:00
migrations cleanup (#894) 2025-09-05 11:30:46 -04:00
models OpenSearch Integration for Neo4j (#896) 2025-09-09 10:51:46 -04:00
prompts Refactor prompt structure: move MESSAGES after instructions (#980) 2025-10-04 19:06:32 -07:00
search Remove ensure_ascii configuration parameter (#969) 2025-10-02 15:10:57 -07:00
telemetry feat: add telemetry with PostHog and update Docker configurations (#633) 2025-06-27 12:23:30 -07:00
utils Refactor prompt structure: move MESSAGES after instructions (#980) 2025-10-04 19:06:32 -07:00
__init__.py
edges.py filter out falsey values before creating embeddings (#966) 2025-10-02 15:26:51 -04:00
errors.py Add group ID validation and error handling (#618) 2025-06-24 09:33:54 -07:00
graph_queries.py Graph quality updates (#922) 2025-09-23 17:53:39 -04:00
graphiti.py Remove ensure_ascii configuration parameter (#969) 2025-10-02 15:10:57 -07:00
graphiti_types.py Remove ensure_ascii configuration parameter (#969) 2025-10-02 15:10:57 -07:00
helpers.py fix-fulltext-syntax-error (#914) 2025-09-23 10:52:44 -04:00
nodes.py filter out falsey values before creating embeddings (#966) 2025-10-02 15:26:51 -04:00
py.typed Add py.typed file (#105) 2024-09-11 08:44:06 -04:00