frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Vector search isn't the hard part. Deciding what should be searched is

1•milan_•1h ago
Over the last few weeks I've been redesigning the retrieval pipeline for an AI knowledge system.

Initially, the architecture was fairly typical:

User Question │ ▼ Vector Search │ ▼ Top K Chunks │ ▼ LLM

It worked well while the knowledge base was small.

As more documents were added, I started seeing a few recurring problems:

More irrelevant chunks being retrieved.

Larger prompts and increasing token costs.

Multiple documents discussing the same topic competing with each other.

Vector search returning semantically similar chunks from documents that weren't actually the best source of truth.

I realized the problem wasn't vector search itself.

It was deciding what should be searched before semantic retrieval even began.

Instead of treating every document equally, I separated the system into two independent stages.

Ingestion

During document upload, every document is processed once.

The pipeline extracts structured metadata including:

document type

business role

departments

topics

planner summary

retrieval keywords

authority score

importance score

answerable questions

That information is stored in a SQL registry, while document chunks and embeddings are stored separately in a vector database.

Document │ ▼ Metadata Extraction │ ├────────► SQL Registry │ └────────► Chunking + Embeddings │ ▼ Vector Store

Query Time

Instead of querying the vector database immediately, the retrieval flow became:

User Question │ ▼ Intent Analysis │ ▼ Registry Ranking │ ▼ Retrieval Planner │ ▼ Selected Documents │ ▼ Vector Search │ ▼ Context Assembly │ ▼ LLM

The registry acts as a lightweight ranking layer.

Rather than searching every document, it produces a ranked candidate set based on signals such as:

authority

importance

approval state

departments

document role

planner summary

retrieval keywords

topic overlap

The planner then decides which documents should actually participate in vector retrieval.

The vector database never searches the entire workspace anymore.

Only the planner-selected documents.

A few other changes made a noticeable difference:

similarity thresholding before accepting chunks

duplicate chunk removal

token budgeting before generation

dynamic chunk limits based on query type

ranking retrieved chunks before assembling context

One interesting observation was that improving retrieval often had a larger impact on answer quality than changing the generation model.

I'm curious whether others have moved beyond "vector search first" architectures.

If you've experimented with retrieval planning, metadata-driven routing, or hybrid retrieval systems, I'd be interested in hearing what worked and what didn't.

Enterprise Haskell at H-E-B

https://blog.haskell.org/enterprise-haskell-at-h-e-b/
1•cosmic_quanta•9s ago•0 comments

Responding to AI Distillation Without Panic

https://www.lawfaremedia.org/article/responding-to-ai-distillation-without-panic
1•EA-3167•1m ago•0 comments

Bank of AI

https://docs.bankofai.io/
1•2a0c40•1m ago•0 comments

JEP 401: Value Objects (Preview)

https://openjdk.org/jeps/401
1•lichtenberger•2m ago•0 comments

Companies turn to Chinese AI models to cut costs

https://www.ft.com/content/9c8ff45b-7c20-4c2e-93c9-c52339ffdcee
1•bookofjoe•2m ago•1 comments

Netflix says around 300 titles used generative AI

https://www.theverge.com/streaming/966633/netflix-ai-titles-q2-2026-earnings
1•rarisma•4m ago•0 comments

Scaling to 1M concurrent sandboxes in seconds

https://modal.com/blog/scaling-to-1-million-concurrent-sandboxes-in-seconds
2•thundergolfer•5m ago•0 comments

America's Russia sanctions bill hits 60 co-sponsors

https://www.axios.com/2026/07/16/russia-sanctions-bill-lindsey-graham-senate
1•MilnerRoute•5m ago•0 comments

Splitting Large SwiftUl Views in the Apple's Way

https://emredegirmenci.substack.com/p/splitting-large-swiftui-views-in
1•emredegirmenci•6m ago•0 comments

Claude Code's system prompts, extracted and tracked across 237 versions

https://github.com/Piebald-AI/claude-code-system-prompts
2•opwizardx•9m ago•0 comments

The Fog Machine

https://www.bitchute.com/video/gl8G9OFh4A4I/
1•untiledsource•9m ago•0 comments

EU orders Google to share search data, open Android to AI rivals competitors

https://www.euronews.com/my-europe/2026/07/16/eu-orders-google-to-share-search-data-open-android-...
5•devonnull•10m ago•1 comments

Essence: Only what you mean, not a word more

https://github.com/jurassix/essence
2•jurassix•13m ago•2 comments

Naked mole-rat queens produce odorous chemical that prevents others reproducing

https://phys.org/news/2026-07-naked-mole-rat-queens-odorous.html
1•gmays•14m ago•0 comments

Why Org Social is the ethical Fediverse alternative

https://en.andros.dev/blog/734c56f2/why-org-social-is-the-ethical-fediverse-alternative/
1•andros•14m ago•0 comments

Elfuse: Run ARM64/x86-64 Linux ELF Binaries on macOS Apple Silicon

https://github.com/sysprog21/elfuse
1•birdculture•17m ago•0 comments

I built an offline PDF editor for Android, 25 tools, no server, no ads

https://play.google.com/store/apps/details?id=io.novexio.docufix&hl=en_US
1•WalkerMod•18m ago•0 comments

Why Microsoft's $80B Xbox Bet Backfired

https://www.wsj.com/tech/why-microsofts-80-billion-xbox-bet-backfired-5da21593
1•lesbarclays•19m ago•0 comments

Architecting the Defaults

https://jessicabrentnall.co.uk/blog/architecting-the-defaults/
2•mooreds•20m ago•0 comments

I Owe My Life to the Commodore 64 – By Sung J. Woo

https://www.goto10retro.com/p/i-owe-my-life-to-the-commodore-64
1•rbanffy•20m ago•0 comments

PsiQuantum has a plan to make a quantum computer out of light

https://www.technologyreview.com/2026/07/14/1140356/psiquantum-plan-massive-quantum-computer-out-...
1•rbanffy•20m ago•0 comments

Autoportrait

https://philipweiss.net/autoportrait/
1•philipfweiss•21m ago•0 comments

Ahead of the Curve: The Love We Cannot Reach

https://mayachristobel.substack.com/p/ahead-of-the-curve-the-love-we-cannot
1•rendx•27m ago•0 comments

Inkwell: It's a New Kind of Wrapper for Exposing LLVM in Safe Rust

https://github.com/TheDan64/inkwell
1•fanf2•27m ago•0 comments

My new game is a 3D 90s fever dream that fits in only 1024 bytes

https://js1024.fun/demos/2026/25/bar
2•KilledByAPixel•29m ago•2 comments

Evolving Windows vulnerability management to meet speed of AI-powered discovery

https://blogs.windows.com/windowsexperience/2026/07/09/evolving-windows-vulnerability-management-...
2•gmays•29m ago•0 comments

Mathematics of Data Science

https://arxiv.org/abs/2607.11938
2•Anon84•31m ago•0 comments

Ferrari Creates a Fake Manual Transmission

https://www.core77.com/posts/144712/Ferrari-Creates-a-Fake-Manual-Transmission
5•sizzle•32m ago•0 comments

Try Echo Live – A powerful commenting system with hashtags, mentions, moderation

https://gossipstack.com/products/echo
3•iBuildMobileApp•37m ago•0 comments

Muse Spark 1.1 is now available on OpenRouter

https://twitter.com/alexandr_wang/status/2077805347134468378
2•ot•38m ago•0 comments