SHEN YIFull-Stack & AI

Paris • Singapore • Shanghai

RAG Formation · Reference

Security, permissions, and deployment boundaries

A standalone cheat sheet for learning and testing RAG quality on this site.

$ reference --status
▸ course RAG Formation
▸ mode standalone reference
▸ status Complete
● learn → test → verify

Reference sheet

Security, permissions, and deployment boundaries

The guided RAG Formation course content is complete; this reference is available for self-directed practice.

One-line rule

A factually correct answer is still unacceptable if it exposes a restricted document or secret.

Core terms

TermMeaning
Least privilegeGive users, services, and tools only the access they need.
Data boundaryA technical separation between demo, staging, and production data and credentials.
Prompt/data injectionUntrusted document or user content trying to change system behavior or expose information.
Workspace scopingworkspace genuinely scopes LightRAG's graph store, but never reaches Qdrant or Meilisearch — those two ignore it entirely. Verify with a live two-call test, not an assumption.
CORSapi/app.py sets allow_origins=["*"] — an observable fact, not something to go verify.

Evidence card

NeedRecordDon't claim
BaselineCommand, configuration, observed resultThe baseline is a target.
ChangeOne hypothesis or decisionYou can tell what caused the result when several things changed.
MetricRecord each boundary, its current control, a safe verification command, and any missing enforcement point.One metric tells you everything about quality.
SafetyA failure and a regression caseA fluent answer proves the system is reliable.

Local command

cd demo
python3 setup_demo.py ingest --dry-run
# then, with the stack up (setup_demo.py up):
curl -s -X POST http://localhost:8000/api/v1/qa -H "Content-Type: application/json" \
  -d '{"question": "...", "workspace": "meridian_demo"}'
curl -s -X POST http://localhost:8000/api/v1/qa -H "Content-Type: application/json" \
  -d '{"question": "...", "workspace": "not-a-real-workspace"}'

Compare stats.graph_context_chars and sources between the two calls — graph should change, vector/summary/fulltext should not.

Artifact: An MVP threat and permission checklist with one negative verification for each boundary.

Continue learning: Open the matching standalone lesson · Course roadmap