LAION-AI/Open-Assistant

Handle edge case search queries better

Open

#3.259 geöffnet am 29. Mai 2023

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (3.263 Forks)batch import
backendgood first issue

Repository-Metriken

Stars
 (37.363 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide