Skip to content

Search & Chat

Search the knowledge base and chat with RAG-powered answers grounded in your indexed content.

Perform a hybrid search over the knowledge base and display matching chunks.

jime search <query> [options]
Argument / Option Type Required Default Description
<query> string Yes The search query
--top, -t integer No 5 Maximum number of results (1–20)
--scope, -s string No DM view Visibility scope: all or dm-only
--source, -f string No All Filter by source (filename or #N doc ID). Repeatable.
--category, -c string No All Filter by category. Repeatable.

How search works

Each query runs three parallel searches that are merged using Reciprocal Rank Fusion:

  1. Vector search — Semantic similarity using embeddings
  2. Keyword search — Full-text search using PostgreSQL tsvector
  3. Trigram search — Fuzzy character-level matching for compound words and typos

See How Search Works for details on the retrieval pipeline.

Examples

# Basic search
jime search "dragon abilities"

# More results
jime search "combat rules" --top 10

# Filter by category
jime search "spells" --category rules

# Filter by source
jime search "encounters" --source "rulebook.pdf"

# Combine filters
jime search "treasure" --category sessions --scope all

chat

Ask questions with retrieval-augmented answers grounded in the indexed corpus. Supports single-shot mode, interactive multi-turn chat, and resuming past conversations.

jime chat [question] [options]
Argument / Option Type Required Default Description
[question] string No Question to ask. Omit for interactive mode.
--continue GUID No Resume a previous conversation by ID
--list flag No List recent conversations
--scope, -s string No DM view Visibility scope: all or dm-only
--source, -f string No All Filter by source. Repeatable.
--category, -c string No All Filter by category. Repeatable.

Modes

Interactive mode

Start a multi-turn conversation. Type your questions and get answers with context from previous turns. Type /quit or /exit to end.

jime chat

Single-shot mode

Ask a single question and get an answer. The conversation ID is displayed so you can resume later.

jime chat "How does advantage work in Shadowdark?"

Resume a conversation

Continue a previous conversation with full message history:

jime chat --continue 550e8400-e29b-41d4-a716-446655440000

List conversations

See recent conversations with their IDs and titles:

jime chat --list

Response format

Each answer includes:

  • The generated answer with source citations (e.g., "(Source 1)")
  • A list of sources with file names, page ranges, section headings, and relevance scores
  • A conversation ID for resuming later

Examples

# Ask about rules
jime chat "What are the rules for critical hits?"

# Filter to rules only
jime chat "What spells are available at level 1?" --category rules

# Player-visible content only
jime chat "What happened last session?" --scope all