██████╗ ███████╗███████╗██████╗ ██████╗ ███████╗███████╗██╗███╗   ██╗███████╗
██╔══██╗██╔════╝██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝██║████╗  ██║██╔════╝
██║  ██║█████╗  █████╗  ██████╔╝██████╔╝█████╗  █████╗  ██║██╔██╗ ██║█████╗  
██║  ██║██╔══╝  ██╔══╝  ██╔═══╝ ██╔══██╗██╔══╝  ██╔══╝  ██║██║╚██╗██║██╔══╝  
██████╔╝███████╗███████╗██║     ██║  ██║███████╗██║     ██║██║ ╚████║███████╗
╚═════╝ ╚══════╝╚══════╝╚═╝     ╚═╝  ╚═╝╚══════╝╚═╝     ╚═╝╚═╝  ╚═══╝╚══════╝

Evolve your LLM-Wiki from Interaction History.

DeepRefine-Skill plugs into agent workflows and use a single command /deeprefine in your agent CLI to refine and evolve your LLM-Wiki.

releasev0.1.7
python3.10+
licenseMIT

What DeepRefine Does?

Suppose you have constructed a LLM-Wiki (e.g., Graphify) knowledge base, and you have interacted with it for some days. Then DeepRefine will make use of your logged queries to refine and evolve your LLM-Wiki based on the interaction history.

You can either use DeepRefine in-agent usage (e.g., Cursor, Codex, etc.) or DeepRefine CLI with FAISS index and API/vLLM.

For Agent CLI

Trigger with /deeprefine in your agent CLI.

  • Uses your current chat model.
  • By skill, no original DeepRefine code base setup needed.

For Terminal CLI

Run with deeprefine refine in your terminal CLI.

  • Requires original DeepRefine code base in environment.
  • Supports third-party API providers or local vLLM endpoints.

Install & Quick Start

For in-agent usage, follow the quick start below.

Install Packages

Install packages in your Python environment: pip install deeprefine-cli graphify.


Install Agent Skills [Cursor]

At your KB project root, run: graphify cursor install and deeprefine cursor install.


Then run the following commands in your agent CLI to run a simple example.

/graphify . /graphify query "your query here" /deeprefine

Core Commands

Run from your KB project root (where graphify-out/graph.json exists).

CLI refine (FAISS)

Command Description
deeprefine history add --query "..." Record a query
deeprefine history list List history
deeprefine history list --pending Unrefined only
deeprefine refine Refine all pending
deeprefine refine --query "..." Refine one query
deeprefine refine --rebuild-index Rebuild FAISS first
deeprefine index --rebuild Rebuild FAISS cache only

What It Produces

Structured artifacts for reproducibility, auditing, and iterative graph improvements.

graphify-out/ |—— graph.json └── .deeprefine/ |—— history.jsonl # query history (CLI refine / loop finish) |—— loop_trace_<query_id>.json # agent loop audit (required for apply) |—— refinement_actions_*.txt # <refinement> block from agent |—— refinement_results_*.jsonl # run logs |—— graph.json.bak # backup before apply/refine └── cache/reafiner.pkl # FAISS cache (CLI mode only)