Add search synonyms

I have been reading a lot here lately and see that ‘post’ and ‘reply’ seem to be used somewhat interchangeably.

If this were done, it would result in fewer bothersome questions when someone uses the wrong one of the two for their searching before they ask a question with a new topic (LOL it just happened to me, ‘delete post after’ did not produce the same results as ‘delete reply after’…)

Hence my topic question…

1 Mi Piace

Reply and post are not 100% interchangeable. In most usage we see here on Meta they are, but not always.

I’d suggest reviewing Discourse New User Guide, which describes what a post is. A reply is any post that is not the OP.

5 Mi Piace

But I would rather find what I am searching for even if I do not know the correct terminology.

For those more ‘in the know’, would they not still have the option of doing explicit searches with quotes around their explicit term of interest, for example “reply” :question:

Thanks, I will read that but do many other people read that before they make new topics here?

So, I read the ‘Discourse New User Guide’ and I am unable to find any explicit definition of ‘reply’.

But as I have quoted you above, a ‘reply’ is necessarily a ‘post’, so when someone searches for ‘post’ all ‘reply’ matches should also be presented…

Whether, a search for ‘reply’ should bring up all ‘post’ entries is also unknown after reading that guide.

So, I would still like to have the request of this topics’ title, acted upon. (but again, that is only my opinion)

A reply is necessarily a post but some posts are not replies so searching on post should not automatically add the reply search term.

If your preference is satisfied then it will annoy other users like myself who are only searching for post and not reply.

3 Mi Piace

But you are obviously ‘in the know’ and would likely just use an explicit search term without bothering people here with a new topic about why so many search results for ‘post’ are showing up in your ‘reply’ searches.

Regardless of the semantics of post/reply — adding synonyms to search isn’t something that can be configured in Discourse at the moment.

9 Mi Piace

Ok, that shuts me up :wink: but perhaps there should be a way to add them, I predict it could lessen the burden on the good people who respond to newbies on this great forum :slight_smile:

Actually, I do general searches and then follow relevant links that have some overlap with what I’m searching for.

Search engines have an idea of which links are followed. Discourse has something similar. “Suggested messages” at the end of the topic are a fruitful source of relevant topics not directly related to the specific search terms.

1 Mi Piace

I am recategorizing it as feature the feature request is pretty clear to me. It is asking for a place in the UX to define custom synonyms.

Postgres technically supports synonyms per:

So if you wanted to get your gloves off and be mega technical you could wire something today, but I agree that some time in the future adding a UI to allow mods to define this may be interesting.

Not putting a pr-welcome on this cause it is complicated and would take quite a while to get right with possible limited benefit.

Timeframe wise I would say this is something I expect not to get to in the next year and probably to get to within the next 5 years.

9 Mi Piace

Congratulations Dale :partying_face:

image

1 Mi Piace

Abbiamo aggiornato la nostra terminologia (Utente ora è “Membro”) e abbiamo aggiornato la nostra documentazione di conseguenza, ma vorrei poter fare in modo che chiunque cerchi Utente veda automaticamente i risultati che menzionano “Membro”. Avete qualche idea su un metodo semplice per raggiungere questo obiettivo?

CC: @michellefs

È una cosa abbastanza difficile, potremmo potenzialmente creare un plugin che inietta sinonimi nei dati indicizzati, ma si tratterebbe di un lavoro compreso tra 1 e 5 giorni.

Immagino che la grande domanda qui sia quanto sia importante per te? È fattibile ma richiederebbe una consulenza personalizzata da parte nostra.

1 Mi Piace

Non so niente, ma non è solo una questione di cambiare i testi dal lato della personalizzazione? O sto capendo di nuovo tutto completamente sbagliato?

Penso che la speranza sia di avere la capacità di influenzare indirettamente l’algoritmo di ricerca attraverso uno strumento come sinonimi di tag. Ma per qualsiasi parola chiave all’interno di un post (o almeno del post originale).

Un esempio di caso d’uso sarebbe per i membri della community/visitatori del sito che cercano le loro frasi colloquiali piuttosto che un gergo di marca simile. L’algoritmo di ricerca ha dato priorità ad argomenti molto diversi. Un esempio sul nostro sito sarebbe la ricerca di argomenti “app desktop” rispetto a “client nativo”.

Sono curioso di sapere se i punti di vista sugli errori di battitura sono cambiati nel corso degli anni:

In Discourse-AI abbiamo iniziato a sperimentare la ricerca semantica. Siamo ancora agli inizi e stiamo ancora esplorando questi sistemi.

L’utilizzo degli LLM per migliorare il prompt di ricerca è anche un approccio possibile (sebbene oggi lento):

Questa tecnica è menzionata qui: GitHub - texttron/hyde: HyDE: Precise Zero-Shot Dense Retrieval without Relevance Labels


Oltre agli approcci automatizzati al 100%

La nostra strategia generale qui è di iterare. Abbiamo già le “parole monitorate” nel prodotto, non mi dispiacerebbe una funzionalità che aggiunga “Sinonimi di ricerca” dove si specificano errori di battitura comuni e frasi comuni che si desidera “inserire”. Non è un lavoro programmato ma certamente qualcosa che si potrebbe prendere in considerazione per sponsorizzare.

Esiste un precedente per questa esatta funzionalità in Postgres secondo: https://www.postgresql.org/docs/current/textsearch-dictionaries.html#TEXTSEARCH-SYNONYM-DICTIONARY

L’altra area che sono aperto a esplorare (sono solo tiepido su questo) è consentire un posto “metadati” nascosto nei post, dove gli amministratori possono inserire termini di ricerca. È molto, molto invisibile e generalmente consiglio di “inserire” correttamente le parole in modo che non vengano nascoste, ad esempio:

SEO

semantico, correlato, miglioramento

2 Mi Piace

Shocked Cosmo Kramer GIF

È un’idea di puro genio, risolve il problema principale della ricerca basata su embedding: l’input utente errato.

E richiede modifiche minime alla nostra configurazione esistente, poiché è sufficiente aggiungere un piccolo passaggio di “arricchimento” della query di ricerca :exploding_head:


Su questo argomento, qualcosa che possiamo anche fare è una ricerca ibrida:

  • Ricerca utilizzando la ricerca full-text PG esistente
  • Ricerca utilizzando embedding
  • Raccogliere entrambi i migliori 50 risultati
  • Passare a un servizio di riordino della ricerca
  • Mostrare i risultati riordinati

Abbiamo già un riordinatore super capace nella nostra API di embedding esistente sotto un endpoint separato, questo ha tutti i pezzi necessari pronti per accadere.

Esempio qui:

https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search.py#L67-L70

6 Mi Piace