Skip to content

Conversation

Shelvak
Copy link

@Shelvak Shelvak commented Sep 1, 2025

Summary

I'm parsing documentation and code with graphiti, I wrote a Bedrock (aws) adapter to use with it, (Maybe that's why I needed to change the message) and in some cases the documentation/code is repeated and the deduplication process fails because Bedrock (Nova) returns the uuid from the entity instead of the item index from the facts candidates. Checking the dedupe code, we need always the index instead of the ID.
Adding this extra sentence fixed the issue for me.

(The issue is when deduplicating edges)

Type of Change

  • ✔️ Bug fix

The model input message:

{'content': '\n'
            '        <NEW FACT>\n'
            '        Brand Kit includes Equal.\n'
            '        </NEW FACT>\n'
            '        \n'
            '        <EXISTING FACTS>\n'
            "        [{'id': "
            "'97a641ab-0342-4dbe-82e2-fc93eb250db9', 'fact': "
            "'Brand Kit has a subsection on Equal.'}]\n"
            '        </EXISTING FACTS>\n'
            '        <FACT INVALIDATION CANDIDATES>\n'
            "        [{'id': 0, 'fact': 'Brand Kit has a "
            "subsection on Equal.'}, {'id': 1, 'fact': "
            "'Equalizer Docs has a section on Brand Kit.'}, "
            "{'id': 2, 'fact': 'Brand Kit has a subsection on "
            "Equity.'}, {'id': 3, 'fact': 'Brand Kit has a "
            "subsection on Scale.'}]\n"
            '        </FACT INVALIDATION CANDIDATES>\n'
.....

Model output:

....
  '  "required": [\n'
  '    "duplicate_facts",\n'
  '    "contradicted_facts",\n'
  '    "fact_type"\n'
  '  ],\n'
  '  "title": "EdgeDuplicate",\n'
  '  "type": "object",\n'
  '  "duplicate_facts": '
  '[97a641ab-0342-4dbe-82e2-fc93eb250db9],\n' <= this makes raise a json issue for missing quotes (that's how I found the issue)
  '  "contradicted_facts": [],\n'
  '  "fact_type": "DEFAULT"\n'

Testing

  • ✔️ All existing tests pass
    (Would be great if somebody could test this for other models)

Breaking Changes

  • ❌ This PR contains breaking changes

Checklist

  • ✔️ Code follows project style guidelines (make lint passes)
  • ✔️ Self-review completed
  • ✔️ Documentation updated where necessary
  • ✔️ No secrets or sensitive information committed

@danielchalef
Copy link
Member

danielchalef commented Sep 1, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 6c6698f in 1 minute and 4 seconds. Click for details.
  • Reviewed 47 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. graphiti_core/prompts/dedupe_edges.py:73
  • Draft comment:
    Whitespace cleanup: The removed extra blank line in the prompt improves formatting consistency.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
2. graphiti_core/prompts/dedupe_edges.py:146
  • Draft comment:
    Clear guideline addition: The new instruction to use the integer id from FACT INVALIDATION CANDIDATES (instead of the UUID from EXISTING FACTS) is explicitly stated. This aligns with the deduplication logic and clarifies the expected behavior.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 80% None
3. graphiti_core/prompts/dedupe_edges.py:78
  • Draft comment:
    Typographical: It appears there's subject-verb disagreement in this sentence. Since "New Edges" is plural, consider changing "represents" to "represent" for grammatical consistency.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_vNN1LkzOVIYCsVZW

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@Shelvak
Copy link
Author

Shelvak commented Sep 1, 2025

I have read the CLA Document and I hereby sign the CLA

danielchalef added a commit that referenced this pull request Sep 1, 2025
@Shelvak
Copy link
Author

Shelvak commented Sep 1, 2025

I posted the PR before finishing the summary, so tagging you here cause it's your code mainly @prasmussen15 . If you need me to add/change anything else, let me know 🤝

AIXerum pushed a commit to AIXerum/graphiti that referenced this pull request Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants