Skip to content

AVVKavvk/agentic-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic RAG

Agentic RAG is a lightweight and modular Python library for implementing Retrieval-Augmented Generation (RAG). It enhances the capabilities of Large Language Models (LLMs) by combining document retrieval with natural language inference.

Designed for simplicity and flexibility, Agentic RAG provides modular components to easily integrate various LLMs, embeddings, and vector stores, making it an ideal tool for building context-aware AI solutions.


📚 Table of Contents


⚠️ Requirements

Actually Agentic RAG supports :

  • Google
  • OpenAI API

Features

  • Embeddings Model Integration: Plug in your preferred embedding models for compact and efficient vector embeddings.
  • LLM Agnostic: Seamlessly integrates with different LLMs from different providers.
  • RAG Pipeline: Combines document retrieval and language generation in a unified workflow.
  • Flexible Document Support: Ingest and index various document types (e.g., PDF, TXT, DOCX, Python, Javascript, ...).
  • Extensible Architecture: Easily swap vector stores, embedding models, or LLMs to suit your needs.

Chat with Your Documents Via REST API 💬

For the quickest and easiest way to get started, Agentic RAG provides an https api . It will guide you through every step, from selecting your documents to chatting with them, without writing a single line of Python. Prerequisite: GEMINI or OPENAI Key

# Example: Custom ignore folders for any configuration
custom_ignore_folders = [
    ".venv",
    "venv",
    "node_modules",
    "__pycache__",
    ".git",
    "build",
    "dist",
    "temp_files",  # Your custom folders
    "cache"
]

# Use in any configuration class
config = RAGConfig(
    llm=Settings.DEFAULT_LLM,
    provider=Settings.OLLAMA,
    ignore_folders=custom_ignore_folders  # Override default
)

See the complete example in examples/ignore_folders_config_example.py for all configuration types.

Environment Variables

You can set several environment vaiables to change Your settings :

  • OPENAI_CLIENT_URL if you have a custom OpenAI URL or vLLM URL
  • OPENAI_API_KEY if you need an OpenAI key
  • GEMINI_API_KEY if you need a Google Gemini API key

Providers and databases

LLM

For your LLM inference, you can use these providers :

  • OpenAI (Settings.OPENAI)
  • Google (Settings.GOOGLE_GEMINI)

Embeddings

For embeddings models, you can use these providers :

  • OpenAI (Settings.OPENAI)
  • Google (Settings.GOOGLE_GEMINI)

Vector Store

For your vector store, you can use :

  • Chroma (Settings.CHROMA)

Quick Start 🚀

Knowledge Base

Knowledge Base is a way to define data you want to ingest inside your vector store during the initialization of your RAG. It's the data ingest when you call build function :

Creating VENV

python -m venv .venv

Source VEVN

source ./.venv/bin/activate

Install all the dependency

pip install -r requirements.txt

Give +x permission to script

chmod +x test/start.sh

Run the start script

./test/start.sh

About

Agentic RAG is a modular framework for Retrieval-Augmented Generation (RAG). It makes it easy to plug in different LLMs, embeddings, and vector stores

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors