Skip to content

drona-gyawali/Quark

Repository files navigation

Screenshot_from_2026-03-18_17-22-09-removebg-preview

A high-performance RAG (Retrieval-Augmented Generation) system designed for deep document analysis and persistent context awareness. This project implements a sophisticated architecture that synchronizes unstructured text and image data, utilizing a dual-memory layer for a truly personalized chat experience.


image

Architecture Overview

Quark distinguishes itself through a multi-stage pipeline:

  • Multimodal Ingestion: Uses Unstructured.io for text partitioning and pdfplumber for precise image extraction. A custom Sync Layer aligns these modalities for comprehensive embedding.
  • Dual-Stream Memory:
    • Short-Term Memory (STM): Powered by Redis for rapid session-based context.
    • Long-Term Memory (LTM): Powered by Mem0 to retain user history and preferences over time.
  • Local Chat History: All conversation logs are stored in a local SQLite database, ensuring your data stays on your system.
  • Interface: A streamlined CLI UI for interacting with your documents.

Getting Started

Follow these steps to initialize and run the Quark-RAG system on your local machine.

1. Initialization

We provide a setup script to handle dependency installation and environment checks.

  1. Grant execution permissions:
    chmod +x setup.sh
  2. Run the initializer:
    ./setup.sh

2. Configure Environment Variables

Before launching the cli, you must set up your credentials. inside a .env file in the root directory and populate it with your API keys

3. Launching the CLI

Once the setup is complete, you can start chatting with your documents immediately via the terminal interface.

npm run cli

Interface image image


Summary

This implementation follows a Modular RAG pattern. By decoupling the ingestion of images and text and re-syncing them at the metadata level, the system maintains higher contextual integrity than standard "text-only" pipelines. The integration of Redis and Mem0 mimics human cognitive functions by separating immediate recall from historical knowledge.

About

Talk to your docs. No fluff, just facts - AI that doesnot hallucinate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors