Skip to main content

personalrag

Núcleo reutilizável de RAG (Retrieval-Augmented Generation) sobre bases de conhecimento em Markdown.

Separa o motor (esta biblioteca) do conteúdo/config de cada projeto. Cada base define um Settings e usa a API:

from personalrag import VaultRag, Settings

settings = Settings(vault_dir="..", collection="git")
rag = VaultRag(settings)

rag.index()
print(rag.buscar("como desfazer o último commit"))
print(rag.responder("como desfazer o último commit"))

E o servidor MCP:

from personalrag.mcp import run_mcp
from config import settings

run_mcp(settings)

Instalação

pip install personalrag          # núcleo
pip install "personalrag[mcp]"   # com o servidor MCP

Módulos

Módulo Responsabilidade
config.py Settings (dataclass)
chunking.py Dividir markdown por seção + breadcrumb
store.py Embeddings + Chroma
retrieve.py Busca (+ rerank opcional)
generate.py LLM compatível com OpenAI
rag.py Classe VaultRag
cli.py python -m personalrag index/query
mcp.py run_mcp(settings)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

personalrag-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

personalrag-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file personalrag-0.1.0.tar.gz.

File metadata

  • Download URL: personalrag-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for personalrag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 957c112999bdba9554352e63f9511e805e47bff88fcf05f2c540e294ee5c106f
MD5 b5b267b8ff90986a42f5f8ee08a5dfa4
BLAKE2b-256 42427740ef2e54e33851174a03ed3ae70937581c2c45aaeb5d6eff1e13e10ddb

See more details on using hashes here.

File details

Details for the file personalrag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: personalrag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for personalrag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c625272fea226a4cf66e948e377ca46d343fef38e2fb547778c92563b36460f2
MD5 dc8f42b71cec8983025ab69964429ede
BLAKE2b-256 29a29ce8741aa319307c3735c3072b8f8e799b9ba3108484223da002ac17aa5d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page