Skip to main content

A modular, production-ready Retrieval-Augmented Generation (RAG) platform with multi-vector database support

Project description

🚀 TUG (TheUltimateRAG)

A Modular, Production-Ready Foundation for Next-Generation AI Applications

Build scalable, secure, and intelligent RAG (Retrieval-Augmented Generation) systems without reinventing the wheel.

Python 3.10+ FastAPI LangChain License: MIT

🔗 Official Website & Documentation
👉 https://ultimaterag.vercel.app/

Key FeaturesArchitectureGetting StartedVisualizerAPIContributing


📖 What is TUG (TheUltimateRAG)?

TUG (TheUltimateRAG) is a real-world, production-grade RAG framework, not just another tutorial or demo project.

It is designed to solve common problems developers face when moving from simple prototypes to scalable AI systems, such as:

  • Multi-user data separation
  • Long-term memory handling
  • Organizational knowledge sharing
  • Clean, modular architecture

Whether you’re building:

  • A corporate knowledge assistant
  • A legal or research AI
  • A personal second-brain
  • Or a multi-tenant SaaS AI platform

👉 TUG (TheUltimateRAG) gives you a strong, extensible backend foundation.

For a complete walkthrough, architecture deep-dives, and usage examples,
📘 visit the official documentation:
https://ultimaterag.vercel.app/

🔐 Environment Configuration for TheUltimateRAG

To run TheUltimateRAG correctly, you must create and configure a .env file.
This file stores environment-specific settings such as API keys, database configs, and runtime options.

The project uses Pydantic Settings + python-dotenv, so all variables defined in .env are automatically loaded at startup.


📁 Step 1: Create the .env File

At the root of the project, create a file named:

.env

⚙️ Step 2: Required & Optional Environment Variables

Below is a complete reference of supported environment variables, grouped by purpose.

You only need to configure the parts relevant to your setup.


🧩 Core Application Settings

APP_NAME=TheUltimateRAG
APP_ENV=development        # development | production
DEBUG=true
Variable Description
APP_NAME Application name
APP_ENV Runtime environment
DEBUG Enable/disable debug logs

🤖 LLM & Embedding Providers

LLM_PROVIDER=openai        # openai | ollama | anthropic
EMBEDDING_PROVIDER=openai # openai | ollama | huggingface
MODEL_NAME=gpt-3.5-turbo
Variable Description
LLM_PROVIDER LLM backend to use
EMBEDDING_PROVIDER Embedding model provider
MODEL_NAME Chat model name

🔑 API Keys (Required Based on Provider)

OpenAI

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx

Anthropic

ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxx

⚠️ Note: If LLM_PROVIDER or EMBEDDING_PROVIDER is set to openai, OPENAI_API_KEY must be provided, otherwise a warning will be shown.


🧠 Ollama Configuration (Local Models)

OLLAMA_BASE_URL=http://localhost:11434

Use this only if you are running Ollama locally.


🗂️ Vector Database Configuration

ChromaDB (Default – Local)

VECTOR_DB_TYPE=chroma
VECTOR_DB_PATH=./chroma_db_data
EMBEDDING_DIMENSION=1536

PostgreSQL + PGVector

VECTOR_DB_TYPE=postgres
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=vector_db
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
Variable Description
VECTOR_DB_TYPE chroma or postgres
VECTOR_DB_PATH Local ChromaDB storage path
EMBEDDING_DIMENSION Vector embedding size

🧠 Memory & Conversation Storage (Redis)

MEMORY_WINDOW_SIZE=10
MEMORY_WINDOW_LIMIT=10

REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_USER=default
REDIS_PASSWORD=

The system automatically builds the Redis connection URL internally.


🔄 How .env Is Loaded

The project uses:

  • python-dotenv
  • pydantic-settings
load_dotenv()
settings = Settings()

So no manual loading is required.


✅ Minimal .env (Quick Start)

If you want to get started quickly, this is enough:

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx
LLM_PROVIDER=openai
EMBEDDING_PROVIDER=openai
VECTOR_DB_TYPE=chroma

⚠️ Important Notes

  • Do NOT commit .env to Git
  • Add .env to .gitignore
  • Use different .env files for dev & prod if needed

📘 Need More Help?

For advanced configuration, architecture details, and examples, visit:

👉 https://theultimaterag.vercel.app/


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultimaterag-0.1.1.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultimaterag-0.1.1-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file ultimaterag-0.1.1.tar.gz.

File metadata

  • Download URL: ultimaterag-0.1.1.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for ultimaterag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a2f9fdf803ea2bdef60b63604a9d35ef55a5abb857214a31d980ec9081f79db5
MD5 e4ca32ffa72a1c105726a2fb0d741627
BLAKE2b-256 962cdf1140eb68e1cc72c53eaf71651afd7c22eefd1cd185743d179db3ef271f

See more details on using hashes here.

File details

Details for the file ultimaterag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ultimaterag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for ultimaterag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12971f5231d3d13c8e36c7a86a742a4a49a515754e074a6c307569e0082539e1
MD5 9c93db1831f0a54fb62bf44361425e05
BLAKE2b-256 e70e51d349b1e53770373c16a547c95c95cc20eabbb877ce969ec27c770d0970

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page