Skip to content

Local RAG lab, web IDE image and Modal rag-ide pack - #4

Merged
kchandan merged 2 commits into
mainfrom
feat-local-rag
Oct 23, 2026
Merged

kchandan merged 2 commits into
mainfrom
feat-local-rag

Conversation

@kchandan

Copy link
Copy Markdown
Member

What this adds

Local RAG lab (labagent.ai.rag, extra rag-local)

  • RAGLabClient: ingest files or pre-chunked rows, hybrid retrieval (vector + keyword rerank), metadata filters, citations, evaluate() with a pass mark.
  • Stores: Chroma (default, embedded), Qdrant, in-memory. Local MiniLM embeddings.
  • LLM gateway: Groq, OpenAI, Anthropic, Ollama; falls back to a clearly marked mock answer when no key works. HTTP status is reported in warnings.
  • labagent rag init | ide | playground.
  • Workspace notebooks: a starter, and an SEC 10-K tutorial built on the pinned dataset.

Web IDE image: Dockerfile.lab (code-server pinned by SHA-256, model pre-cached, non-root) and a Codespaces devcontainer.

rag-ide pack (extra modal): labagent launch rag-ide starts a private browser VS Code per learner as a Modal Sandbox with its own volume, random password in a 0600 CSV, idle shutdown and a hard time cap; destroy removes sandboxes and volumes. Modal calls sit behind a gateway interface so another platform (EC2) can be added.

Verified

  • 222 tests pass (Python 3.9). Clean wheel install without extras: rag init, packs, launch rag-ide --dry-run work; a missing modal package gives an install hint, not a traceback.
  • Real Modal run: image build, login, non-root code-server (no sudo), volume persistence across a restart, notebook run, destroy cleanup.
  • Real Chroma, Qdrant (in-process) and MiniLM against the pinned SEC snapshot.

Not verified

  • Written answers from a real LLM in the SEC notebook (only mock locally).
  • 30 simultaneous learners on Modal; Modal billing (sandboxes bill at the non-preemptible rate).
  • The Codespaces devcontainer has never been opened in Codespaces; remote Qdrant Cloud untested.
  • image=pypi needs a release containing labagent.ai.rag (not yet cut).

Not included

Docs for these features (follow-up) and the throwaway Modal spike.

🤖 Generated with Claude Code

kchandan and others added 2 commits October 23, 2026 13:22
labagent.ai.rag: RAGLabClient with Chroma, Qdrant and in-memory stores, local
MiniLM embeddings, a Groq/OpenAI/Anthropic/Ollama gateway that falls back to a
marked mock answer, metadata filters, hybrid keyword rerank and an evaluator.
labagent rag init / ide / playground. Dockerfile.lab and a Codespaces
devcontainer ship code-server pinned by SHA-256. Workspace includes a starter
notebook and an SEC 10-K tutorial notebook built on the pinned dataset.
Groq calls send an explicit User-Agent (its gateway returns 403 1010 to
Python's default).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
labagent launch rag-ide starts one Modal Sandbox per learner with its own
volume, a random password written to a 0600 credentials file, an idle
shutdown and a hard time cap. code-server runs as an unprivileged user.
labagent destroy rag-ide stops every sandbox (also orphans found by tag)
and deletes the volumes. The Modal calls sit behind a gateway interface so
another platform can be added. Requires the modal extra.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kchandan
kchandan merged commit ce696d5 into main Oct 23, 2026
3 checks passed
@kchandan
kchandan deleted the feat-local-rag branch October 23, 2026 17:24
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