graphiti/tests
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 Gemini client improvements; Gemini reranker (#645) 2025-06-30 12:55:17 -07:00
driver chore/prepare kuzu integration (#762) 2025-07-29 09:07:34 -04:00
embedder save edge update (#721) 2025-07-14 11:15:38 -04:00
evals add_episode() refactor (#421) 2025-04-30 12:08:52 -04:00
llm_client save edge update (#721) 2025-07-14 11:15:38 -04:00
utils Remove ensure_ascii configuration parameter (#969) 2025-10-02 15:10:57 -07:00
helpers_test.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00
test_edge_int.py Improve node deduplication w/ deterministic matching, LLM fallbacks (#929) 2025-09-25 07:13:19 -07:00
test_entity_exclusion_int.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00
test_graphiti_int.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00
test_graphiti_mock.py don't return index labels (#887) 2025-09-02 12:02:33 -04:00
test_node_int.py Improve node deduplication w/ deterministic matching, LLM fallbacks (#929) 2025-09-25 07:13:19 -07:00
test_text_utils.py Refactor prompt structure: move MESSAGES after instructions (#980) 2025-10-04 19:06:32 -07:00