Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
15 lines
1.0 KiB
Plaintext
15 lines
1.0 KiB
Plaintext
# Ingesting the same handbook more than once (real PostgreSQL + pgvector)
|
|
|
|
rows are counted with: select count(*) from vector_store
|
|
1. first upload -> status=ingested chunksWritten=4 chunksReplaced=0 | rows in table=4, texts embedded so far=4
|
|
2. same bytes again -> status=skipped chunksWritten=0 chunksReplaced=0 | rows in table=4, texts embedded so far=4
|
|
3. page 2 edited (20 -> 22 days) -> status=updated chunksWritten=4 chunksReplaced=4 | rows in table=4, texts embedded so far=8
|
|
rows still saying "20 working days": 0, rows saying "22 working days": 1
|
|
4. same text, exported again -> status=updated chunksWritten=4 chunksReplaced=4 | rows in table=4, texts embedded so far=12
|
|
the two PDFs have identical text and different bytes: true
|
|
the file hash is a hash of bytes, so a re-export counts as a change and is re-embedded
|
|
|
|
--- the naive version: vectorStore.add() on every upload, nothing remembered ---
|
|
the same 4 chunks added on two more uploads: rows in table 4 -> 12
|
|
rows saying "22 working days" now: 3
|