Redleaf Ai Assistant

🔎 How the Terminal AI Assistant Works

The assistant provides a two-step workflow: first search and summarize, then follow-up question mode.

1️⃣ Search and Summarize

When you issue a query, the assistant can:

Once relevant results are found, the assistant summarizes each document or page, producing concise, context-aware overviews.

Example:
You ask: “What does was the relationship of x with y”
The assistant identifies relevant pages, extracts the text, and summarizes the findings — giving a compact overview of each document or page.

2️⃣ Follow-Up Question Mode

After reviewing the summaries, you can ask detailed follow-up questions:

This workflow ensures that search + summarize happens first, then conversation is informed and structured, avoiding information overload.

3️⃣ LLM-Agnostic Design

The assistant is model-agnostic:


🛠️ Redleaf AI Assistant Commands

Use the following commands in the terminal to interact with the assistant:

Command SyntaxDescriptionExample
find [query]Find documents by path without loading them.find research_notes
`load [doc_idpath]`Load a specific document for focused questions.
search: [query]Perform a hybrid search across documents and summarize top results.search: example
id:[id] + page:[p] + [instr]Run an instruction on a specific page.id:1 + page:3 + summarize the main points
id:[id] + page:[p-p] + [instr]Run an instruction on a range of pages.id:1 + page:1-2 + extract key findings
search: [q] + [instr] + results:[N]Customize the number of search results returned.search: example + for each + summarize + results:30
/printExport the current chat session to an HTML file./print

🔄 Example Workflow

# 1. Find a document
find research_notes

# 2. Load it for discussion
load 1

# 3. Perform a hybrid search and summarize top results
search: example

# 4. Follow up with page-specific instructions
id:1 + page:1-2 + summarize the main points

# 5. Override number of results if needed
search: example + for each + summarize + results:30

# 6. Export the session for offline review
/print

This structured syntax ensures users can search, summarize, and reason interactively without ever leaving the terminal.


🧩 Summary

The Redleaf AI Assistant is a terminal-based research companion, not a replacement for the engine:

This addition transforms Redleaf from a purely passive knowledge engine into a side-by-side AI assistant — helping you reason, synthesize, and interact with your own document corpus in a personal, private, and modular way.