forked from ChelseaKR/cairn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcairn.toml
More file actions
61 lines (55 loc) · 3.44 KB
/
Copy pathcairn.toml
File metadata and controls
61 lines (55 loc) · 3.44 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
# Cairn configuration. Every key is optional; the values below are the
# built-in defaults, written out so operators can see the full surface.
# Swapping the corpus or tuning behavior happens here, never in code.
[corpus]
# Directory of front-matter markdown documents. The bundled default is
# SYNTHETIC demonstration content (see corpus/demo/README.md).
path = "corpus/demo"
[index]
path = ".cairn/index.json"
[retrieval]
# Relevance gate on bounded [0, 1] cosine scores. Calibrated against the
# bundled demo corpus in all three of its languages (see DESIGN.md for the
# measured score bands); operators swapping in their own corpus should
# re-check it with their own probe questions.
threshold = 0.165
# Passages composed into a grounded answer, best first. One by default: an
# audit of recorded answers found that composing a second passage pasted
# another program's paragraph onto the end of an answer, and made the same
# fact disagree between languages because each language picked its own second
# passage. Raise it when your corpus genuinely needs multi-passage answers,
# and read `ask --explain` to see what a lower value is dropping.
max_passages = 1
# Candidates scored and reported. Visible in `ask --explain`.
candidates = 8
# Weight of the dense (hashed character-n-gram) channel in the fused score:
# `(1 - w) * lexical + w * dense`. The dense channel re-ranks candidates that
# already share vocabulary with the question — misspellings, inflections the
# truncation stemmer splits, cognates — and never promotes a passage with no
# lexical overlap at all. Default 0 (lexical only): measured on the demo
# corpus, weights large enough to change rankings turn the known colloquial
# over-refusal into a confident wrong answer (see DESIGN.md, "Hybrid
# retrieval"), and smaller weights change nothing the stemmer has not already
# absorbed. Opt in after measuring on YOUR corpus; values above 0.5 refused.
dense_weight = 0
[language]
# Used when a question's language cannot be told from the corpus vocabulary
# (a very short question, or one with no corpus words in it at all). The web
# interface always states a language explicitly, so this only affects the CLI.
default = "en"
# When nothing in the answer language clears the threshold, widen the search
# to the whole corpus and say plainly that the source is in another language.
# Set false to refuse instead — appropriate where quoting an untranslated
# document would do more harm than refusing.
cross_language_fallback = true
[refusal]
# The human channel a refusal points to. These defaults are FICTIONAL demo
# content; a real deployment must replace them.
contact = "the Harbor County Community Assistance office at 555-0142 (a fictional demo contact; operators must configure their own)"
# Optional per-language overrides. Without them every language gets the single
# `contact` line above, which is right for a single-language deployment and
# wrong the moment you serve more than one.
[refusal.contact_by_language]
en = "the Harbor County Community Assistance office at 555-0142 (a fictional demo contact; operators must configure their own)"
es = "la oficina de Asistencia Comunitaria del Condado de Harbor, al 555-0142 (contacto ficticio de demostración; los operadores deben configurar el suyo)"
ar = "مكتب المساعدة المجتمعية في مقاطعة هاربر على الرقم 555-0142 (جهة اتصال تجريبية مُختلَقة؛ على المشغّلين ضبط جهة اتصال خاصة بهم)"