You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrate LightRAG into CacheRoute as an optional, pluggable knowledge indexing and retrieval backend.
The integration must preserve CacheRoute's existing hierarchy:
LightRAG: identify which knowledge is relevant
KDN: own canonical knowledge IDs, source text, artifacts, replicas, and KV lifecycle
Scheduler: select KDN and Proxy pools
Proxy: select a concrete Instance and execute the injection path
Instance: run inference
LightRAG must not become a Scheduler, replace KDN, own KV artifacts, or enter the Instance hot path.
Motivation
CacheRoute currently represents online knowledge demand mainly as a flat Knowledge_List produced by embedding similarity. This Epic establishes a safe engineering path from the existing embedding/FAISS pipeline to an optional graph-augmented retrieval backend, while retaining deterministic fallback and the existing pool-level and instance-level routing boundaries.
The research-facing extension is to later derive a structured Knowledge Demand Profile and use it for knowledge-compute co-routing. That work is intentionally separated from the initial integration steps.
Target Architecture
Knowledge registration
|
v
KDN authoritative Text/Artifact state
|
+--> asynchronous derived index --> LightRAG service
Online request
|
v
Scheduler KnowledgeRetriever
|-- embedding backend
|-- LightRAG backend
`-- shadow/fallback policy
|
v
canonical CacheRoute KIDs
|
v
Scheduler selects KDN + Proxy
|
v
Proxy selects Instance and text/KV injection path
LightRAG document/chunk IDs never leak into the CacheRoute data plane.
LightRAG indexes are derived and rebuildable from KDN state.
LightRAG failure must not block ordinary inference.
The existing embedding retrieval path remains available as the default and fallback.
Scheduler selects KDN and Proxy only; Proxy continues to select Instance.
Instance and vLLM processes do not import or initialize LightRAG.
CPU-only unit tests must not require CUDA, a live LightRAG service, a live LLM, Redis, or vLLM.
Repository Constraints
Do not add a new functional top-level directory without a separate architecture review Issue.
New Python capability should prefer src/cacheroute/<domain>/ when that package layout is available, or an existing component hierarchy during migration.
Cross-component contracts must live in a lightweight cacheroute namespace without import side effects.
Any directory move must audit static/dynamic imports, string module references, service/script entry points, Docker/CI/config paths, monkeypatch targets, packaging, and Markdown links.
Do not replace or delete existing root README content. The root README should contain only a concise overview; detailed LightRAG design belongs in dedicated documentation.
Step 7 is research-oriented and should start only after online retrieval behavior and observability are stable.
Epic Acceptance Criteria
All child Issues have independent tests and bounded PR scope.
CacheRoute runs with LightRAG disabled and retains prior behavior.
CacheRoute runs with LightRAG enabled without changing Scheduler/Proxy/Instance responsibility boundaries.
Canonical KID mapping and delete/update consistency are validated.
Shadow-mode evidence demonstrates retrieval quality and system overhead before production activation.
Failure injection demonstrates timeout, fallback, circuit-breaker, and rollback behavior.
The research prototype measures both answer-quality effects and system effects such as TTFT, E2E latency, cross-KDN traffic, injected tokens, and KV reuse.
Objective
Integrate LightRAG into CacheRoute as an optional, pluggable knowledge indexing and retrieval backend.
The integration must preserve CacheRoute's existing hierarchy:
LightRAG must not become a Scheduler, replace KDN, own KV artifacts, or enter the Instance hot path.
Motivation
CacheRoute currently represents online knowledge demand mainly as a flat
Knowledge_Listproduced by embedding similarity. This Epic establishes a safe engineering path from the existing embedding/FAISS pipeline to an optional graph-augmented retrieval backend, while retaining deterministic fallback and the existing pool-level and instance-level routing boundaries.The research-facing extension is to later derive a structured Knowledge Demand Profile and use it for knowledge-compute co-routing. That work is intentionally separated from the initial integration steps.
Target Architecture
Invariants
Repository Constraints
src/cacheroute/<domain>/when that package layout is available, or an existing component hierarchy during migration.cacheroutenamespace without import side effects.Delivery Steps and Status
Dependency Order
Operationally:
Version and Dependency Guidance
Epic Acceptance Criteria