50 lines
1.0 KiB
Markdown
50 lines
1.0 KiB
Markdown
# Homelab AI Knowledge Index
|
|
|
|
This directory defines the optional local knowledge layer for the backstage
|
|
`jeannie` helper.
|
|
|
|
The index is not model training. It is retrieval over repo files, so current
|
|
inventory, runbooks, scripts, Terraform, compose files, and app manifests remain
|
|
normal source-controlled text.
|
|
|
|
## Build
|
|
|
|
Run on the Debian homelab server:
|
|
|
|
```bash
|
|
./jeannie ai-index
|
|
```
|
|
|
|
The default index path comes from `homelab.yml`:
|
|
|
|
```text
|
|
/data/homelab-ai/index
|
|
```
|
|
|
|
Override it with `LAB_AI_KNOWLEDGE_INDEX_DIR` when testing.
|
|
|
|
## Check
|
|
|
|
```bash
|
|
./jeannie ai-check
|
|
```
|
|
|
|
This validates:
|
|
|
|
- Python is available
|
|
- the index exists
|
|
- a simple retrieval query returns context
|
|
- Ollama is reachable when the backstage helper is enabled
|
|
- the configured model is pulled
|
|
|
|
## Query
|
|
|
|
The query script can be used directly:
|
|
|
|
```bash
|
|
scripts/query-homelab-ai-index "gitea public url is failing"
|
|
scripts/query-homelab-ai-index --ask "why is lab2025 returning 502?"
|
|
```
|
|
|
|
`--ask` sends retrieved context to the configured Ollama endpoint and model.
|