simonw / simonw/llm

Calling `llm embed` with the same content but different --store settings does not update the table

Open
#224 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug embeddings
Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

Just noticed this:

paginate-json 'https://api.github.com/repos/simonw/llm/issues?state=all&filter=all' > issues.json

cat issues.json | jq '[.[] | {id, title, body}]' | llm embed-multi llm-issues -

That worked and populated my llm-issues collection with 215 records. But then I realized I should have passed --store to store the content too. So I ran this:

cat issues.json | jq '[.[] | {id, title, body}]' | llm embed-multi llm-issues - --store

But the content column was not populated, because the code noticed that the content_hash had not changed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two shown llm embed-multi llm-issues - commands, first without and then with --store. Trace the handling of content_hash and --store; done means rerunning with changed store settings populates the content column for existing records.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.