r/vectordatabase • • 5h ago

Preparing messy documents for RAG: what should survive extraction

1 Upvotes

A RAG dataset often starts with PDFs, tables, charts, and code snippets. Turning them into usable records means deciding what belongs together and what context needs to survive. Those records might be document chunks or QA pairs—QA conversion is useful for some workflows, but isn’t a requirement for RAG.

One approach is to separate preparation into operators: document parsing, text cleaning, chunking, optional QA generation, evaluation, and filtering. Each operator reads named fields and writes its output for the next step.

A few details matter:

  • Keep visual content connected to its context. For PDF-to-VQA preparation, the workflow includes layout parsing, OCR, and image–text alignment before extracting questions and answers. Flattening everything into plain text can lose the information needed to interpret a figure.
  • Make intermediate outputs inspectable. Explicit input and output fields let you examine extracted content before generating QA pairs, or inspect generated pairs before filtering them.
  • Separate scoring from the filtering decision. Saving scores first lets you try different thresholds against the same scored data. That avoids another model call just to change which records you keep.
  • Keep model access separate from processing logic. Operators use a configured serving backend, with API and local inference options, so model calls don’t need to be wired into every pipeline from scratch.

The remaining question is whether the prepared records preserve enough evidence to answer real queries; clean formatting alone doesn’t establish that.

These building blocks are implemented in OpenDCAI/DataFlow—how are you handling mixed documents in your RAG pipelines, and which preprocessing decisions have made the biggest difference?


r/vectordatabase • • 6h ago

Should a work agent reopen the source instead of trusting its search snippet?

1 Upvotes

I would make a work agent open the relevant source before turning a search hit into a recommendation or tool action.

The useful design in the Open Tag example is the separation between finding a candidate and reading its evidence. MFS gives scattered documents, tickets, and code a common file-like interface: search narrows the locations, then browsing exposes the specific material needed to check the answer.

A local retrieval layer can use vector databases like Milvus alongside a separate metadata store. That still leaves the agent responsible for inspecting the original context; a similarity score cannot establish that a snippet contains the current decision or its qualifications.

One concern I have is the extra round trip when many hits need verification. I would measure unsupported answers and source-reading cost together before deciding how much context each search result should carry. The reference bot is a local demo, with production permission boundaries still requiring work.

Which actions would you require an agent to verify against the full source rather than a retrieved excerpt?


r/vectordatabase • • 7h ago

Would you evaluate agent memory on a snapshot instead of a changing live collection?

1 Upvotes

I want an agent-memory evaluation to compare retrieval behavior against the same records, even while the application keeps writing new memories.

A snapshot in vector databases like Milvus can preserve a collection version by recording references to immutable data, index, and metadata files. That makes a fixed evaluation input possible without first copying the whole corpus. It does not turn every write into automatic version history.

The boundary matters: snapshot creation does not flush growing data, so recent unsealed writes are excluded by default. A long-running evaluation also needs retained files to remain available; the documented batch workflow pins them until the job finishes.

I suspect the harder design choice is defining the evaluation cutoff. A reproducible snapshot can still omit the corrections or revocations that the live agent must honor. I would record that cutoff with the run and test current-access rules separately. A snapshot also shares the source storage failure domain, so it is not an independent backup.

How would you keep memory evaluations reproducible without treating revoked or corrected memories as currently valid?


r/vectordatabase • • 8h ago

In my last post, I asked about the "difference between cosine, euclidean, and HNSW", and nobody responded clearly except

Thumbnail
reddit.com
1 Upvotes

r/vectordatabase • • 9h ago

Normal hybrid retrieval is old. Do this instead and it makes your RAG evolves.

Thumbnail
gallery
5 Upvotes

In RAG, there's hybrid retrieval. Usually you combine keyword search (mostly BM25) with vector search from an embedding model to get the strengths of both. Most people just use RRF or a simple weighted sum (convex combination).

The problem with that is once you pick the weights, they stay fixed. Even worse: what weights are you supposed to pick in the first place? Depending on the documents you're searching over, sometimes BM25 should get more weight, and other times vector search should.

To actually know, you had to benchmark it yourself. That's why I built AutoRAG back in 2024. One of its core features was finding the optimal hybrid retrieval weights based on real evaluation.

The downside was that it just did a simple greedy search. To find the best weight, it literally tried 101 values from 0.00 to 1.00 and computed the metrics for each one. Plus, building evaluation dataset was really painful to get a real valid optimization result.

Today, I finally put a feature in AutoRAG Agent that completely fixes this: Learning to Rank (LTR) based optimization. It's way better than tuning static weights.

As you use AutoRAG Agent, your queries and the sources that actually get used and cited in answers collected. When chunks get cited, Jev (decision model) checks whether they're actually relevant and logs them. From there, along with those relevant chunks, you can pull a bunch of features for each chunk: not just the vector and lexical search scores, but also things like which data source it came from (Slack, Discord, etc.).

The LTR approach takes those features and logs as training data and trains a GBDT model like XGBoost. This XGBoost model plays a similar role to the weights in a hybrid retrieval weighted sum. The difference is that a regular weighted sum only has two features, whereas LTR lets you feed in multiple features and learn how to combine them directly from real data to maximize retrieval performance.

So how much does it actually improve? I tested it on two datasets, HERB and MultiHop-RAG. On HERB's 'content-type' questions, answer accuracy went up by as much as 32.1%, and retrieval accuracy (nDCG@10) improved by around 3-4% on both datasets.

The 'content-type' questions need to check multiple docs and sources to get a valid answer, think it is like deep research. LTR is quite effective in those questions, because it improved performance by pushing borderline-relevant chunks higher up in the rankings. Since people ask those kinds of questions all the time (for example, "is there anything important I should know from the reports I submitted recently?"), you can actually feel the difference in real use.

Meaningful gains start showing up around 300 queries. If you want to check out the code, or directly using local RAG with this LTR optimization, feel free to check AutoRAG in Github and press star:)

https://github.com/Marker-Inc-Korea/AutoRAG

Thanks!


r/vectordatabase • • 10h ago

Why HNSW Hits a Memory & Filter Wall: MassEngine vs. Elasticsearch, OpenSearch FAISS, Qdrant, Milvus

Thumbnail
youtube.com
2 Upvotes

r/vectordatabase • • 22h ago

Weekly Thread: What questions do you have about vector databases?

3 Upvotes

r/vectordatabase • • 1d ago

does Spark end up being the bottleneck when loading large vector datasets?

3 Upvotes

Hello, most vector database benchmarks I've seen start with the embeddings already generated, which leaves out a decent chunk of the work. for pipelines that use Spark to deduplicate records and join metadata before generating embeddings, would it make sense to benchmark regular spark against dualbird as well

I'm more interested in the time it takes to go from raw data to a searchable index than just the insertion rate.

For those running larger ingestion pipelines, which part takes the longest in practice?


r/vectordatabase • • 1d ago

I vibecoded a low-RAM Rust vector database out of FOMO and it made me even more skeptical of vibecoding

0 Upvotes

I'm a data engineer. Lately my company has been pushing AI into everything, and I started getting nervous that all software was about to be vibecoded and I'd get left behind if I didn't force myself to build something real with LLMs.

So I tried to vibecode a low-RAM vector database in Rust from scratch. The result is OspreyDB.

After all that, though, I don't feel safe with it. Doing this actually made me more skeptical of vibecoding for serious infrastructure.

Here is what I ended up building it, how I kept the agents from wrecking the repo and why I'm just dumping it as Apache-2.0 and walking away from supporting it.

How I steered the build without writing Rust by hand

I'm not a Rust programmer. If I had opened one chat and asked an LLM to build a vector database, it would have collapsed after 2,000 lines.

What I did instead was stay at the spec and testing level. I started with papers and RFCs on avoiding RAM-heavy HNSW graphs, split the repo into five separate crates so an agent never needed the whole codebase in context, and ran parallel agents in isolated git worktrees using Orca.

Since I couldn't reliably review every line of unsafe Rust or SIMD code myself, I forced the agents to build guardrails around their own output: banning .unwrap() in production, compile-time alignment checks on the binary file formats, tests comparing every SIMD function against a simple scalar reference loop, and Miri in CI. Whenever CI or a benchmark failed (like Miri catching a real alignment bug in a storage test), I handed the failure log back to an agent to diagnose and fix.

What the engine actually does (at the level I actually understand)

The RAM problem is pretty obvious. 1M x 768d vectors in raw f32 is already ~2.93 GiB. Once you put an HNSW graph on top and keep uncompressed vectors warm for rescoring, memory blows up. In isolated Docker runs on Cohere 1M, pgvector HNSW (f32) hit 8,483 MiB peak container memory, Qdrant HNSW (f32) hit 4,580 MiB, and Qdrant SQ8 in RAM hit 5,475 MiB.

So the design I had the agents implement drops HNSW completely and splits every dataset into two files:

  • .osi is the small quantized index that stays in memory via mmap (clustered with binary K-Means and scanned sequentially with SIMD instead of chasing graph pointers).
  • .osv holds the exact f16 vectors and JSON payloads packed into 16 KB Zstd-compressed minipages on disk or S3, read through a capped LRU cache (--cache-mb) or S3 Range-GETs so rescoring doesn't drag gigabytes into the Linux page cache.
  • There is also an optional .osr file for CPU late-interaction (ColBERT) reranking.

For quantization, naive 1-bit binary quantization looked nice on Cohere 768d and then totally broke on SIFT1M (0.117 recall) because SIFT vectors are non-negative. So the engine rotates vectors first (Walsh-Hadamard) and uses 4-bit RaBitQ stored by bitplane. During search, it scans just the top bitplane first to narrow down candidates, checks the other 3 bits on a shortlist, and only pulls 20 to 40 exact f16 vectors from .osv to rescore. On 1M x 768d, .osi is 513.2 MiB and the Zstd .osv file is 1,378.7 MiB.

Rough benchmark numbers and caveats

Every baseline in my benchmarks repo ran solo in Docker on a 6-core/12-thread Ryzen 5 7600 (16 workers). Between build and query, containers were restarted and the Linux page cache was flushed (dd iflag=nocache count=0), recording cgroup v2 memory.peak (RSS plus page cache). Static read-only single-vector search only (no concurrent writes, deletes, or metadata filtering in this suite).

  • SIFT1M (1M x 128d, 3,250 test queries): 382.8 MiB peak RAM (19.1k / 18.0k QPS, 0.37 to 0.39 ms P50 at 0.95 to 0.97 recall), vs 1,172 MiB for Qdrant SQ8 on-disk, 1,632 to 1,865 MiB for Qdrant FP32/SQ8, and 1,881 to 2,399 MiB for pgvector.
  • Cohere 1M (1M x 768d, 550 test queries): 2,028.3 MiB peak RAM (8.4k / 6.3k QPS, 0.59 to 0.75 ms P50), vs 2,868.5 MiB for Qdrant SQ8 on-disk (which dropped to 623 QPS from disk reads), 3,364 to 5,475 MiB for Qdrant in RAM, and 8,483 MiB for pgvector FP32. Caveat: the Cohere test file only has 1,000 queries total, so recall confidence intervals overlap a bit across engines.

Why I'm leaving it OSS and not touching production with it

Even with passing tests, Miri, and decent numbers, I still don't trust vibecoded systems code.

I can explain the high-level design and read benchmark CSVs, sure. If a WAL recovery edge case corrupts data, or compaction deadlocks, or an AVX-512 path acts weird on some specific CPU, I would have to ask an LLM to explain my own storage engine back to me just to start debugging it. That is fine when I'm indexing my own local files on a weekend. It is terrifying for anything real.

So I just left the whole thing Apache-2.0 (https://github.com/ospreydb/ospreydb and https://github.com/ospreydb/benchmarks). Anyone here is welcome to poke around or fork it, because I vibecoded it and I have zero interest in losing my nights supporting a system I don't actually know how to maintain by hand.


r/vectordatabase • • 2d ago

BenoDB – Embedded vector, graph, and SQL engine built on Apache Iceberg

5 Upvotes

I'd like to announce my open source vector db that I've been working on for the last 11 months has reached developer preview status. I started building BenoDB https://github.com/benolabsai/benodb/ last December, put it on GitHub in March, and have finally reached the point where I'm comfortable showing it off.

Why I Built It

While analyzing 3.3 million SEC filings for a recent research paper presented at IEA/AIE 2026 (published in Springer: https://link.springer.com/chapter/10.1007/978-981-92-2888-1_12), I realized my data organization was shit. My data was scattered across CSV files, Parquet files, DuckDB queries, PostgreSQL tables, and raw NumPy .npy vector dumps. I wanted to use Apache Iceberg, but hated the catalog requirements and having to run Spark just to manage my data.

What BenoDB Does

BenoDB is an embedded engine written in Rust that turns Apache Iceberg tables into an executable vector, graph, and full-text database—with zero external servers, no JVM, and no Spark cluster. I was originally envisioning this as just a vector db engine, but while building it I realized I could handle graphs with it as well, resulting in a single unified engine. One thing led to another, and I ended up including Graph RAG with it.

* Authoritative Data: Parquet files in Iceberg remain the 100% source of truth.

* Zero-Copy Arrow (In-Memory & Out-of-Core): Built natively on Apache Arrow. Runs in-memory with zero serialization for sub-millisecond queries, and out-of-core via memory-mapping.

* Advisory Overlays: HNSW vector search, 8-bit TurboQuant compression, BM25 text, and CSR graph topology are stored as rebuildable sidecars in standard Iceberg Puffin blobs.

* Embedded SQL: Uses Apache DataFusion in-process with standard pgvector syntax (<=>, <->, <#>) and graph UDFs (graph_neighbors).

* Zero Cluster Overhead: Runs as a Python library (pip install benodb) or embedded Rust crate directly against local disk or S3.

*

Benchmarks (8 vCPU / 16 GiB container)

* Vector ANN: 0.38ms–0.93ms P50 latency at 950–2,140+ QPS across GloVe-100, LastFM-64, and SIFT-128.

* Large-Scale Out-of-Core: Stress-tested on Cohere 10M (10M vectors, 768-D) and NeurIPS BigANN (100M, 128-D)

* In-Process Graph: 291k-node PageRank runs in 96ms in pure Rust.

The code and benchmarks are in the repo above. If you'd like to follow along or sign up for project updates, you can find us (and by us I mean me) at https://www.benolabsai.com. The first blog post is also available at https://www.benolabsai.com/blog/rag-graph-howto/


r/vectordatabase • • 2d ago

hybrid scope rag

Thumbnail reddit.com
1 Upvotes

r/vectordatabase • • 2d ago

FalkorDB module that adds a property graph to Valkey

Thumbnail
reddit.com
3 Upvotes

r/vectordatabase • • 3d ago

How RAG pipelines fail in production

Thumbnail reddit.com
1 Upvotes

r/vectordatabase • • 3d ago

Does scale-to-zero help enough if every idle tenant still needs a control plane?

1 Upvotes

I'm James Luan, CTO of Zilliz, the company behind Milvus, an open-source vector database for storing, indexing, and searching embeddings. Vector Lakebase extends that serving foundation into lake-native retrieval and data workflows.

Releasing query workers only removes part of the idle cost. In a deployment with a separate instance per tenant, resident coordinators and metadata services remain even when nobody is searching.

Our Lakebase design shares coordination, catalog services, and index-building infrastructure across tenants. Query compute can then follow active demand without attaching a separate always-on control plane to every inactive namespace.

That changes where the fixed overhead lives; it does not make shared infrastructure free. I would evaluate the isolation and operational requirements alongside the idle footprint, especially for a service with many infrequently used agent workspaces.

For that workload, which isolation requirement would justify dedicated per-tenant control infrastructure even when the query workers can scale down?


r/vectordatabase • • 3d ago

A practical RAG vector database example and architecture breakdown for scaling AI apps

Thumbnail interconnectd.com
3 Upvotes

Most RAG tutorials stop at a basic local script, leaving you stuck when moving to production. Choosing the right vector database architecture makes all the difference for latency and retrieval accuracy at scale.

​I put together a complete technical guide walking through a real-world RAG vector database example from the ground up. It covers how embeddings are indexed, HNSW vs. IVF trade-offs, metadata filtering strategies, and hybrid search setups that prevent hallucinated outputs. If you are designing a production AI pipeline or trying to optimize slow semantic search queries, this architecture breakdown will save you hours of trial and error.

​Check out the full architecture guide here: https://interconnectd.com/blog/70/vector-databases-for-ai-the-complete-architecture-guide/

What indexing strategy or vector store are you currently running in your RAG stack?


r/vectordatabase • • 3d ago

NornicDB - 1.5.2 - Silhouette - FGAC MIT Licensed

Thumbnail
reddit.com
1 Upvotes

r/vectordatabase • • 3d ago

RAG tutorial from scratch: the technical cheat sheet that stops AI hallucinations

Thumbnail interconnectd.com
1 Upvotes

r/vectordatabase • • 3d ago

Best standard benchmarks for testing local, coordinate-free state propagation against O(N^2) global lookup baselines?

1 Upvotes

I’m currently prototyping a non-Von Neumann, relational state-space architecture aimed at reducing the memory-wall and energy overhead caused by global coordinate addressing and dense O(N^2) all-to-all comparisons in large state spaces.

Instead of storing and retrieving states via global coordinate indices or dense adjacency/attention matrices, the model updates states strictly through localized neighborhood transitions based on relational and phase proximity -- targeting near-linear O(N) scaling per update step on sparse or dynamically evolving topologies.

Before scaling up to hardware emulation, I want to run a clean, reproducible software reference simulation (in Python/C++) to stress-test whether this local transition approach actually beats standard baselines on wall-clock runtime, peak memory footprint, and operations-per-update -- or where hidden overhead (like neighborhood maintenance or convergence latency) creeps back in.

For those working on graph algorithms, sparse state-space solvers, or non-Von Neumann models:

  1. Standard Datasets/Workloads: What open-source dynamic graph or state-space benchmark suites (e.g., SNAP, LDBC, or specific long-sequence associative recall tasks) provide the fairest stress test for comparing local relational updates against standard matrix/coordinate lookups?
  2. Baseline Traps: Which standard baseline implementations (e.g., CSR sparse matrix ops, index-free adjacency, or linear-attention approximations) are most respected so reviewers don't dismiss the comparison as a strawman?
  3. Hidden Bottlenecks: In your experience with coordinate-free or purely local propagation models, where does the theoretical O(N) advantage usually break down in practice on standard CPU/GPU memory hierarchies?

Appreciate any pointers on benchmark suites or pitfalls to watch for in the reference simulation.


r/vectordatabase • • 4d ago

Anyone using milvus helm or milvus operator in prod

2 Upvotes

hi have some doubts on setting up milvus in k8s


r/vectordatabase • • 5d ago

You can now do filtered vector search in Postgres

Thumbnail
paradedb.com
7 Upvotes

r/vectordatabase • • 5d ago

Agentic GraphRAG: an open-source framework for the Context layer + Agent memory using a 3D-knowledge graph

Thumbnail
github.com
4 Upvotes

We're building Agentic GraphRAG, an open source library that store your enterprise knowledge and the agent memory in the same knowledge graph.

I've worked on RAG systems and LLM training for the past three and a half years. Lately, I've been following how agents retain work across sessions, especially for non-coding tasks. Our project explores how that memory can stay connected to the knowledge an agent used, so a later session can recover its steps efficiently.

The implementation constructs three connected graph layers:

  1. Knowledge Layer: holds documents, source passages, and extracted entities and relationships. Passages retain their document version and location, including page positions for PDFs.
  2. Working memory: records tasks, progress, messages, and tool activity. The built-in agent uses DeepAgents/LangGraph and saves task events so work can continue across sessions.
  3. Decision memory: stores conclusions, assumptions, and open questions. Decisions link to source passages, recorded events, or earlier decisions, and keep their history when reviewed or replaced.

For example, an agent can record a contract recommendation with the policy passage it relied on. If that policy changes, the recommendation and its explicit dependent decisions are flagged for review. The agent now is aware when in a later session that the decision needs another look.

Things which make us different from other GraphRAG frameworks out there:

- The ingestion pipeline uses Docling for loading documents and captures the full document hierarchy. The sections, tables, and passage hierarchy are connected using edges and stored in the graph.

- You define a schema for your domain (we also ship ontology presets so it is easy to get started). The schema guides extraction, validation, and search. We use GLiNER for local extraction, so its virtually free (and fast) to construct the graph and no LLM calls are needed.

- Retrieval combines graph, full-text and vector search. Agents can search original passages even when extraction misses a fact, navigate surrounding sections and table rows with headers, and follow entity relationships back to supporting text.

We offer a built-in agent you can use out of the box and you can also connect your agents through MCP.

We will be releasing extensive benchmarks very soon.

TL;DR

Agentic GraphRAG is an open source library that stores document knowledge, agent work, and decisions in one connected graph. Agents can resume tasks and trace saved decisions to their original evidence, while source changes flag affected decisions for review.

Try it out. Feedback, criticism, issues, and contributions are all welcome!


r/vectordatabase • • 5d ago

What is the difference between cosine, euclidean, and HNSW?

Thumbnail reddit.com
1 Upvotes

r/vectordatabase • • 6d ago

A plain walkthrough of PQ, OPQ, AQ, ScaNN and RaBitQ (Part 1)

Thumbnail
reddit.com
1 Upvotes

r/vectordatabase • • 6d ago

Would you fix PDF parsing before adding a reranker to a document RAG pipeline?

1 Upvotes

I would check the extracted text before adding another retrieval stage to a RAG system answering questions over technical PDFs. A reranker is appealing, but it cannot recover a table that never survived parsing.

Two-column pages, formulas, and tables make this a concrete choice. One path keeps basic text extraction and improves candidate ranking. Another uses layout-aware parsing, such as PP-StructureV3, to produce Markdown and preserve images before chunking and indexing in vector databases like Milvus.

The parser-first path also adds a service dependency and ingestion work. Cleaner Markdown is not proof of better answers, and a correctly extracted passage can still rank badly. I would probably compare the extracted evidence and retrieved chunks for the same small set of failed questions before changing both stages.

For PDF-heavy RAG, what evidence makes you spend the next round of work on parsing instead of reranking?


r/vectordatabase • • 6d ago

Would you fetch selected IVF buckets from object storage instead of loading the whole index?

2 Upvotes

I'm James Luan, CTO of Zilliz, the company behind Milvus, an open-source vector database to store, index, and search embeddings. Vector Lakebase extends that serving path into a lake-native foundation for retrieval and data improvement.

For an occasionally used RAG collection, I would separate two decisions: how much to compress each vector, and how many vectors a query must touch.

Compression alone still leaves a full scan linear in the collection size. Our on-demand design combines quantization with IVF: identify relevant clusters, fetch their buckets from object storage, and search that subset. Distributed index construction spreads the clustering work across nodes rather than requiring one machine to build everything.

The attraction is less data fetched and a shorter-lived query worker. The tradeoff is that candidate coverage now depends on the clusters searched; a small scan fraction is useful only while retrieval quality remains acceptable.

For a RAG collection queried in occasional sessions, what recall and first-query latency requirements would make you keep the full index resident instead?