-
-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llm similar command for searching against embeddings #190
Comments
I'm tempted to do something clever to help support vector search engine plugins in the future. What if the Having a There's one catch though: deletions. One mechanism that could work: when you delete a record from the That way any indexing mechanisms can scan through the table for stuff modified since their last check, and delete any records with I thought I'd need to add a |
Got this working! Tested it against my TILs with this script: #!/bin/zsh
# Define the root directory where we look for .md files
ROOT_DIR=~/Dropbox/Development/til
# Use find to locate all .md files under the root directory
find "$ROOT_DIR" -type f -name "*.md" | while read -r filepath; do
# Extract the filename and parent directory
filename=$(basename "$filepath")
parent_dir=$(basename $(dirname "$filepath"))
# Concatenate parent directory and filename
name_of_file="${parent_dir}/${filename}"
# Run the llm command with the found .md file
cat "$filepath" | llm embed tils2 "$name_of_file" -m sentence-transformers/all-MiniLM-L6-v2
echo $filepath
done Now I can do this: llm similar tils2 hacker-news/recent-comments.md -n 4 And get back:
|
Still needs tests and documentation. |
I'd like to solve this too: |
Got this working too: llm similar tils2 -c 'sqlite python'
|
This can now be refactored to use: It should also grow the ability to return stored content and metadata, if both stored and requested. |
Oh looks like I mostly refactored it already: Lines 1018 to 1048 in de6d257
One point of confusion: the |
It's very broken right now:
|
Even more broken if you ask for a collection ID that does not exist:
|
The standard input trick doesn't work:
|
Originally posted by @simonw in #185 (comment)
The text was updated successfully, but these errors were encountered: