←back to thread

6 points mihaela | 1 comments | | HN request time: 0s | source
Show context
JSR_FDED ◴[] No.46130582[source]
I’ve also recently been through the challenge of AI-enhanced (semantic) search. Ordering the results is very, very necessary. It’s both art and science, and absolutely requires domain knowledge.

From the article, these are the heuristics the OP applied for searching Apple documentation:

* Core types over extensions - View ranks above View+Accessibility * URL depth analysis - /documentation/swiftui/view beats /documentation/swiftui/view/some/nested/thing * Title pattern detection - Exact matches surface first * Modern over deprecated - Current APIs rank higher

replies(1): >>46142288 #
1. mihaela ◴[] No.46142288[source]
Totally agree—ranking is both art and science. Beyond what I listed, I'm also penalizing nested types, boosting based on query patterns ("X protocol" → boost protocols), and inferring kind from URL depth when metadata is missing.

Still actively crawling docs (at 111k now) and vector/semantic search is on the roadmap.