Skip to content

v0.10: /v1/rag endpoint for Router <-> Fabric platform integration#1

Merged
JasonDD merged 1 commit into
masterfrom
feature/platform-integration
May 26, 2026
Merged

v0.10: /v1/rag endpoint for Router <-> Fabric platform integration#1
JasonDD merged 1 commit into
masterfrom
feature/platform-integration

Conversation

@JasonDD
Copy link
Copy Markdown
Contributor

@JasonDD JasonDD commented May 26, 2026

Summary

Adds a new POST /v1/rag endpoint so Router can delegate its embedded RAG
pre-stage to Fabric. The endpoint returns ranked chunks (smaller and
content-addressed, unlike memos) with caller-configurable ranking weights.

  • New table fabric.chunks (id, source_path, source_range, content,
    content_sha256, metadata jsonb, embedding vector(768), tsv stored)
  • New POST /v1/rag with weights {cosine, tsvector, recency}, filters
    {source_paths, type, min_score}, max_chunk_tokens
  • New POST /v1/chunks companion upsert endpoint for the (still-separate)
    chunk-ingestion workstream
  • Empty-list clean response when chunks table is empty, so the
    integration can be wired and smoke-tested today
  • Bumps version to 0.10.0

Companion PR (Router side): Kronaxis/kronaxis-router#1

Test plan

  • go build ./... and go vet ./... pass locally
  • Deployed to DL580 (192.168.50.129:8201), restarted fabric.service
  • /v1/health reports version 0.10.0
  • /v1/rag returns {"chunks":[]} cleanly with an empty chunk table
  • After seeding two chunks via /v1/chunks, /v1/rag ranks the
    classifier chunk at 0.79 cosine for a router-classifier query
  • Router end-to-end smoke test (see companion PR) confirms the
    chat completion is augmented with the retrieved chunks

Out of scope

  • Chunk ingestion pipeline (separate workstream)
  • Marketing site updates (parallel agent)
  • Performance benchmarking, larger test surface

DO NOT merge yet -- operator review.

New POST /v1/rag handler returns chunks (smaller, content-addressed,
ranking-weights-configurable per call) for prompt augmentation. Router
can now delegate its RAG pre-stage to Fabric instead of running embedded
pgvector + sentence-transformers.

Adds:
- fabric.chunks table (id, source_path, source_range, content, sha256,
  metadata jsonb, embedding vector(768), tsv stored)
- POST /v1/rag with weights {cosine, tsvector, recency}, filters
  {source_paths, type, min_score}, max_chunk_tokens
- POST /v1/chunks companion upsert endpoint for the (still-separate)
  ingestion workstream
- empty-list clean response when chunks table is empty, so the
  integration can be wired and smoke-tested today

Companion PR: kronaxis-router#feature/platform-integration adds
fabric_url config + the middleware splice + fallback.
@JasonDD JasonDD merged commit 8049b06 into master May 26, 2026
@JasonDD JasonDD deleted the feature/platform-integration branch May 26, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant