Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Handle edge case search queries better

Open olliestanley opened this issue 1 year ago • 4 comments

We should do some preprocessing of search_query here to prevent errors in edge cases, e.g. where the query ends with an operator like & or |.

Words separated by only a space and no operator also have no effect currently, we could modify these such that & is inserted automatically.

List of valid operations I am aware of:

&
|
<->
!

The syntax also allows combinations like &! and groupings via parantheses.

https://github.com/LAION-AI/Open-Assistant/blob/main/backend/oasst_backend/prompt_repository.py#L1023

olliestanley avatar May 29 '23 20:05 olliestanley

@olliestanley I'm willing to contribute to this one as a my kick-off here if you agree

jsugg avatar May 29 '23 23:05 jsugg

@olliestanley I'm willing to contribute to this one as a mi kick-off here if you agree

Hi, that would be great, thank you!

olliestanley avatar May 30 '23 07:05 olliestanley

Hi @jsugg any update on this?

olliestanley avatar Jun 12 '23 17:06 olliestanley

@olliestanley the code is ready; I just need to do some testing. PR will be there shortly (busy week @ work).

jsugg avatar Jun 14 '23 20:06 jsugg