Back to Home
DIMANANDEZ icon

refrag

Verified Safe

by DIMANANDEZ

Overview

A Python library for Retrieval Augmented Generation (RAG) focusing on fast direct encoding of micro-chunks, query-time heuristic compression for context efficiency, and optional LLM-based reranking for improved retrieval precision.

Installation

Run Command
No command provided

Environment Variables

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY

Security Notes

The core indexing and retrieval components (`REFRAGEmbedder`, `REFRAGRetriever`, `ChunkCompressor`, `MixedContextDecoder`) primarily use local models (sentence-transformers) and heuristic logic, posing minimal direct network security risks beyond model downloads. The optional `REFRAGReranker` component makes external API calls to OpenAI or Anthropic, requiring API keys and sending query/document data to these third-party LLM providers. There are no obvious `eval` calls, obfuscation, or hardcoded secrets in the provided source code. A notable discrepancy exists between the README/documentation (which states LLM-powered representation generation during indexing) and the actual Python source code (which explicitly states 'NO LLM calls during indexing' for the embedder and retriever, performing fast direct encoding locally).

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens100
Stars0
Forks0
Last Update2026-01-17

Tags

RAGLLMEmbeddingsInformation RetrievalPython Library