simonw / simonw/llm

Duplicate the --save feature from openai-to-sqlite similar

Open
#230 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://github.com/simonw/openai-to-sqlite/blob/361d98a7f260a1420e6e698481f298848b922253/README.md#saving-similarity-calculations-to-the-database

This is the feature that can be used to save calculated similarity scores to the database. I use it to serve related TILs on my TILs site: https://til.simonwillison.net/llms/openai-embeddings-related-content

openai-to-sqlite similar embeddings-bjcp-2021.db \
  --all --save

And this feature too:

openai-to-sqlite similar embeddings-bjcp-2021.db \
  '23G Gose' '01A American Light Lager' \
  --save \
  --recalculate-for-matches \
  --count 20

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

Read the linked openai-to-sqlite README section and compare its --save and --recalculate-for-matches behavior with the llm project's similar command. Locate the implementation and existing command coverage for similar, then make the two shown invocation patterns save calculated similarity scores and support recalculation for matches.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.