Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Document/Chunk ID management #222

Merged
merged 17 commits into from
Jan 2, 2025
Prev Previous commit
Next Next commit
Do not change chunk UID after embeddings
  • Loading branch information
stellasia committed Dec 30, 2024
commit 6ea967c8d308057d69e4309d5704b69d2ae0522a
5 changes: 4 additions & 1 deletion src/neo4j_graphrag/experimental/components/embedder.py
Original file line number Diff line number Diff line change
@@ -57,7 +57,10 @@ def _embed_chunk(self, text_chunk: TextChunk) -> TextChunk:
metadata = text_chunk.metadata if text_chunk.metadata else {}
metadata["embedding"] = embedding
return TextChunk(
text=text_chunk.text, index=text_chunk.index, metadata=metadata
text=text_chunk.text,
index=text_chunk.index,
metadata=metadata,
uid=text_chunk.uid,
)

@validate_call