llmware-ai / llmware-ai/llmware

Library.delete_installed_embedding(model_name, vector_db) modifies associated sqlite library record inconsistently

Open
#1,094 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
14.8k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

environment: llmware v0.3.8, Apple Silicon macos 14.7, arm64, LLMWARE active_db set to sqlite, and vector_db set to chromadb

issue: after successfully installing embedding to an existing library

  • in the database, before a library has an embedding installed, on the library table, under embedding column initial value is:
    [{"embedding_status":` "no", "embedding_model": "none", "embedding_db": "none", "embedded_blocks": 0, "embedding_dims": 0, "time_stamp": "NA"}]

  • after successfully installing an embedding, in database -the library table updates embedding value as expected eg.:
    [{"embedding_status":` "yes", "embedding_model": "mini-lm-sbert", "embedding_db": "chromadb", "embedding_dims": 384, "embedded_blocks": 592, "time_stamp": "Mon Nov 4 14:18:37 2024"}]

  • thereafter, if embedding is deleted (programatically) using:
    Library.delete_installed_embedding(model_name, vector_db)
    in the database, library table, embedding column value is updated unexpectedly to:
    []
    with no content within the square brackets

attempting to install a new embedding on the associated library (even if same embedding dims) typically fails, whereas attempting to delete the same embedding that was just installed also fails. Manually repopulating the value in the db with the initial one... ie:
[{"embedding_status":` "no", "embedding_model": "none", "embedding_db": "none", "embedded_blocks": 0, "embedding_dims": 0, "time_stamp": "NA"}]

...is an effective but tedious workaround.

What is the correct and intended behavior of
Library.delete_installed_embedding(model_name, vector_db)

?

Contributor guide

No contributing guide indexed for this repository

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

Start by locating Library.delete_installed_embedding(model_name, vector_db) and tracing how it updates the SQLite library table's embedding column. Reproduce the install-then-delete sequence described in the issue; done should be defined by the intended post-deletion record state and whether a new embedding can be installed afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.