AQIT
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
eval_cli.py
Go to the documentation of this file.
1
# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2
"""aquin eval custom | boundary | suppress | consistency"""
3
4
import
sys
5
6
# eval subcommand -> canonical CLI verb dispatched through cmd_tool
7
_EVAL_TOOL_VERBS: dict[str, str] = {
8
"custom"
:
"eval"
,
9
"boundary"
:
"boundary-eval"
,
10
"suppress"
:
"suppression-eval"
,
11
"suppression"
:
"suppression-eval"
,
12
"consistency"
:
"consistency-eval"
,
13
}
14
15
16
def
_print_help
() -> None:
17
print(
"Behavioral and custom evals."
)
18
print(
""
)
19
print(
"Usage: aquin eval <subcommand> ..."
)
20
print(
""
)
21
print(
" custom Your prompts + reference answers (pass/fail gate)"
)
22
print(
" aquin eval custom --name <id> --prompts <json>"
)
23
print(
" --reference_answers <json>"
)
24
print(
""
)
25
print(
" consistency Same ask, paraphrased - does behavior flip?"
)
26
print(
" aquin eval consistency --query <text> --templates <json>"
)
27
print(
""
)
28
print(
" suppress Topic avoidance / hedging vs neutral baseline"
)
29
print(
" aquin eval suppress --topics <json>"
)
30
print(
""
)
31
print(
" boundary Robustness to typos / surface corruption"
)
32
print(
" aquin eval boundary --prompts <json>"
)
33
print(
""
)
34
print(
"Docs: https://aquin.app/docs/evals/llm"
)
35
36
37
def
cmd_eval
(args: list[str]) ->
None
:
38
if
not
args
or
args[0]
in
(
"-h"
,
"--help"
,
"help"
):
39
_print_help
()
40
return
41
42
# Old bare form: aquin eval --name ...
43
if
args[0].startswith(
"-"
):
44
print(
"Use: aquin eval custom ..."
, file=sys.stderr)
45
sys.exit(1)
46
47
sub = args[0]
48
rest = args[1:]
49
50
if
sub
in
_EVAL_TOOL_VERBS:
51
from
aquin.cli
import
cmd_tool
52
53
cmd_tool(_EVAL_TOOL_VERBS[sub], rest)
54
return
55
56
print(f
"Unknown eval subcommand: {sub}"
)
57
print(
"Run: aquin eval --help"
)
58
sys.exit(1)
aquin.cli
Definition
cli.py:1
aquin.eval_cli._print_help
None _print_help()
Definition
eval_cli.py:20
aquin.eval_cli.cmd_eval
None cmd_eval(list[str] args)
Definition
eval_cli.py:41
aquin
eval_cli.py
AQIT · Aquin Labs Private Limited · Apache 2.0 · Generated by
1.18.0