Skip to content

echiner/vector-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing pg_vector

Follow these steps:

  • Start Docker and run docker compose (docker compose up -d)
  • Create the database and table (postgre.sql)
  • Insert the data (insert.py)
    • This will insert a list of random texts generated by ChatGPT, together with their embedding generated by the OpenAI API
  • Query the data (query.py)
    • This will ask you for a prompt, generate the embedding for the question and then query the database using pg_vector search (L2 distance) and return the two closest texts

About

Several tests of vector search (used in LLMs)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages