---
title: "Discussion on \"My RAG Stack for Code Retrieval: pgvector HNSW + Metadata Filters + Reranking (and the Parts I Refuse to Guess About)\" | Hashnode"
description: "Discussion on \"My RAG Stack for Code Retrieval: pgvector HNSW + Metadata Filters + Reranking (and the Parts I Refuse to Guess About)\". I sat down to write the pgvector section of this post—the HNSW index DDL, the reranker batching, the metadata filter shapes—and realized I kept reaching for the wrong file. The query I was proud of wasn’t the vector search. It was dedupeRagChunks.\nTh..."
url: "https://hashnode.com/posts/my-rag-stack-for-code-retrieval-pgvector-hnsw-metadata-filters-reranking-and-the-parts-i-refuse-to-guess-about/69b06c67ac1d39a127d29741"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [My RAG Stack for Code Retrieval: pgvector HNSW + Metadata Filters + Reranking (and the Parts I Refuse to Guess About)](https://craftedbydaniel.hashnode.dev/my-rag-stack-for-code-retrieval-pgvector-hnsw-metadata-filters-reranking-and-the-parts-i-refuse-to-guess-about?utm_source=hashnode&utm_medium=feed)

I sat down to write the pgvector section of this post—the HNSW index DDL, the reranker batching, the metadata filter shapes—and realized I kept reaching for the wrong file. The query I was proud of wasn’t the vector search. It was dedupeRagChunks. Th...

Mar 10 · 6 min read · craftedbydaniel.hashnode.dev  
Updated Mar 23  
Read the article

-   [#embeddings](https://hashnode.com/tag/embeddings)
-   [#pgvector](https://hashnode.com/tag/pgvector)
-   [#rag](https://hashnode.com/tag/rag)
-   [#retrieval](https://hashnode.com/tag/retrieval)

## Written by

[Daniel Anthony Romitelli Jr](https://hashnode.com/@romiteld)

@romiteld · East Aurora NY

  
[View profile](https://hashnode.com/@romiteld)

AI engineer. LLM agents, RAG, Azure AI Foundry, Python/TypeScript. Navy veteran. Builder of Scenematic, Pramaana, and production multi-agent systems. I write about what I actually ship.

Sr. AI Engineer &amp; Architect. Building deterministic, context-aware AI for enterprise production.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
