ask-has-tiered-query-modes

IN derived (depth 1)

The ask module supports tiered query modes with graceful degradation: full LLM synthesis with a bounded 3-iteration tool loop, no-synth mode that bypasses the LLM entirely, and automatic fallback from LLM failure to raw FTS5 search results.

Summary

The ask system has three levels of operation: it can run a full AI-powered answer with up to three rounds of tool use, skip the AI entirely and return raw search results, or automatically fall back to raw search if the AI step fails. This means the system always returns something useful regardless of whether the LLM is available or functioning correctly.

Justifications

SL — Three orphan premises describing independent query modes that together define ask's complete tiered execution model

Antecedents (all must be IN):

  • ask-no-synth-bypasses-llm — When `no_synth=True`, `ask()` returns raw `api.search()` results without invoking the Claude CLI.
  • ask-falls-back-to-raw-search — When LLM synthesis fails for any reason (timeout, missing CLI, non-zero exit), `ask()` returns the raw FTS5 search results as fallback.
  • ask-tool-loop-capped-at-three — The LLM synthesis loop runs at most `MAX_ITERATIONS` (3) rounds, with `FINAL_TURN_INSTRUCTION` appended on the last iteration to force a final answer.

Dependents

These beliefs depend on this one:

Details