aws-samples / aws-samples/bedrock-chat
Upsert pgvector records
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 535
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 10
Description
Current implementation [deletes all of chunks before creating](https://github.com/aws-samples/bedrock-claude-chat/blob/main/backend/embedding/main.py#L49-L82) to keep idenpotency. But upsert operation is better in terms of performance especially for large dataset.
Primary key may need to be changed as: `s3_uri + ':' + chunk_num `
Contributor guide
Research direction
Start with backend/embedding/main.py, especially lines 49-82, to understand how chunks are currently deleted and recreated. Then inspect the existing pgvector record structure and primary-key handling. Done means replacing the full deletion flow with an upsert that remains idempotent for large datasets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100