Repository navigation
Expand file tree
/
Copy pathrag-rat.toml
More file actions
78 lines (69 loc) · 4.65 KB
/
Copy pathrag-rat.toml
File metadata and controls
78 lines (69 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[index]
root = "."
[llm.embedding]
# DOGFOOD: jina-embeddings-v2-base-code (768-dim, 8192-token ALiBi context) — a CODE-specialized
# long-context embedder. On a code repo this is the right pick (see the init wizard's context-window
# guidance): whole code chunks fit inside 8192 tokens, so there is no tail truncation the way
# all-MiniLM's 256-token window would clip long functions. The registry supplies dim=768; the
# `[remote]` block below serves it on an EPHEMERAL Modal L4 box via michaelfeil/infinity.
model = "jinaai/jina-embeddings-v2-base-code"
# EPHEMERAL mode (`cookbook` set, not `endpoint`): reconcile provisions a fresh Modal L4 box running
# infinity, embeds the whole index over OpenAI-compatible `/embeddings`, then tears the box down.
# Because the box is transient, QUERY embedding happens at `query_endpoint` (a LOCAL server) — run a
# local infinity there or semantic_search degrades to BM25 until you do. The mode is INFERRED: set
# EXACTLY ONE of `endpoint` (connect) or `cookbook` (ephemeral).
[llm.embedding.remote]
cookbook = "@rag-rat/cookbook modal" # provision an ephemeral Modal box (published npm package)
backend = "infinity" # michaelfeil/infinity serves /embeddings
model = "jinaai/jina-embeddings-v2-base-code" # server-side HF model id infinity downloads
gpu = "L4" # Modal GPU class (cookbook-only)
query_endpoint = "http://localhost:7997" # local infinity for query embedding (box is ephemeral)
batch_size = 8 # texts per /embeddings request (small: jina is heavy)
concurrency = 128 # client fan-out cap; the tuner sweeps within it
max_batch_chars = 384000 # max input chars per request
request_timeout_s = 120 # generous per-request timeout for heavy jina batches
[llm.embedding.runtime]
batch_size = 64
ort_threads = 4
omp_threads = 1
max_embedding_chars = 2000 # conservative retry: ~500 tokens/chunk (well within jina's 8192 window)
# Dream v2 MODEL passes (verdict + compaction). OFF until enabled — `rag-rat dream` stays 100%
# deterministic otherwise. The serving config lives under `[llm.dream.remote]`, mirroring
# `[llm.embedding.remote]`.
[llm.dream]
enabled = true
# EPHEMERAL mode (`cookbook`, not `endpoint`): `rag-rat dream --verify/--compact` provisions a fresh
# Modal GPU box running vLLM (generation), runs the budget-capped verdict/compaction passes against
# its OpenAI-compatible `/v1/chat/completions`, then tears the box down. A zero-work guard skips
# provisioning entirely when the churn-skip queues are already drained, so an idle run never
# cold-starts a paid box. (infinity is embed-only and rejected here — chat needs ollama or vllm.)
[llm.dream.remote]
cookbook = "@rag-rat/cookbook modal" # same ephemeral Modal recipe as embeddings (published npm)
backend = "vllm" # generation runner; serves /v1/chat/completions
model = "Qwen/Qwen3-4B-Instruct-2507" # the memory-compaction eval winner (0 negation flips); lighter than 8B, proven for this task
gpu = "L4" # 24GB comfortably fits the 4B in fp16 (matches the embedding box class)
request_timeout_s = 900 # generous per-request budget (a dense evidence pack is slow on first token)
# Render drive-by memory attachments as the dream-COMPACTED summary + a verdict marker instead of the
# full mechanical body. The `dream --compact` pass writes these summaries (memory_summaries); a memory
# with no summary for its current body falls back to title-only. `memory show` / `memory_show` ALWAYS
# return the full body — this only changes the compact attachment, and the full text is one call away.
[memory]
surface = "summary"
[target_bindings]
rust = ["crates"]
markdown = ["docs"]
# DOGFOOD: explicit GitHub binding. Auto-detect from the origin remote would bind github.com
# anyway; the explicit block exists to pin auth — without it the mirror only finds a token in
# GH_TOKEN/GITHUB_TOKEN (unset on this box) and syncs anonymously at 60 req/h. `gh auth token`
# yields the authenticated quota with no secret in the file and no env plumbing for the
# watcher/hook processes. `project` stays derived from the remote.
[[tracker]]
provider = "github"
auth = { token_command = "gh auth token" }
# DIAGNOSTIC: observe the git-hook maintenance / reconcile / embedder lifecycle (#378 / #360).
# Per-process files under .rag-rat/logs/ (liveness-aware retention, gitignored). info baseline +
# debug for the maintenance + ai (reconcile/providers/embed) targets.
[log]
enabled = true
level = "info"
filter = "rag_rat_core::maintenance=debug,rag_rat_core::index::ai=debug"