DEV Community

Mayank Laddha
Mayank Laddha

Posted on

1 1

Faiss with sqlite for RAG

Want to use faiss for Local RAG? Okay, but where to store my chunks(metadata).
Solution: Connect faiss with sqlite(or any other sql).
How: Keep vectors in faiss, data in sqlite.

Benefits:

  • Use faiss for vector data(what it has been made for) and sqlite for normal data(what it has been made for).

  • Often, you already have a database. You might only need to create an additional table or columns.

  • You get support for full text search in most of the database engines: be it sqlite or postgres.

Of course, you can try pgvector, but using FAISS comes with its own advantages. Ultimately, it depends upon your use case.

Image description

Link to the repo

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay