Reference

Structured query syntax

Multi-line query documents with term, intent, and hyde for explicit retrieval behavior.

For complex queries, GNO supports a multi-line query document syntax on gno query and gno ask. Use typed lines to steer the retrieval pipeline without reaching for CLI flags.

What this is

Structured query syntax is a small text format for telling GNO which parts of a question are exact terms, which parts describe intent, and which parts should act like a hypothetical ideal answer. It helps when a natural-language question is ambiguous or when your personal knowledge base uses inconsistent wording.

Example

auth flow
term: "refresh token" -oauth1
intent: how token rotation works
hyde: Refresh tokens rotate on each use and previous tokens are invalidated.

Rules

Base query resolution

Every query document needs a base query. GNO picks the base in this order:

  1. Plain untyped lines joined together
  2. Otherwise all term: lines joined together
  3. Otherwise all intent: lines joined together

hyde: lines are never searched directly — they serve only as hypothetical document expansion signal.

Supported surfaces

CLI example

gno query $'auth flow\\nterm: "refresh token"\\nintent: token rotation'