10
105
Fork
You've already forked web
30

About category and search : embeddings #947

Open
opened 2025年05月12日 17:54:46 +02:00 by laem · 2 comments
Owner
Copy link

Explore the implications of modern LLM embeddings for cartes.app https://news.ycombinator.com/item?id=43963868

Explore the implications of modern LLM embeddings for cartes.app https://news.ycombinator.com/item?id=43963868
Author
Owner
Copy link

See the embeddings branch where I tried ternlight. Not convinced, but I'm maybe doing something wrong.

Also see if responses to https://news.ycombinator.com/item?id=48814963

Awesome. We have a dictionary of words to OpenStreetMap tags here : https://codeberg.org/cartes/web/src/branch/master/components...

Do you think your work could help us let users type "pancake" and get "crêpe" without writing an explicit "pancake = crêpe" dictionary entry ?

In practice : if I understand well, your lib would first need to download 5 Mb, once and for all, and would then be used as we use Fuse.js right now ?

How well does it handle languages other than English ?

Could it be "trained" on the OpenStreetMap tag wiki ?

Thanks a lot for your work.

See the `embeddings` branch where I tried ternlight. Not convinced, but I'm maybe doing something wrong. Also see if responses to https://news.ycombinator.com/item?id=48814963 > Awesome. We have a dictionary of words to OpenStreetMap tags here : https://codeberg.org/cartes/web/src/branch/master/components... Do you think your work could help us let users type "pancake" and get "crêpe" without writing an explicit "pancake = crêpe" dictionary entry ? In practice : if I understand well, your lib would first need to download 5 Mb, once and for all, and would then be used as we use Fuse.js right now ? How well does it handle languages other than English ? Could it be "trained" on the OpenStreetMap tag wiki ? Thanks a lot for your work.
Author
Owner
Copy link

Commentaire intéressant.

The OSM tag wiki would probably not make for good training data because it only has a single short description for each tag (and even on the French wiki many descriptions seem to be in English?) whereas you want to map multiple descriptions to the same tag.
Ideally you would have real query data (e.g. from cartes.app telemetry), then you could get a LLM to write a bespoke Overpass query for each one and use that as the ground truth. Alternatively, start from the list of OSM tag values used in the wild and ask an LLM to list possible reasons to visit that POI.
You could then use that data to finetune an embedding model for your use case. But, you know, somewhere in that model there's going to be a token vocabulary that the model knows about and at the other end you get a similarity score for each tag value. If you don't need to support complex queries where interactions between words matter ("any restaurant that is NOT Korean"), you could get away with a simple list of words and tags that they match to. Which is right where you started, except it could be more exhaustive. Why limit yourself to two Korean dishes when you can have a LLM list many more for you?
Commentaire intéressant. ``` The OSM tag wiki would probably not make for good training data because it only has a single short description for each tag (and even on the French wiki many descriptions seem to be in English?) whereas you want to map multiple descriptions to the same tag. Ideally you would have real query data (e.g. from cartes.app telemetry), then you could get a LLM to write a bespoke Overpass query for each one and use that as the ground truth. Alternatively, start from the list of OSM tag values used in the wild and ask an LLM to list possible reasons to visit that POI. You could then use that data to finetune an embedding model for your use case. But, you know, somewhere in that model there's going to be a token vocabulary that the model knows about and at the other end you get a similarity score for each tag value. If you don't need to support complex queries where interactions between words matter ("any restaurant that is NOT Korean"), you could get away with a simple list of words and tags that they match to. Which is right where you started, except it could be more exhaustive. Why limit yourself to two Korean dishes when you can have a LLM list many more for you? ```
Sign in to join this conversation.
No Branch/Tag specified
master
chore/i18n-missing-strings-step-3
abostats
SynchroM-master
gps
embeddings
lysios-patch-5
lysios-patch-4
lysios-patch-3
lysios-patch-2
lysios-patch-1
abo-serveur2
clim
zone-en-favori
categories_toujours_visibles
rechercher_ici_avant_resultats
test-2365
panoramax-contribution
add-categories-validations
gel-bug-prod
osm-note-2
broken
wikidata_booking
fuse7.3
lysios-patrimoine-3
gps2
atproto-fix-2
styles-secondaires-mais-maison
atproto-scopes
itineraire-printemps-2026
modal-sheet-5.6
nlnet-cost-climate-perf
pb-icones-religieux
couvoiture
etiennejr-patch-2
meteo-fainéante
logo-static-url
poc-page-vitrine
remove-compass
test-reproduce-1795
display-cycleway-lanes-2
poc-image
add-media-condition
mapterhorn
test-indoor-equal
outdoors-VS-indoorEqual
hiking-colors
fix-blog-typing
poc-next-international
fix-map-style-modal-not-closing
i18n
hide-odd-zoom-levels
filter_categories
resume_wikipedia
deplacement_bouttons
fix-1095
mobile_permettre_selection
position-carte-initiale
dégradé-icônes
better_wikipedia
affichage_donnees_wikidata
mobile-permettre-selection
avis-details
perf-seo
modal-sheet-5
plans-novembre
display-cycleway-lanes
fix-1227
fix-1234
etiennejr-patch-1
update-1240
fix-1236
fix-1131
photon-search-street
fix-1221
article-avis
net-haut-zoom
baies-moins-visibles
belles-fiches-lieu
fix-1157
bug-page-vie-privée
use-watername
fix-1176
carte-du-onde
fix-1166
page-news
tchou
add-icon-alias
vitesse
photon-opensearch
private-in-italic
bâtiments-3D
merge-categories
handle-private-highway
improve-findcategory
injection-pmtiles
fix-1128
check-icons
update-readme
category-rugby
bug-position-carte-vs-lieu
limites-vitesse
improve-find-category-from-tags-v2
integrer
document-osmfeature
translate-document
velo-fin-aout-25
velo-ete-2025
moins-de-maptiler
planet-pmtiles-tilemaker
fix-1048
panoramax-leger
plume
horaires-i18n
planet
maj-deps-juillet-2025
improve-find-category-from-tags
bug-encart
interactions-encart-mobile
clic-on-station
fix-1028
fix-1014
edit
add-big-rivers
add-shortbread-tiles
handle-deleted-osm-elements-v2
codeberg
improve-useEffect
immoloc
update-dashboard
analyze
terradraw
sombre2
calendar
poi-sprites-using-svg
style-sombre
sprites
annuaire
motis-gtfs-attributes
next-styled-components
dev
cool2
cool
panoramax-angle
env-static-urls
borders-only
panoramax2
intelligence
debug-iles
nouveau-serveur
france-protomaps
turbo
fouss/cartes-#338
blog2
legislatives
presentation
pas-de-geoloc-si-hash-different
protomaps
vaul
carte-trains
citiz
maj-paquets
icones
ui2
bblog
voyagevoyage
test-image-origine
bugimagefin
searchParams
voyage
avion
perf
studio
piscine
journée
année
journée-transition
score-dès-acceuil
fix-space-problem
rebase-5août
correspondance
règles-séparées
indeps-acre
demo
indeps
indeps-cachés
indication-temps-plein
indeps-refactor-simulations
indeps-vue-comparaison
indeps-inversion
barème-continu
indeps-démo
textes-branches-sécu
engine-enum
2019
transport
publicodes
as
infrance-nouvelle-landing
better-translation
co2
simplifATMP
controle-SMIC
webi18n
bug-avantages-en-nature
revert-352-infrance-navigation-v2
laem-patch-1
robots.txt
improve-perf
iframe-bugfix
quickfixes
lib
irsimple
hiringinfrance.com
dégradé
refstate
johan
zrr
logo-interactif
revert-216-improve-tracking
redesign2
zrr2
fixtrad
correction-salaire-brut
petit-state
alien-consolidate
translate-ui
npm
alien-brut-net
translatable
différent
ir18
fix-typo
add-tracking
fix-collect-missing
défauts-partout
fix-double-unfold-three
fix-double-unfold
versement-transport
blocker-questions
v3
v2.1
v2
v1
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
0.7.0
v0.5.1
v0.5.0
v0.4.2
v0.4.1
v0.4.0
v0.3.3
v0.3.2
v0.3.1
v0.3
v0.2
v0.1-cdd-alpha
v0-démo-tag-nav
Labels
Clear labels
🎨 Design
À propos de l'interface et de l'UX
💡 Idée
Nouvelle feature à intégrer
question
Further information is requested
🌍 OSM
À propos de l'affichage et l'édition des éléments OSM
🌱 Amélioration
Amélioration/fix de l'existant
🐞 Bug
Something isn't working
📊 SEO
📋 Catégories
À propos des catégories de recherche et de l'annuaire
📖 Wiki
📝Avis
A propos de la fonction avis et de bluesky
📢 Oyez
📷 Photos
A propos des photos (sources, affichage)
🔍Recherche
A propos de la barre de recherche et de photon
🔥 Actuel
🔧 tech
🖌 Styles
Styles de la carte
🧝i18n
🧪 R&D
🚍 Transports
🚙 Voiture
🚨Prioritaire
Ticket à traiter rapidement
🚲Vélo
Cartes
climat
Communication
demo
Cette branche doit être déployée comme une démo
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update javascript code
Pas urgent
Plein-air
Tuiles
Verso
Vieux
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cartes/web#947
Reference in a new issue
cartes/web
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?