Via FTP: Upload the llm_rag/ directory into /plugins/.
Via package manager: Select llm_rag from the available plugins list.
Paths:
- Main plugin:
/plugins/llm_rag/llm_rag.php - Configuration:
/plugins/llm_rag/conf/llm_rag.conf.inc.php - Library:
/plugins/llm_rag/lib/llm_rag.lib.inc.php - AJAX handler:
/plugins/llm_rag/handlers/llm_rag.mod.php - JavaScript:
/plugins/llm_rag/js/llm_rag.js - CSS:
/plugins/llm_rag/css/llm_rag.css
Configuration parameters (llm_rag.conf.inc.php):
| Parameter | Default | Description |
|---|---|---|
| CHUNK_SIZE | 500 | Chunk size (in tokens) |
| CHUNK_OVERLAP | 50 | Overlap between chunks |
| TOP_K_CHUNKS | 5 | Number of chunks injected into context |
| MIN_RELEVANCE_SCORE | 0.6 | Minimum relevance score |
| USE_EMBEDDINGS | false | Currently uses keyword matching |
| ALLOWED_SOURCE_TYPES | text, markdown, url, file, manual | Accepted source types |
| ENABLE_AEGIS_WARNINGS | true | Integration with the aegis_corpus plugin |
| WARNING_INJECTION_THRESHOLD | 0.6 | Injection detection threshold |
| MIN_QUERY_LENGTH | 20 | Minimum query length (characters) |
| MIN_QUERY_WORDS | 5 | Minimum number of words |
| MIN_MEANINGFUL_RATIO | 0.6 | Meaningful word ratio |
Required SQL tables:
llm_rag_sources — source metadata (source_id, user_id, title, source_type, content, url, is_global)llm_rag_chunks — indexed chunks (chunk_id, source_id, chunk_index, chunk_text, chunk_tokens, metadata)llm_rag_user_config — per-user settings (user_id, auto_inject, top_k, min_relevance)llm_rag_usage — usage log (optional)