Skip to content

feat: add LightRAG + DocumentDB playground#333

Draft
xgerman wants to merge 4 commits intodocumentdb:mainfrom
xgerman:developer/lightrag-playground
Draft

feat: add LightRAG + DocumentDB playground#333
xgerman wants to merge 4 commits intodocumentdb:mainfrom
xgerman:developer/lightrag-playground

Conversation

@xgerman
Copy link
Copy Markdown
Collaborator

@xgerman xgerman commented Apr 2, 2026

Summary

Adds a self-contained playground demonstrating LightRAG — a graph-based RAG engine — using DocumentDB as its MongoDB-compatible storage backend.

What's included

File Purpose
README.md Architecture, setup, configuration, compatibility matrix, troubleshooting
helm/lightrag/ Helm chart with init-container patching for DocumentDB compatibility
helm/ollama.yaml In-cluster Ollama deployment for LLM inference
helm/lightrag-values.yaml User-facing values with DocumentDB connection config
scripts/deploy.sh One-command deployment (Ollama → models → LightRAG)
scripts/cleanup.sh Full teardown

DocumentDB compatibility

LightRAG's MongoDB storage layer requires patching for DocumentDB:

Feature Status Workaround
createIndex with collation ❌ Not supported Init-container skips index creation
$vectorSearch ❌ Atlas-only Uses NanoVectorDBStorage (local) instead
$listSearchIndexes ❌ Not supported LightRAG catches gracefully
Basic CRUD, aggregation ✅ Works

Storage mapping

  • KV, Graph, DocStatus → MongoKVStorage / MongoGraphStorage (DocumentDB)
  • Vectors → NanoVectorDBStorage (local file-based, since DocumentDB lacks Atlas $vectorSearch)

Tested

End-to-end on Kind cluster with DocumentDB Kubernetes Operator:

  • Document ingestion ✅
  • Entity extraction (19 entities from test paragraph) ✅
  • Knowledge graph storage in DocumentDB ✅
  • LLM response caching in DocumentDB ✅
  • All RAG query modes (naive, local, global, hybrid) ✅

German and others added 4 commits April 2, 2026 12:47
Add a self-contained playground demonstrating LightRAG (graph-based RAG
engine) using DocumentDB as its MongoDB-compatible storage backend.

Includes:
- Helm chart with init-container that patches LightRAG for DocumentDB
  compatibility (skips unsupported createIndex with collation)
- Ollama deployment manifest for in-cluster LLM inference
- Automated deploy.sh and cleanup.sh scripts
- Comprehensive README with architecture, setup, configuration,
  DocumentDB compatibility matrix, and troubleshooting guide

Storage mapping:
- KV, Graph, DocStatus → MongoKVStorage/MongoGraphStorage (DocumentDB)
- Vectors → NanoVectorDBStorage (local, since DocumentDB lacks $vectorSearch)

Tested end-to-end on Kind with DocumentDB Kubernetes Operator.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace manual service/secret lookups with the connection string from
the DocumentDB resource status field, matching the pattern documented
in the official networking docs. The status field contains embedded
kubectl commands that are resolved via eval.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the three patched methods, why each is needed for DocumentDB
compatibility, how the init container applies the patches, and the
impact on functionality.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Findings from AKS E2E testing of the KEDA playground apply here too:
- Fix eval quoting: use eval "echo \"...\"" to prevent & in
  connection string query params from being interpreted as shell
  background operator
- Replace ClusterIP with DNS name for cross-namespace service
  resolution (status.connectionString uses ClusterIP)
- Update README eval example to use the corrected two-step pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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