Skip to content
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

experimental proposal: add full text search as an alternative to semantic search #6

Open
ghost opened this issue Jul 29, 2024 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 29, 2024

Right now, search for document chunks is performed in a "semantic" way using vector similarity. An alternative approach might be to use full text search (full text is already built into Postgres).

Changes required:

  • rag/load.py: store the ts_vector along the text and embedding vectors

  • rag/librag.py, function search() perform full text search (with stemming and stop words)

One could make full text search optional and if enabled the ranking is done by adding in a weighted way full text search rank and vector similarit search rank.

-- Chris Mair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants