r/MachineLearning • u/NielsRogge • 7d ago
Project How we built a SOTA search engine using PostgreSQL, pgvector, and Qwen3 embeddings [P]
I wrote a technical breakdown of how search works on Papers with Code.
The system combines keyword and semantic search, which produced better results than either approach alone. The stack includes:
- PostgreSQL with pgvector
- Qwen3-Embedding-0.6B for text embeddings
- Hugging Face Jobs with an NVIDIA L4 for batch embedding generation
- Hugging Face Buckets for storing artifacts
- A live embedding model served through Hugging Face Inference Endpoints
The same infrastructure also powers the “related papers” recommendations shown on individual paper pages.
Full write-up: How Hugging Face Inference Endpoints, Jobs, and Buckets Power Search on Papers with Code
I’d be interested to hear how others are implementing hybrid search for research papers or similarly technical content.
Disclosure: I work at Hugging Face and on Papers with Code.
0
u/SirPitchalot 7d ago
This particular example is not working in your favour. A basic one word physics term finding an 11 year old paper in a niche field.
1
u/dioenatosenzadenti 7d ago
Niche field? That paper started diffusion models lol
-1
u/SirPitchalot 7d ago
Diffusion, the PDE that Fourier (yes that Fourier) introduced the underpinnings of in 1822 and which governs heat transfer, key aspects of fluid flow, all manner of regularizers & energy terms in computational physics, that was used in the Manhattan project plus more recently anisotropic diffusion in computer vision for the past roughly 30 years and finally, yes, also the fancy schmancy slop generators some associate it with today?
Literally any commercial electronics you own has used this for thermal modelling. Including the GPUs you need to run contemporary diffusion models.
So yeah “niche field”. It’s been around 11 years out of 204 that the concept has been an absolute powerhouse of scientific progress. That’s why this search engine sucks.
0
u/dioenatosenzadenti 6d ago
This is like calling Deep learning niche because it uses matrix algebra hahahha
1
u/SirPitchalot 6d ago
Do you think that matrix algebra is “niche”? I sure hope not…
“Deep learning” does not rename a fundamental mathematical topic that’s been in widespread use in scientific literature for two centuries. “Diffusion” being subsumed into diffusion models does.
It’d be like search for “attention” and having only results for transformers come back rather than the definition of the word, results from cognitive psychology and so on. Or “reasoning” redirecting only to “reasoning models”.
23
u/abnormal_human 7d ago
What exactly makes this SOTA? It's been well known that combining FTS with semantic search is an improvement over either alone for over decade. Google incorporated word2vec and bert based approaches into search by 2020. Is there something novel here, because all I'm seeing is an ad for huggingface's cloud services.