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 → verifyReference 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
| Term | Meaning |
|---|---|
| Least privilege | Give users, services, and tools only the access they need. |
| Data boundary | A technical separation between demo, staging, and production data and credentials. |
| Prompt/data injection | Untrusted document or user content trying to change system behavior or expose information. |
| Workspace scoping | workspace 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. |
| CORS | api/app.py sets allow_origins=["*"] — an observable fact, not something to go verify. |
Evidence card
| Need | Record | Don't claim |
|---|---|---|
| Baseline | Command, configuration, observed result | The baseline is a target. |
| Change | One hypothesis or decision | You can tell what caused the result when several things changed. |
| Metric | Record each boundary, its current control, a safe verification command, and any missing enforcement point. | One metric tells you everything about quality. |
| Safety | A failure and a regression case | A 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