Skip to content

Searching knowledge (RAG)

Subaya keeps a searchable knowledge corpus — curated reference material plus your own project content. The suya rag commands let you and your agents retrieve from it: a hybrid search over a pgvector + lexical index, plus chunk reads and status.

Search the corpus with a free-text query:

Terminal window
suya rag search "<query>"

By default this is a hybrid search (semantic vector similarity combined with lexical matching). Useful options:

Terminal window
suya rag search "uart ring buffer" \
--scope curated \
--top-k 5 \
--semantic-only
  • --scope <scope> — limit the search to a scope. Use curated for the curated reference corpus, or project:<id> for a specific project’s content. The flag is repeatable, so you can search across several scopes at once.
  • --top-k <N> — return the top N results.
  • --semantic-only — restrict to semantic (vector) matching, skipping the lexical side of the hybrid search.

Search results are chunks. Read the full body of a curated chunk by its id:

Terminal window
suya rag read <chunk-id>

Check what’s indexed — per-scope chunk counts and the last ingest timestamp:

Terminal window
suya rag status