Portfolio / Flagship / AI / LLM · Systems / Cloud

NexusRAG

A retrieval system is only as trustworthy as its boundaries. NexusRAG keeps a bounded runtime that cites or abstains, apart from a research pipeline where richer ideas are tried first.

Production readiness not claimed: view the source for this claimReviewed at 85b14f1 · 2026-10-07Licence MIT

Proof trail · one claim, end to end

  1. ClaimAnswers are grounded in retrieved sources.
  2. ConstraintAn uncited or wrongly cited answer must never be published.
  3. ArchitectureA citation gate sits between generation and the response.
  4. DemonstrationEvery [S#] must point at a retrieved, non-empty source; otherwise the reply becomes an abstention.
  5. Sourceanswer-evidence.js, lines 1–10 (opens in a new tab)
  6. LimitationValid citation syntax does not prove the cited source supports the sentence; the code says so itself.

Problem

Teams need answers from their own documents that cite real sources, stay inside a workspace boundary, and refuse to answer when the evidence is not there.

Retrieval-augmented generation makes this possible, but it also makes it easy to over-claim: a feature that works in a local notebook is not the same as a feature running behind a multi-tenant API with real budgets. NexusRAG's repository draws that line itself — its README says the feature inventory "is not a guarantee that every feature is enabled in the deployed gateway" — and this page keeps the same line.

Constraints

  1. Workspace boundary

    Every document, vector and finding is scoped to a workspace; Qdrant points are fenced by workspace and version.

    Evidence for Workspace boundary
  2. Bounded input

    Uploads are capped at 10,000,000 bytes and a fixed list of formats; Excel, GIF and BMP are refused at the gateway.

    Evidence for Bounded input
  3. Spend and rights gates

    Gemini extraction of binary files requires approved non-sensitive processing, rights and budgets; metered operations stay REVIEW_REQUIRED.

    Evidence for Spend and rights gates
  4. Small retrieval budget

    1–12 chunks per answer and only the current question in the prompt.

    Evidence for Small retrieval budget
  5. No fabricated success

    Unsupported filters, retention and erasure fail closed; blocked deletions stay tombstoned.

    Evidence for No fabricated success

Two lanes, deliberately separate

The solid lane is what the deployed gateway is built to run. The dashed lane lives in the Python backend for local and research use. Nothing in the dashed lane should be read as running in production.

Bounded runtime

Cloudflare · Supabase · Qdrant · Gemini · Next.js 16

Preview verified, per repository: view the source for this claim
  1. 01Next.js 16 frontendServed from Cloudflare through OpenNext.
  2. 02Cloudflare gatewayThe public security and routing boundary; tenant-scoped API.
  3. 03SupabaseAuth, Postgres and Storage — the authoritative records.
  4. 04QdrantTenant- and version-fenced vectors; reconstructible from Supabase.
  5. 05GeminiEmbeddings and generation, admitted under quota and budget gates.
  6. 06Cited answer or abstentionPublished only when every [S#] citation points at a retrieved source.

Local / research pipeline

FastAPI · Python · LangChain · Sentence Transformers

Documented, not in gateway: view the source for this claim
  1. 01Multi-format ingestionLoaders for PDF, DOCX, Excel/CSV, images and text, with OCR.
  2. 02Smart chunkingRecursive, semantic and hierarchical strategies.
  3. 03Hybrid retrievalBM25 with Qdrant or FAISS, fused with RRF.
  4. 04Cross-encoder rerankms-marco-MiniLM-L-6-v2 over the fused candidates.
  5. 05Query shapingMulti-query expansion, adaptive K, history-aware reformulation, semantic cache.
  6. 06FastAPI + WebSocketToken streaming with source panels.

Feature status

Runtime states come from the gateway's own capability report and settings at commit 85b14f1. "Documented" means the research lane describes or implements it; it was not executed for this review.

NexusRAG feature status by lane
FeatureBounded runtimeResearch pipelineEvidence
Hybrid lexical + dense retrievalOnTerm-coverage lexical list blended with Qdrant dense ranks (α = 0.6).DocumentedBM25 + Qdrant/FAISS with RRF fusion.Gateway retrieval blends rank-based contributions from…
Cross-encoder rerankingOffreranking: falseDocumentedms-marco-MiniLM-L-6-v2The deployed gateway reports hybrid search on and…
Contextual chunk enrichmentOffenable_contextual_enrichment: falseDocumentedOptional; quality gain not established.The gateway limits retrieval to 1–12 chunks, sends only the…
Semantic cacheOffsemantic_cache: falseDocumentedEmbedding-similarity cache.The deployed gateway reports hybrid search on and…
Token streamingOffstreaming: falseDocumentedWebSocket frames.The deployed gateway reports hybrid search on and…
OCR for scans and imagesGatedocr: false; Gemini extraction needs approved processing, rights and budget.DocumentedGemini Vision with Cloud Vision fallback and a circuit breaker.The gateway accepts PDF, DOCX, TXT, Markdown, CSV, JSON…
Conversation history in promptsOffOnly the current question is sent.DocumentedHistory-aware reformulation.The gateway limits retrieval to 1–12 chunks, sends only the…
Cite-or-abstain answersOnInvalid or missing [S#] citations become an abstention.Not in this laneNot described for this lane.Gateway answers are published only if every [S#] citation…
Encrypted bring-your-own Gemini keyOnAES-GCM per account; never returned to the browser.DocumentedRuntime key entry on quota errors.A user's own Gemini key is stored encrypted with AES-GCM…
Retrieval evaluation harnessNot in this laneNot part of the gateway.Documentedrecall@k, MRR, nDCG, citation precision, leakage.An evaluation harness measures retrieval recall@k, MRR…
Hybrid lexical + dense retrieval
Bounded runtime: On Term-coverage lexical list blended with Qdrant dense ranks (α = 0.6).
Research pipeline: Documented BM25 + Qdrant/FAISS with RRF fusion.
Evidence: Gateway retrieval blends rank-based contributions from…
Cross-encoder reranking
Bounded runtime: Off reranking: false
Research pipeline: Documented ms-marco-MiniLM-L-6-v2
Evidence: The deployed gateway reports hybrid search on and…
Contextual chunk enrichment
Bounded runtime: Off enable_contextual_enrichment: false
Research pipeline: Documented Optional; quality gain not established.
Evidence: The gateway limits retrieval to 1–12 chunks, sends only the…
Semantic cache
Bounded runtime: Off semantic_cache: false
Research pipeline: Documented Embedding-similarity cache.
Evidence: The deployed gateway reports hybrid search on and…
Token streaming
Bounded runtime: Off streaming: false
Research pipeline: Documented WebSocket frames.
Evidence: The deployed gateway reports hybrid search on and…
OCR for scans and images
Bounded runtime: Gated ocr: false; Gemini extraction needs approved processing, rights and budget.
Research pipeline: Documented Gemini Vision with Cloud Vision fallback and a circuit breaker.
Evidence: The gateway accepts PDF, DOCX, TXT, Markdown, CSV, JSON…
Conversation history in prompts
Bounded runtime: Off Only the current question is sent.
Research pipeline: Documented History-aware reformulation.
Evidence: The gateway limits retrieval to 1–12 chunks, sends only the…
Cite-or-abstain answers
Bounded runtime: On Invalid or missing [S#] citations become an abstention.
Research pipeline: Not in this lane Not described for this lane.
Evidence: Gateway answers are published only if every [S#] citation…
Encrypted bring-your-own Gemini key
Bounded runtime: On AES-GCM per account; never returned to the browser.
Research pipeline: Documented Runtime key entry on quota errors.
Evidence: A user's own Gemini key is stored encrypted with AES-GCM…
Retrieval evaluation harness
Bounded runtime: Not in this lane Not part of the gateway.
Research pipeline: Documented recall@k, MRR, nDCG, citation precision, leakage.
Evidence: An evaluation harness measures retrieval recall@k, MRR…

Retrieval architecture

The gateway ranks candidates from two lists. Qdrant returns dense hits in similarity order. A lexical list scores each stored chunk by term coverage — the share of the question's distinct words (three letters or more) that appear in it. This is not BM25.

Each list contributes a reciprocal-rank term, and the two are blended with a workspace weight α (default 0.6):

score = α · 1/(61 + dense rank) + (1 − α) · (1/(61 + lexical rank) + 0.02 · coverage)

Ranks here start at zero, so 61 is the familiar RRF constant k = 60. The weighted blend differs from textbook Reciprocal Rank Fusion, which simply adds the contributions. The repository also contains a pure RRF library, but the gateway does not call it.

Evidence for the retrieval description2 sources
  1. Repository documentedInspected source code

    Gateway retrieval blends rank-based contributions from dense (Qdrant) and lexical term-coverage lists: α·dense + (1−α)·(lexical + 0.02·coverage), α = 0.6 by default.

    const rankingScore = (item) => (semanticWeight * item.dense_rrf) + ((1 - semanticWeight) * (item.lexical_rrf + (0.02 * (item.lexical_score || 0))));
    • Lexical scoring in the gateway is term coverage, not BM25.
    • A pure RRF library exists in packages/retrieval/src/fusion.ts but the gateway does not call it.
    • Retrieval quality of this blend is not established by implementation alone.

    apps/gateway/src/worker-lifecycle.js (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  2. Repository documentedInspected source code

    The gateway limits retrieval to 1–12 chunks, sends only the current question (no chat history) and keeps contextual enrichment and reranking off.

    retrieval_top_k: persistedSetting(row, "retrieval_top_k", { min: 1, max: 12, integer: true }), enable_reranking: false, … // This Worker intentionally sends only the current question, not prior chat history. context_window_messages: 1, … enable_contextual_enrichment: false

    apps/gateway/src/preview-worker.js (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

Data and evidence lifecycle

  1. 01UploadA bounded file enters a workspace and is stored in Supabase Storage.
  2. 02QueueHeavy processing runs through a Cloudflare Queue with up to 3 retries and a dead-letter queue.
  3. 03IndexChunks (1600 characters, 240 overlap) are embedded and written to Qdrant with workspace and version ids.
  4. 04RetrieveDense and lexical candidates are blended and capped at 12.
  5. 05AnswerGemini answers from the retrieved sources; the citation gate publishes or abstains.
  6. 06ReviewPrivate, versioned findings with independent review and export receipts.
Evidence for the lifecycle3 sources
  1. Repository documentedRepository documentation

    Supabase is the authoritative store; Qdrant vectors are reconstructible; Cloudflare is the public security and routing boundary.

    Customer evidence and business records remain authoritative in Supabase. Qdrant is reconstructible. Cloudflare is the public security and routing boundary. Vercel and Render are not active deployment paths.
    • The previous portfolio linked NexusRAG at nexusrag.vercel.app; the repository says Vercel is not an active deployment path, so that link is not used.

    README.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  2. Repository documentedInspected source code

    Heavy ingestion runs through a Cloudflare Queue with up to 3 retries and a dead-letter queue.

    "max_retries":3,"dead_letter_queue":"nexusrag-v6-candidate-ingestion-dlq","max_concurrency":1
    • Retry and dead-letter behaviour under real load is listed as not yet validated in the repository's audit.

    apps/gateway/wrangler.preview.jsonc (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  3. Repository documentedRepository documentation

    Workspaces support private, versioned findings with independent review and manual-note export receipts.

    Migrations 035/036 add atomic workspace creation, confirmed-Auth existing-account member management, private versioned findings, independent review and manual-note export receipts. … Invitations and complete ten-product workflows are not established by these features.

    README.md; supabase/migrations/035_*, 036_* (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

Security and failure semantics

Fails closed

  • Uncited or invalidly cited model output becomes an abstention.
  • No sources found means no answer, stated as such.
  • Unsupported filters, retention and erasure requests are refused, not approximated.
  • Blocked deletions stay tombstoned; no success receipt is invented.

Boundaries

  • Supabase Auth is the only identity authority.
  • Cloudflare is the public security and routing boundary.
  • Vectors are fenced by workspace and version.
  • A user's own Gemini key is encrypted with AES-GCM and never returned to the browser.
Evidence for security and failure behaviour5 sources
  1. Repository documentedInspected source code

    Gateway answers are published only if every [S#] citation refers to a real retrieved source; otherwise the system abstains. With no sources, it refuses to answer.

    // Citation syntax and source presence are necessary, never sufficient, for support. // Semantic entailment requires independent verification or human review. … // Fail closed for uncited/invalidly cited model output; do not publish an unsupported claim.
    • Valid citation syntax does not prove the cited source supports the sentence; the code says so itself.

    apps/gateway/src/answer-evidence.js (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  2. Repository documentedRepository documentation

    Unsupported filters, retention enforcement and workspace erasure fail closed; blocked deletions stay tombstoned and no success receipt is fabricated.

    Unsupported advanced retrieval filters, retention enforcement, and workspace erasure fail closed. Deletions needing unimplemented derived-content or outstanding-write verification remain tombstoned/blocked; no successful receipt is fabricated.

    README.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  3. Repository documentedRepository documentation

    Supabase Auth is the sole identity and session authority; NexusRAG never receives Google or GitHub credentials.

    NexusRAG never receives Google or GitHub credentials. Supabase Auth is the sole identity and session authority, and the FastAPI backend receives only Supabase-issued JWTs.
    • The repository's audit records one Google sign-in verified in a rehearsal project; two-identity product flows are not yet verified.

    README.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  4. Repository documentedInspected source code

    A user's own Gemini key is stored encrypted with AES-GCM per account and is never returned to the browser.

    return crypto.subtle.importKey("raw", raw, "AES-GCM", false, ["encrypt", "decrypt"]); … const encrypted = await crypto.subtle.encrypt({ name: "AES-GCM", iv: nonce, additionalData: new TextEncoder().encode("nexusrag-user-gemini-key-v1") },

    apps/gateway/src/user-gemini-key.js (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  5. Repository documentedRepository documentation

    Supabase is the authoritative store; Qdrant vectors are reconstructible; Cloudflare is the public security and routing boundary.

    Customer evidence and business records remain authoritative in Supabase. Qdrant is reconstructible. Cloudflare is the public security and routing boundary. Vercel and Render are not active deployment paths.
    • The previous portfolio linked NexusRAG at nexusrag.vercel.app; the repository says Vercel is not an active deployment path, so that link is not used.

    README.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

What is not established

  • Production readiness or defect-free operation (the repository says so explicitly).
  • That retrieval or answer quality is good in production — the evaluation harness uses a small synthetic set.
  • That contextual enrichment improves answers.
  • Two-identity, end-to-end product flows, invitations, and complete multi-product workflows.
  • An availability SLA — the Qdrant free tier can suspend after inactivity.
  • That any given research-lane feature runs in the deployed gateway.

The previous version of this portfolio linked NexusRAG at a Vercel address. NexusRAG's own documentation says Vercel is not an active deployment path, so no live link is shown until a current address is confirmed.

Evidence for these limitations3 sources
  1. Repository documentedRepository documentation

    Production readiness is not claimed; the latest deployment is a verified preview.

    README: “Production readiness and defect-free operation are not claimed.” DEPLOYMENT_STATUS: “Status: PREVIEW_VERIFIED … no custom domain is connected.” MASTER_PROMPT_AUDIT: “Status: PARTIAL_NOT_COMPLETE”.
    • The deployed preview was not reachable from the environment used to build this site, so its live behaviour is not independently checked here.

    README.md; docs/DEPLOYMENT_STATUS.md; docs/MASTER_PROMPT_AUDIT.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  2. Repository documentedInspected source code

    An evaluation harness measures retrieval recall@k, MRR, nDCG, citation precision, answer support and cross-workspace leakage.

    def retrieval_recall_at_k(…) · def mean_reciprocal_rank(…) · def ndcg_at_k(…) · def citation_precision(…) · def answer_support(…) · def has_cross_workspace_leak(…)
    • The default dataset is a small synthetic sample with deterministic embeddings; passing it does not establish production retrieval quality.

    backend/evals/metrics.py (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger

  3. UnverifiedRepository documentation

    NexusRAG's README contradicts itself on whether a default provider key ships with the repository.

    Line 77: “The repository ships no usable provider key.” Line 406: “NexusRAG ships with a default API key for quick evaluation.”
    • Neither statement is repeated as fact on this site until the README is corrected.

    README.md (opens in a new tab) @ 85b14f1 · reviewed 2026-10-25 · In the ledger