Skip to content

Latest commit

History

175 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

DeepQuery Logo

An Advanced AI Research Assistant Agent

DjangoPostgreSQLCeleryLicense

📖 Overview

DeepQuery is a professional-grade AI Research Assistant designed to process, analyze, and synthesize complex information from multiple sources. Utilizing Retrieval-Augmented Generation (RAG), it seamlessly handles multi-document uploads, web searches, and image processing while maintaining both short-term context and long-term memory.

Engineered with token efficiency and safety in mind, DeepQuery doesn't just summarize—it critically analyzes data, detects conflicting information across sources, and provides precise citations for every claim.

✨ Key Features

🧠 Advanced AI & RAG Capabilities

  • Intelligent Memory: Utilizes both short-term conversational context and long-term memory retrieval.
  • Multi-Modal Processing: Supports concurrent analysis of multiple document formats (PDFs, Excel, etc.) and images.
  • Web Search Integration: Enhances localized knowledge with real-time web context.
  • Conflict Detection: Automatically cross-references multiple documents and flags conflicting information between sources.
  • Precise Citations: Every piece of synthesized knowledge is tracked back to its specific document or web source.
  • Token Efficiency: Highly optimized prompt engineering and a "safety buffer" mechanism prevent token waste and context window choking.

🛠️ Specialized Research Tools

DeepQuery offers granular control over the AI's behavior via specialized chat modes:

  • Temporary Chats: Disable long-term memory and storage for sensitive or one-off inquiries.
  • Strict Quote Mode: Forces the agent to answer using direct, verbatim quotes from documents/websites without altering the original context.
  • Challenge Mode: The AI critically analyzes its own synthesis to identify gaps, biases, or missing perspectives.
  • Audience Targeting: Toggle explanations between General or Expert levels.
  • Reasoning Depth: Adjust processing depth (Low, Medium, High) depending on whether you need a quick summary or a deep analytical breakdown.

⚙️ Powerful Admin

Built with Django Jazzmin, the admin panel provides complete operational control:

  • LLM & Embedding Management: Easily toggle and configure local models or API providers (OpenAI, Anthropic, Gemini, HuggingFace).
  • User Activity: Monitor chats, messages, and system usage.
  • Subscription & Billing: Manage subscription tiers, daily limits (messages, images, documents), and process payments via the Zarinpal SDK.

🏗️ Enterprise-Grade Architecture

  • Clean & Decoupled: Apps are heavily decoupled based on domain logic, ensuring near-zero coupling.
  • Auto-Registry Factory Pattern: Easily plug-and-play new LLMs or embedding providers without touching core logic.
  • Asynchronous Processing: Celery and Redis handle heavy embedding tasks and background jobs (like chat title generation) to keep the UI perfectly responsive.
  • Robust Security: Secured via JWT, CORS, and strict Django permission classes. Includes unit tests for mission-critical components.
  • Test Client: Includes a lightweight Vanilla JS frontend for easy API testing and demonstration.

📸 Screenshots

Main InterfaceImage Upload Usage
Main Chat InterfaceImage Upload
Source Conflict DetectionAdmin Dashboard
Conflict DetectionJazzmin Admin Panel

💻 Tech Stack

Core Framework & API:

  • Python 3.x
  • Django 6.0.3 & Django REST Framework 3.17.1
  • SimpleJWT, drf-spectacular (Swagger/OpenAPI)
  • Django-Jazzmin (Admin UI)

Database & Task Queue:

  • PostgreSQL + pgvector (Vector Search)
  • Redis 7.4 & Celery 5.6

AI & LLM Integration:

  • OpenAI, Anthropic, Google GenAI, HuggingFace Hub
  • Tiktoken

Data Processing:

  • Pandas, Numpy, PDFPlumber, PyPDFium2
  • BeautifulSoup4, Openpyxl

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • PostgreSQL (with pgvector extension installed)
  • Redis Server

Installation

  1. Clone the repository:
git clone https://github.com/aminrezaeeyan/DeepQuery.git
cd DeepQuery/server
  1. Set up a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Environment Variables: Create a .env file in the root directory and add your configurations (Database credentials, API Keys, Redis URL, Zarinpal tokens, etc.).

  2. Database Setup:

pythonmanage.pymakemigrationspythonmanage.pymigratepythonmanage.pycreatesuperuser
  1. Run Background Workers (in a separate terminal):
celery-Adeepqueryworker-linfo
  1. Start the Development Server:
pythonmanage.pyrunserver

🛡️ Testing

Run the included test suite to verify core components:

pytest

🤝 Contributing

Contributions, issues, and feature requests are welcome!

📄 License

This project is licensed under the MIT License.

About

A professional-grade AI Research Assistant designed to process, analyze, and synthesize complex information from multiple sources

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages