PitchHut logo
Engage with your documents using local LLM without API keys or cloud.
Pitch

Ragit offers a seamless way to interact with any folder of documents through a local language model. By utilizing Retrieval-Augmented Generation, it allows users to index various document formats and chat about the content directly. All processing remains local, ensuring data security without reliance on external services.

Description

ragit is a powerful local command-line interface (CLI) designed to facilitate seamless interactions with a folder of documents using Retrieval-Augmented Generation (RAG) and the Ollama language model. This tool enables users to engage in meaningful conversations with their documents without the need for API keys or cloud services, ensuring complete data privacy and security.

Key Features

  • Local Document Interaction: Chat directly with any folder containing text documents including .txt, .md, .pdf, and .docx. This allows for easy access and discussion of documents right from your machine.
  • Indexing Documents: Quickly index a folder of documents with a simple command:
    ragit index ./docs
    
  • Chat with Documents: Initiate a chat session to engage with your indexed documents using:
    ragit chat ./docs
    
  • Model Management: List available Ollama models, giving insight into different model capabilities:
    ragit models
    
  • Clear Index Functionality: Easily clear any existing index with:
    ragit clear ./docs
    

How Does ragit Work?

The ragit tool operates by loading and processing supported documents recursively. It splits the text into manageable chunks to facilitate efficient querying:

  1. Document Loading: Supported documents are loaded and processed for a comprehensive overview.
  2. Text Chunking: Documents are divided into overlapping text chunks (approximately 500 tokens each with a 50-token overlap).
  3. Embedding Creation: Text embeddings are generated using the nomic-embed-text model and stored in a local ChromaDB for fast retrieval at ~/.ragit/<hash_of_path>/ during chat sessions.
  4. Interactive Querying: During a chat, user queries are embedded, and the most relevant document chunks are retrieved to generate informed responses.
  5. Local Model Integration: Responses are streamed from a local Ollama chat model, ensuring responses are fast, relevant, and sourced directly from the user's documents, with the capability to display the chunks used in formulating the response.

Security and Data Privacy

All operations with ragit are conducted locally, ensuring that sensitive data remains on your machine. Indexes and document data are stored securely under ~/.ragit/<hash_of_path>/, and unsupported files are skipped with clear error messages, maintaining a smooth user experience.

In summary, ragit offers a user-friendly and secure method to interact with documents through local language models, making it an invaluable tool for anyone needing to extract or discuss information from multiple sources efficiently.

0 comments

No comments yet.

Sign in to be the first to comment.