SuperAPI AI Directory

fandhe-vector-db

Data & analytics

View repository

Updated 10-16 08:37

About this skill

fandhe-vector-db

fandhe-vector-db is a local-first vector-specialized query DB written in Rust.fandhe-vector-db-engine(core engine, SQL surface layer, HNSW/BM25/hybrid search, redb persistence, RLS) and fandhe-vector-db-wire-server(PostgreSQL wire protocol v3 compatible binary), and can be connected to from an unmodified psql / psycopg / pg client, andUSING PLAN / USING OPERATION_ID SQL including extended syntax can be executed. The target versions are crates.io for both crates 0.1.0(no tag / release, pin commit SHA 7022d112e79760dca916480599553fcac256b5fb)。

There is no official documentation site; the sources are the public repository https://github.com/Fandhe-AI/vector-db の README・docs/design/ ADRs and crate source (docs.rs source view. Rendered rustdoc pages return 404, so only source view is available).

Positioning of the specification — The source of truth for the specification is in the private repository Fandhe-AI/vector-db-spec(not public), and since this skill cannot access it, it is limited to the scope traceable from public sources and public ADRs. The doc comments (rustdoc) of the crate source are written in Japanese; the references body summarizes them in Japanese, and the signature (type/identifier) portions are transcribed verbatim in English. For behavior where only private spec reference IDs remain, each page ## Notes explicitly states "not documented because the spec is private".

Differentiation from other skills — upstash is the managed SaaS client for @upstash/vector,supabase is client usage of the pgvector extension and Postgres RLS, and neither is the vector DB engine itself.mssql / drizzle is a SQL client / ORM, and is different from this skill's SQL surface layer (limited to extended syntax such asUSING PLAN etc.). This skill's performance/ handles CPU SIMD (isa / dispatch) and GPU batch kernels via wgpu, and is not a reference for the GPU language/runtime layer (CUDA / MSL / HIP) thatnvidia-cuda / apple-silicon / amd-rocm is responsible for.fandhe-ai / fandhe-backend / fandhe-frontend is another library in the same fandhe org and its API is unrelated; when investigating the vector DB engine itself, refer to this skill (fandhe-vector-db).

Directory structure

skills/fandhe-vector-db/
  SKILL.md
  references/
    getting-started/
      README.md
      overview.md
      crate-layout.md
      lib.md
      core.md
      error-format.md
      development-setup.md
    sql/
      README.md
      sql-module.md
      lexer.md
      parser.md
      allowlist.md
      using-plan.md
      using-operation-id.md
      mode.md
      explain.md
      plan.md
      scan.md
    sql-execution/
      README.md
      exec.md
      aggregate.md
      group-by.md
      expr-program.md
      scalar-index.md
      scalar-plan.md
      udf-call.md
      arena-cache.md
      hnsw-cache.md
      hnsw-hybrid.md
      sparse-cache.md
      visible-cache.md
    search/
      README.md
      search-engine.md
      hnsw.md
      sparse.md
      hybrid.md
      rerank.md
      scoring-boost.md
      precision.md
      query-planner.md
      tiering.md
    storage/
      README.md
      storage.md
      row-codec.md
      catalog.md
      txn.md
      recovery.md
      incremental.md
      arena.md
      buffer-pool.md
    security/
      README.md
      policy.md
      rls.md
      tenant.md
    wire-server/
      README.md
      main-cli.md
      server.md
      handshake.md
      auth.md
      bind-guard.md
      framing.md
      protocol-dispatch.md
      simple-query.md
      result-encoder.md
      response-buffer.md
      error-response.md
      limits.md
      search-engine-opt.md
      lib.md
    performance/
      README.md
      kernel.md
      isa.md
      dispatch.md
      gpu-batch.md
      batch-search.md
      batch-fallback.md
      batch-limits.md
      parallel-search.md
      f16.md
      sq8.md
    extensions/
      README.md
      wasm-udf.md
      declarative-filter.md
      embedding.md
      chunking.md
      dictionary.md
  samples/
    README.md
    start-wire-server.md
    connect-psql.md
    connect-psycopg.md
    connect-node-pg.md
    e2e-three-client.md
    docker-compose.md
  scripts/
    README.md
    install.md
    make-targets.md
    run-wire-server.md

Exploration procedure

Derive the category from the task, and identify the target page in the category's README.md:

  1. Find the category corresponding to the task in the mapping table below
  2. of that category references/{category}/README.md to identify the target page
  3. Read the .md of the relevant page to check the details

Task → Category mapping

Task Category Reference README
Repository positioning, crate structure, features, dependencies, engine crate root,VectorCore/EngineCore core API,ErrorClass/WireError wire_code mapping, development environment setup, Makefile getting-started references/getting-started/README.md
SQL surface layer tokenizer, semantic binding, AST allowlist,USING PLAN / USING OPERATION_ID / HINT ORDER extended syntax,recall/precision mode resolution,EXPLAIN response, wide retrieval scan sql references/sql/README.md
SQL execution plan body (RLS→SCALAR→DISTANCE order), aggregation,GROUP BYI want to know about expression step compilation, scalar secondary indexes, declarative UDF calls, and various generation-consistent caches dedicated to the SQL surface layer sql-execution references/sql-execution/README.md
I want to know about search engine selection and construction, HNSW approximate nearest neighbor search, BM25 inverted index, RRF hybrid fusion, reranking, declarative scoring boost, precision confidence gating, and LLM query planning and tiering search references/search/README.md
I want to know about the redb-based persistence layer, row encoder, schema catalog, transaction handle, failure recovery, commit_boundary, ledger, incremental index reflection, vector arena, and buffer pool storage references/storage/README.md
I want to know about the construction and determination of tenant boundaries and visibility contexts, the RLS implicit application hook and visibility-restricted search, and the reference implementation of the row store integration layer security references/security/README.md
I want to know about the wire-server binary's CLI flags and startup, connection acceptance loop, StartupMessage/authentication flow, Argon2id verification, message framing and type byte classification, simple query execution, response byte sequence generation, cross-cutting ErrorResponse mapping, and timeout and concurrent connection control wire-server references/wire-server/README.md
I want to know about the search kernel boundary and CPU reference implementation, SIMD runtime detection and dispatch decision table, wgpu GPU batch search, fallback degradation to CPU-SIMD, batch ingestion upper limit, parallel Top-k, and f16/i8(SQ8) quantization performance references/performance/README.md
I want to know about the WASM UDF sandbox execution contract, declarative metadata filters, embedding transformation injection points, chunk splitting, and symbol and term index extraction extensions references/extensions/README.md
I want to know about typical usage such as how to start wire-server, connection examples from unmodified psql/psycopg/pg clients, a 3-client e2e harness, and a Docker development environment samples samples/README.md
I want to know about installation and CLI commands such as development environment setup, Makefile tasks, and the wire-server startup command scripts scripts/README.md