ask-always-returns-string
IN premise
`ask()` returns a string on every code path — LLM response, raw search results, or fallback; it never raises an exception to the caller.
Summary
The ask function is guaranteed to give back a text value no matter what happens internally — whether it gets a normal LLM answer, falls back to raw search results, or hits some other edge case. Callers never need try/catch around it because it handles all its own errors and always resolves to a string.
Dependents
These beliefs depend on this one:
- ask-is-fault-tolerant-and-bounded — The ask module is fault-tolerant (always returns a string, catches LLM failures, falls back to raw FTS5 search) and execution-bounded (tool loop capped at 3 iterations), ensuring reliable bounded knowledge retrieval regardless of LLM availability.
- llm-integration-fails-softly-across-modules — All LLM-facing modules apply consistent fail-soft error handling: the ask module always returns a string even when the LLM is unavailable, and the derive pipeline accumulates per-proposal errors rather than raising exceptions — no LLM failure path crashes the system.
Details
| Source | entries/2026/04/29/reasons_lib-ask.md |