1 min readfrom Machine Learning

How we built a SOTA search engine using PostgreSQL, pgvector, and Qwen3 embeddings [P]

Our take

Papers with Code now delivers superior search results through a hybrid approach combining keyword and semantic analysis. Our system leverages PostgreSQL with pgvector for efficient vector storage, Qwen3 embeddings for nuanced text understanding, and Hugging Face's infrastructure—Jobs, Buckets, and Inference Endpoints—to power both search and related paper recommendations. This architecture, detailed in our technical breakdown, demonstrates a scalable solution for research content.
How we built a SOTA search engine using PostgreSQL, pgvector, and Qwen3 embeddings [P]

The recent technical deep-dive from Papers with Code detailing their search engine architecture is a compelling illustration of how readily accessible tools can be combined to achieve impressive results. Their approach, blending keyword and semantic search powered by PostgreSQL, pgvector, Qwen3 embeddings, and Hugging Face’s ecosystem, highlights a pragmatic and increasingly common strategy for tackling complex information retrieval challenges. It’s a welcome departure from the hype surrounding “revolutionary” AI solutions, grounding the conversation in practical implementation. This contrasts with the recent news of Alabama launching an investigation into OpenAI’s hack of Hugging Face [Alabama launches investigation into OpenAI’s hack of Hugging Face], demonstrating the importance of robust infrastructure and security in this rapidly evolving landscape, and echoes the broader discussions around the potential valuation of Hugging Face [Hugging Face reportedly in talks to be acquired for $13B]. The fact that they've built this on relatively accessible components speaks volumes about the democratizing effect of the open-source AI movement.

What makes this particularly noteworthy is the emphasis on a hybrid search model. While semantic search, leveraging embeddings to understand the *meaning* of text, has gained significant traction, it’s often prone to limitations when dealing with highly technical content or nuanced terminology. Combining it with traditional keyword search—which ensures that specific terms are matched—creates a more robust and reliable system. The Papers with Code team’s experience reinforces the idea that the most effective solutions often involve thoughtfully integrating different approaches, rather than chasing a single "magic bullet." Furthermore, the utilization of Hugging Face Jobs and Buckets for managing the embedding generation and storage demonstrates a keen understanding of scaling AI workloads – a crucial consideration for any organization dealing with substantial data volumes, a point highlighted in our analysis of the challenges facing enterprise AI agents [Enterprise AI agents are only as reliable as the messiest documents behind them].

The choice of Qwen3 embeddings is also interesting. While larger models often garner more attention, Qwen3-Embedding-0.6B strikes a balance between performance and efficiency, suggesting a pragmatic approach to resource allocation. The team’s decision to serve the embedding model through Hugging Face Inference Endpoints further underscores their commitment to leveraging existing infrastructure and simplifying deployment. This entire architecture—from embedding generation to live inference—is designed for scalability and maintainability, reflecting a future-focused mindset. The fact that this same infrastructure also powers the “related papers” recommendations speaks to the inherent efficiencies of a well-designed system; repurposing components to serve multiple functions maximizes value and minimizes redundancy.

Ultimately, Papers with Code's implementation serves as a valuable case study for anyone working with research papers or similarly specialized technical content. It demonstrates that building a powerful search engine doesn’t require a massive investment in bespoke infrastructure. Instead, it requires a thoughtful combination of existing tools and a clear understanding of the underlying problem. The invitation to hear how others are implementing hybrid search is particularly relevant, signaling a growing recognition that this approach is essential for achieving optimal results. As the volume of technical literature continues to explode, the ability to efficiently and accurately retrieve relevant information will only become more critical. A key question to watch is how these approaches will evolve as embedding models continue to improve and become even more accessible, and whether more complex architectures will emerge to further refine the search experience.

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.

submitted by /u/NielsRogge
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article