How this project’s actual design choices — not aspirations — reflect
responsible-AI principles. Every claim below cites the code or the eval
artifact it’s backed by; where a principle isn’t fully met, that’s said
plainly rather than smoothed over. See docs/COMPLIANCE.md for how these
map against named external frameworks, and docs/RISK_REGISTER.md for the
open gaps.
frontend/src/components/chat/TurnCard.tsx)
renders the SQL text in an editable box before any result is shown;
api/main.py’s /ask response includes sql alongside result_rows.
A user (or API caller) can always see exactly what query produced an
answer.attempt_history and
rendered as a “Retry timeline” in the dashboard
(frontend/src/components/chat/RetryTimeline.tsx). This was a
deliberate architectural choice (docs/ARCHITECTURE.md’s “§1 The
LangGraph state machine”: “a small, explicit StateGraph… not a
free-form ReAct-style agent”) specifically so this trail is inspectable.plan_query_node’s
up-front plan and review_sql_node’s plan-conformance check are the same
kind of “reasoning step,” made visible rather than happening invisibly
inside one opaque generation call — the dashboard’s “Query plan” expander
(frontend/src/components/chat/QueryPlanPanel.tsx) shows the plan
itself, and a plan-conformance retry appears in the same “Retry
timeline” as any other self-correction attempt
(outcome="plan_not_satisfied"), not as a separate, hidden mechanism.docs/EVALUATION.md reports the actual latest benchmark run (35% final
accuracy) rather than only qualitative feature-list claims. A reader
deciding whether to trust this tool’s output has the real number, not a
marketing gloss.agent/nodes.py, agent/input_guard.py) — enough for a
legitimate user to understand something didn’t work, not enough detail to
hand an adversary a map of exactly what pattern tripped it.CLAUDE.md’s “SQL is untrusted output, always”).Settings.require_generation_approval (default true) closes
this: generation_node only proposes what would be generated
(status="pending_approval", nothing charged) until a human explicitly
confirms (POST /generate/confirm, or the matching “Generate” button in
the React dashboard). Content-safety honesty note: the
check gating what may be generated at all
(agent.orchestrator.nodes._basic_prompt_safety_check) is a keyword
heuristic — broadened in scope during this pass, but still explicitly
not a real ML-based content-moderation system, and still trivially
bypassed by a synonym, a non-English phrasing, or an indirect
description. This is disclosed here rather than left to look more solid
than it is; a genuine moderation-API call (several image/video providers,
including IMA, expose one) is the honest next step before this feature
is exposed to untrusted users at any real scale.docs/EVALUATION.md’s per-category breakdown
shows window_function_correctness and
ambiguous_question_handling_accuracy both measured at 0.0% in the
latest run, next to security_rejection_accuracy at 100%. A user should
trust this tool more for straightforward aggregation/filter questions
than for ambiguous or window-function-heavy ones — README.md’s “Known
limitations” already said this qualitatively; docs/EVALUATION.md now
backs it with numbers.llama3.1:8b is one model choice
among several the architecture supports (OLLAMA_MODEL is config-driven,
not hardcoded); accuracy is a property of the configured model, not a
fixed property of this codebase.README.md’s
“Why this project”). No hosted-API key, no third-party data processor in
the LLM path.faster-whisper) and text-to-speech
(Piper) run entirely on the user’s machine — no cloud speech API, no
data leaving it for either direction. The exception: live word-by-word
captions shown while the user is still talking use the browser’s own
built-in speech recognition, which in Chromium-based browsers sends
audio to that browser vendor’s own cloud service purely to render the
on-screen caption. The transcript actually submitted to the agent always
comes from the local model, never from that caption — the exception is
scoped to a UI convenience, not the data path that matters.docs/RISK_REGISTER.md’s
R-012, not silently left implicit.SCHEMA_TOP_K), not the whole schema —
originally a context-budget decision (docs/ARCHITECTURE.md’s “§3
Schema-retrieval pipeline”), but it also means less of the schema’s
metadata is ever exposed to the model than would be with a naive
dump-everything approach.db/value_sampling.py’s cardinality cap (max 20 distinct values) means
high-cardinality columns — the ones most likely to be names, emails, or
other PII — structurally never qualify for sampling into a prompt,
without needing to enumerate every possible PII column name in advance.
This is a side effect of a different design goal (disambiguating coded
columns), documented honestly as such, not sold as a purpose-built
privacy control.config/sensitive_columns.yaml,
docs/GOVERNANCE.md’s “Data classification policy”) for the columns the
cardinality heuristic alone wouldn’t catch (a small, closed set of
sensitive categories, say). See docs/RISK_REGISTER.md’s R-002 for the
honest state of that layer today: real code, zero columns classified
until a human does it per deployment.Both what a user types and what the database itself contains are treated as adversarial input, at the same trust level, not just the former:
agent/input_guard.py before anything else.security/sanitization.py) and scanned (detection-only) for
injection-shaped content before ever reaching a prompt — because
SECURITY.md’s own reasoning is direct about this: “anyone who can write
to the underlying database can write text that ends up inside an LLM
prompt.” Treating only the chat box as adversarial and the database as
trusted would have been an incomplete threat model.agent.orchestrator.nodes.media_search_node)
— the same principle extended to a third input channel a
malicious/mislabeled file in the configured library could exploit,
alongside database content and uploaded documents.docs/RISK_REGISTER.md’s R-005 and
SECURITY.md’s own disclosure.SECURITY.md) is load-bearing, not optional, and this project cannot
enforce it from inside the app.docs/RISK_REGISTER.md’s R-012. Whatever’s placed in the
configured folder is treated as safe to index and surface, on the
operator’s own judgment alone.../SECURITY.md — technical controls.COMPLIANCE.md — external framework mapping.GOVERNANCE.md — ownership and process.RISK_REGISTER.md — open risks named above, tracked.EVALUATION.md — the actual accuracy numbers referenced
throughout this document.