Skip to content

Commit ae5d903

Browse files
committed
feat: expand configuration documentation and enhance native Postgres support
- Updated mkdocs.yml to include a comprehensive configuration reference section with detailed navigation. - Added new configuration files for native Postgres support in Docker, allowing for host-installed Postgres connections. - Enhanced start.sh to include functions for checking native Postgres readiness and improved handling of Docker services. - Introduced new configuration parameters and documentation for embedding models, chunking, and enrichment. - Updated GitHub Actions workflow to automate the generation of configuration reference documentation.
1 parent 63c03fc commit ae5d903

58 files changed

Lines changed: 5544 additions & 272 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-automation.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ jobs:
3333
- name: Set up Python
3434
uses: actions/setup-python@v5
3535
with:
36-
python-version: '3.11'
36+
python-version: '3.12'
37+
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v3
40+
41+
- name: Install project dependencies (uv)
42+
run: uv sync --frozen
3743

3844
- name: Install dependencies
3945
run: |
@@ -81,6 +87,11 @@ jobs:
8187
echo "Using base ref: $BASE"
8288
python scripts/docs_ai/generate_docs_from_diff.py --base "$BASE" --llm openai --apply
8389
90+
- name: Generate config reference docs (Pydantic + glossary)
91+
run: |
92+
uv run python scripts/generate_config_reference_docs.py --clean
93+
git add mkdocs/docs/reference/config
94+
8495
- name: Upload patch (best-effort)
8596
if: always()
8697
uses: actions/upload-artifact@v4

data/glossary.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,28 @@
18221822
}
18231823
]
18241824
},
1825+
{
1826+
"term": "MLX Embedding Model",
1827+
"key": "EMBEDDING_MODEL_MLX",
1828+
"definition": "MLX model identifier when EMBEDDING_TYPE=mlx. Runs locally on Apple Silicon via MLX/Metal for very fast embedding inference. Default: \"mlx-community/all-MiniLM-L6-v2-4bit\". The model is downloaded on first use and cached locally. Changing this requires a full reindex (embeddings are not comparable across models).",
1829+
"category": "embedding",
1830+
"related": [],
1831+
"links": [],
1832+
"badges": [
1833+
{
1834+
"text": "Metal GPU",
1835+
"class": "info"
1836+
},
1837+
{
1838+
"text": "Free (no API)",
1839+
"class": "info"
1840+
},
1841+
{
1842+
"text": "Requires reindex",
1843+
"class": "reindex"
1844+
}
1845+
]
1846+
},
18251847
{
18261848
"term": "Embedding Max Retries",
18271849
"key": "EMBEDDING_RETRY_MAX",
@@ -1889,7 +1911,7 @@
18891911
{
18901912
"term": "Embedding Provider",
18911913
"key": "EMBEDDING_TYPE",
1892-
"definition": "Selects the embedding provider for dense vector search. Also determines the token counter used during code chunking, which affects chunk boundaries and splitting behavior.\n\n• openai — strong quality, paid (cl100k tokenizer)\n• voyage — strong retrieval, paid (voyage tokenizer)\n• mxbai — OSS via SentenceTransformers\n• local — any HuggingFace SentenceTransformer model\n• gemini — Google Gemini embeddings\n\nNote: Changing this setting affects both retrieval quality AND how code is split into chunks during indexing. A reindex is required after changing.",
1914+
"definition": "Selects the embedding provider for dense vector search. Also determines the token counter used during code chunking, which affects chunk boundaries and splitting behavior.\n\n• openai — strong quality, paid (cl100k tokenizer)\n• voyage — strong retrieval, paid (voyage tokenizer)\nmlx — Apple Silicon local embeddings via MLX/Metal (fast)\nmxbai — OSS via SentenceTransformers\n• local — any HuggingFace SentenceTransformer model\n• gemini — Google Gemini embeddings\n\nNote: Changing this setting affects both retrieval quality AND how code is split into chunks during indexing. A reindex is required after changing.",
18931915
"category": "embedding",
18941916
"related": [],
18951917
"links": [

data/models.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,16 @@
658658
"dimensions": 384,
659659
"notes": "BGE-small-en local"
660660
},
661+
{
662+
"provider": "mlx",
663+
"family": "mlx-community/all-MiniLM-L6-v2-4bit",
664+
"model": "mlx-community/all-MiniLM-L6-v2-4bit",
665+
"components": ["EMB"],
666+
"unit": "1k_tokens",
667+
"embed_per_1k": 0.0,
668+
"dimensions": 384,
669+
"notes": "MLX MiniLM embeddings (Metal GPU)"
670+
},
661671
{
662672
"provider": "huggingface",
663673
"family": "BAAI/bge-reranker-v2-m3",
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
# Use host-installed Postgres (pgvector) via host.docker.internal.
3+
# This keeps Neo4j/observability in Docker but eliminates the Docker Postgres VM overhead.
4+
api:
5+
environment:
6+
POSTGRES_HOST: host.docker.internal
7+
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
8+
NEO4J_URI: bolt://neo4j:7687
9+
# Override depends_on to avoid pulling up the docker Postgres service.
10+
depends_on:
11+
- neo4j
12+
extra_hosts:
13+
- "host.docker.internal:host-gateway"
14+
15+
postgres-exporter:
16+
environment:
17+
DATA_SOURCE_NAME: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@host.docker.internal:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-tribrid_rag}?sslmode=disable"
18+
# Override depends_on to avoid pulling up the docker Postgres service.
19+
depends_on: []
20+
extra_hosts:
21+
- "host.docker.internal:host-gateway"
22+

mkdocs.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,36 @@ nav:
128128
- Indexing pipeline: indexing.md
129129
- Corpus vs repo_id: guides/corpus.md
130130
- Reference:
131-
- Configuration: configuration.md
131+
- Config API & workflow: configuration.md
132+
- Config reference:
133+
- Overview: reference/config/index.md
134+
- retrieval: reference/config/retrieval.md
135+
- scoring: reference/config/scoring.md
136+
- layer_bonus: reference/config/layer_bonus.md
137+
- embedding: reference/config/embedding.md
138+
- tokenization: reference/config/tokenization.md
139+
- chunking: reference/config/chunking.md
140+
- indexing: reference/config/indexing.md
141+
- graph_storage: reference/config/graph_storage.md
142+
- graph_indexing: reference/config/graph_indexing.md
143+
- fusion: reference/config/fusion.md
144+
- vector_search: reference/config/vector_search.md
145+
- sparse_search: reference/config/sparse_search.md
146+
- graph_search: reference/config/graph_search.md
147+
- reranking: reference/config/reranking.md
148+
- generation: reference/config/generation.md
149+
- enrichment: reference/config/enrichment.md
150+
- chunk_summaries: reference/config/chunk_summaries.md
151+
- keywords: reference/config/keywords.md
152+
- tracing: reference/config/tracing.md
153+
- training: reference/config/training.md
154+
- ui: reference/config/ui.md
155+
- chat: reference/config/chat.md
156+
- hydration: reference/config/hydration.md
157+
- evaluation: reference/config/evaluation.md
158+
- system_prompts: reference/config/system_prompts.md
159+
- mcp: reference/config/mcp.md
160+
- docker: reference/config/docker.md
132161
- API: api.md
133162
- Models: models.md
134163
- Glossary: glossary.md

mkdocs/docs/configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
[Get started](index.md){ .md-button .md-button--primary }
2626
[Configuration](configuration.md){ .md-button }
27+
[Config reference](reference/config/index.md){ .md-button }
2728
[API](api.md){ .md-button }
2829

2930
!!! tip "Workflow: Pydantic First"
@@ -50,6 +51,13 @@ flowchart TB
5051

5152
## Major Sections (Selected Fields)
5253

54+
!!! tip "Need the full 1000+ parameter surface?"
55+
Use the auto-generated [Configuration Reference](reference/config/index.md) pages. They enumerate **every** tunable key with:
56+
- JSON path (`retrieval.rrf_k_div`)
57+
- env-style key (when available, via `TriBridConfig.to_flat_dict()`)
58+
- type, default, and validation constraints
59+
- long-form “tooltip” guidance pulled from `data/glossary.json` (when present)
60+
5361
| Section | Key Fields (examples) | Why it matters |
5462
|--------|------------------------|----------------|
5563
| retrieval | `final_k`, `topk_dense`, `topk_sparse`, `fallback_confidence`, `conf_top1`, `conf_avg5`, `multi_query_m` | Controls candidate sizes and retry/accept gates |

mkdocs/docs/dev/docs-autopilot.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ There are two GitHub Actions workflows:
3636
- Builds a **plan artifact** from `git diff`
3737
- Calls the LLM to generate a **unified diff patch**
3838
- Applies + commits doc updates back to the branch
39+
- Regenerates the **full config reference** from Pydantic + glossary
3940
- Verifies `mkdocs build --strict`
4041

4142
- `Publish MkDocs (mike)`:
@@ -67,6 +68,7 @@ Generate + apply patch (requires `OPENAI_API_KEY`):
6768
```bash
6869
export OPENAI_API_KEY=...
6970
python scripts/docs_ai/generate_docs_from_diff.py --base origin/main --llm openai --apply
71+
uv run python scripts/generate_config_reference_docs.py --clean
7072
mkdocs build --strict
7173
```
7274

mkdocs/docs/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TriBridRAG Documentation
1+
# ragweld Documentation
22

33
<div class="grid chunk_summaries" markdown>
44

@@ -42,8 +42,12 @@
4242

4343
[Get started](index.md){ .md-button .md-button--primary }
4444
[Configuration](configuration.md){ .md-button }
45+
[Config reference](reference/config/index.md){ .md-button }
4546
[API](api.md){ .md-button }
4647

48+
!!! note "Naming: ragweld vs tribrid"
49+
The repo/product is **ragweld**. Many internal names still say **tribrid** (config keys, module names, older docs). Treat `tribrid` as stable internal naming; don’t mass-rename it.
50+
4751
!!! tip "Read This First"
4852
TriBridRAG is strictly Pydantic-first. If a field or feature is not in `server/models/tribrid_config_model.py`, it does not exist. Add it there, regenerate TypeScript types, then build the rest.
4953

mkdocs/docs/manual/native_postgres.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This repo supports that workflow via:
99
```
1010

1111
!!! important "Compatibility"
12-
`--native-postgres` is supported only with the **local backend** (uvicorn) and **without** `--with-observability`.
12+
`--native-postgres` works with the local backend and with the Docker backend/observability stack. When Docker is involved, containers connect to your host Postgres via `host.docker.internal`.
1313

1414
## 1) Stop Docker Postgres (if it’s running)
1515

0 commit comments

Comments
 (0)