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.
ui/app.py 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 UI (ui/app.py::_render_attempt_timeline).
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.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”).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 I built this”). No hosted-API key, no third-party data processor in
the LLM path.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.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.../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.