DEV Community

Mayank Laddha
Mayank Laddha

Posted on

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay