aws-samples / aws-samples/bedrock-chat

Upsert pgvector records

Open
#150 1 comment 3 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.