depiedencap-rag/docs/rag/README.en.md
grgmro b05eea24d5 Docs: English pages for design/eval, linked from the English README
GitHub and Forgejo only i18n the root README. Public rag pages now have *.en.md siblings so English links stay in English; French files keep the unprefixed names.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 23:23:03 +02:00

3.9 KiB

RAG workstream — post grain, advanced retrieval, evaluation

📘 Cette page est également disponible en français 🇫🇷

Status (17/09/2026): plugin + pipeline in prod on the VPS (Discourse + Postgres/pgvector, 424 835 posts). Inference on the mini PC (Ollama bge-m3 + qwen3:30b-a3b-q6k, TEI mmarco) via Tailscale. Member flags still OFF; agent limited to a demo group. Public diagram: README.md. Session resume (French working doc): PLAN_RAG_PROD_VPS.md. Eval: posts+rerank, Hit@5 0.97 — EVAL.en.md / SAFETY.en.md.

Languages in this folder

GitHub and Forgejo only auto-switch the root README.md / README.fr.md. Every other page is a normal file. Convention here:

Files Language
DESIGN.md, EVAL.md, SAFETY.md, PIPELINE.md, REFERENCES.md, this folder's README.md French (working language)
DESIGN.en.md, EVAL.en.md, SAFETY.en.md, PIPELINE.en.md, REFERENCES.en.md, README.en.md English (public vitrine, linked from root README.md)
LOCAL_DEV.md, prod_snapshots/, ../PLAN_RAG_PROD_VPS.md French only (operator runbooks)

Why this workstream

The RAG then in prod indexed one vector per topic (~22 340). On megathreads (300+ messages), a single vector = a diluted semantic centroid plus 4096-token input truncation → precise passages on page 12 are invisible. Goal: post-grain retrieval with citations /t/slug/id/post_number, keeping the product principle — the bot points to existing threads, it does not answer in members' place.

It is also a learning workstream: we test industry-standard techniques (see REFERENCES.en.md), we measure on our corpus, we document.

Documents

File Content
DESIGN.en.md Architecture, configs to test, decisions
REFERENCES.en.md RAG literature notes — proven techniques + sources
EVAL.en.md Eval set, metrics, protocol, retrieval + generation results
SAFETY.en.md Red-team, input gate, refusal clause, evidence injection
PIPELINE.en.md End-to-end question→answer architecture + measured latencies
LOCAL_DEV.md Recipe: redeploy the forum locally (French)
prod_snapshots/ Prod state saved before deploy (prompt, settings, rollback)
../PLAN_RAG_PROD_VPS.md Deploy plan + session resume (French) — read first to continue

Dev workflow

Dev machine (laptop / desktop)             AI mini PC (prod)
┌────────────────────────────┐             ┌──────────────────────┐
│ Local Discourse = exact    │             │ k3s rag-depiedencap  │
│ VPS replica (.tar.gz)      │             │ Ollama :32134        │
│ + local pgvector           │──Tailscale──►│  qwen3:30b (chat)   │
│ + LOCAL bge-m3 (CPU)       │             │  bge-m3 (prod        │
│   for tests                │             │   embeddings)        │
└────────────────────────────┘             └──────────────────────┘
  • Dev vectors → local pgvector (zero prod risk).
  • Dev chat LLM → mini PC (the laptop does not carry a 30B).
  • Dev embeddings → local CPU bge-m3 (do not clog the prod queue).
  • Once the solution is validated: the mini-PC bge-m3 produces prod vectors (same model = compatible vectors).

Rules

  • Never run retrieval/embedding tests against the prod database.
  • The local forum sends no email (disable_emails, see LOCAL_DEV.md).
  • Every design decision → ADR in DESIGN.en.md § Decisions.
  • Bench results → EVAL.en.md (numbers, not feeling).