Raglite

From malue-ai/dazee-small · View interactive version

Raglite is an AI agent skill from the GitHub repository malue-ai/dazee-small. Local-first RAG cache — distill documents into structured Markdown for fast retrieval without external services.

How to use this skill

Skill file

RAGLite 本地知识检索

将文档蒸馏为结构化 Markdown 并建立本地索引,实现快速知识检索。无需外部向量数据库。

使用场景

执行方式

安装

pip install raglite

索引文档

from raglite import RAGLiteConfig, insert_document

config = RAGLiteConfig(
    db_url="sqlite:///~/Documents/xiaodazi/raglite.db",
)

insert_document(
    doc_path="report.pdf",
    config=config,
)

检索

from raglite import retrieve_chunks, rerank_chunks

chunks = retrieve_chunks(
    query="公司的营收增长情况",
    num_chunks=10,
    config=config,
)

reranked = rerank_chunks(query="公司的营收增长情况", chunk_ids=[c.id for c in chunks], config=config)

RAG 问答

from raglite import rag

response = rag(
    prompt="根据文档,公司去年的营收是多少?",
    config=config,
)
print(response)

支持的文档格式

输出规范

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.