Skip to main content

RAGnificent - Your Magnificent RAG-Powered Chatbot Toolkit

Python License RAG LLM Compatible

RAGnificent is a Python package that enables developers to quickly build powerful chatbots with seamless tool integration and Retrieval-Augmented Generation (RAG) capabilities, supporting any OpenAI-compatible LLM.

Why RAGnificent?

  • LLM Agnostic - Works with Groq, OpenAI, Gemini, and any OpenAI-compatible API
  • Easy Tool Integration - Add custom functions as tools with minimal code
  • Flexible Configuration - Support for both cloud and self-hosted LLMs
  • Conversation Management - Efficient short-term memory management with summarization technique
  • Prompt Customization - Flexible system and summary prompts
  • Lightweight - Minimal dependencies, maximum functionality

Installation

  1. Download the package from GitHub
  2. Install using pip:
pip install path/to/RAGnificent-<version>-py3-none-any.whl

Quick Start

from RAGnificent import ChatAI, AgentParams
import os


def add(x: int, y: int) -> int:
    """Add two numbers together."""
    return x + y


tools = [add]

# For OpenAI-compatible endpoints
rag = ChatAI()
chatbot = rag.initiate_chatbot(
    params=AgentParams(
        model="gpt-3.5-turbo",  # Or any other model
        api_key="your_api_key",
        base_url="https://api.openai.com/v1",  # Or your custom endpoint
        system_prompt="You are a helpful AI assistant.",
        summary_prompt="Summarize the conversation concisely.",
        thread_id='1',
        tools=tools,  # Optional
        temperature=0.7  # Optional
    )
)

while True:
    user_input = input("You (q to quit): ")
    if user_input.lower() == 'q':
        break
    response = chatbot.run(messages=user_input)
    print("AI:", response)

Configuration Options

AgentParams

Parameter Type Description Required
model str Model name (e.g. "gpt-3.5-turbo") Yes
api_key str Your API key Yes
base_url str API base URL (default: OpenAI) No
system_prompt str Initial system prompt Yes
summary_prompt str Prompt for conversation summaries Yes
thread_id str Conversation thread identifier Yes
user_information dict User metadata for personalization No
tools list[callable] Custom tools/functions to integrate No

Supported LLM Providers

  • OpenAI (including Azure OpenAI)
  • Groq
  • Gemini
  • Any OpenAI-compatible API (LocalAI, vLLM, etc.)
  • Anthropic Claude (via OpenAI compatibility layer)

Adding Custom Tools

def multiply(a: int, b: int) -> int:
    """Multiply two numbers together."""
    return a * b

def get_weather(city: str) -> str:
    """Get current weather for a given city."""
    return f"Weather in {city}: Sunny"

tools = [multiply, get_weather]

Best Practices

  1. Use environment variables for API keys
  2. Include clear docstrings for your tools
  3. Use type hints for better tool understanding
  4. Keep system prompts concise but descriptive
  5. Handle sensitive user information appropriately

License

RAGnificent is licensed under the RAGnificent-License:

Copyright (c) 2025 [K. M. Abul Farhad-Ibn-Alam]

Permission is hereby granted to any person obtaining a copy of this software
and associated documentation files (the "Software") to use, modify, and distribute
the Software for any purpose, subject to the following conditions:

1. Redistributions must retain this copyright notice.
2. Commercial use requires written permission from the author.
3. The author is not liable for any damages arising from Software use.

All rights not expressly granted are reserved by the author.

Release files for RAGnificent 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RAGnificent 1.0
File Size Uploaded
ragnificent-1.0.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for RAGnificent 1.0
File Interpreter ABI Platform
ragnificent-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.0 kB

Release files / ragnificent-1.0.tar.gz

Download URL ragnificent-1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cf9a3bd9279e17e7fd4d9cc6818ad1e17ded374f2d10acfbca8fcddff3fa7edd
BLAKE2b-256 checksum
How to use checksums
805110187e777e43b83851958e6030df99c550c548cedd8b97cbb9d628589273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / ragnificent-1.0-py3-none-any.whl

Download URL ragnificent-1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8589dcd7ab9f94f1cf3bd10953540f3b02372ea61a45cdb015435a019af2209
BLAKE2b-256 checksum
How to use checksums
c9388040e4d88aac85c461192804ef8e55fed5ebbbcef26528902bd23c6a8c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page