refrag
Verified Safeby 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
No command providedEnvironment 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
haiku.rag
Agentic RAG system for document management, search, question answering, and multi-agent research. It can integrate with AI assistants via the Model Context Protocol (MCP) to expose its capabilities as tools.
Context-Engine
Open-core, self-improving code search and context retrieval system that integrates with AI tools and IDEs for enhanced development workflows.
mcp-local-rag
Local, private, and offline RAG for developers to semantically search and manage their technical documents and web content with keyword boosting.
RagThisCode
Set up a RAG (Retrieval-Augmented Generation) system to chat with the code of any public or private GitHub repository.