Sign inSign up

maruha/rag-agent

By maruha

•Updated 6 months ago

An intelligent Retrieval-Augmented Generation (RAG) agent with a modern web interface.

Image
Integration & delivery
Machine learning & AI
Data science
0

246

maruha/rag-agent repository overview

⁠Docling RAG Agent (Web Edition)

This agent allows you to ingest documents, crawl websites, and chat with your data using local LLMs (via Ollama) or OpenAI. Refer to: https://n4igme.github.io/randscript/rag-agent/⁠

⁠🚀 Key Features

  • 🌐 Modern Web UI: Real-time streaming chat with source citations.
  • 📁 Multi-Format Ingestion: Supports PDF, Word, Excel, PowerPoint, and Markdown via Docling.
  • 🎙️ Audio Support: Automatic transcription of MP3/WAV files using Whisper.
  • 🕷️ Integrated Web Crawler: Built-in crawl4ai support to scrape documentation directly into your knowledge base.
  • 🧠 Local or Cloud LLMs: Works with Ollama (Mistral, Llama 3.2, etc.) or OpenAI GPT-4o.
  • 🐘 Vector Search: High-performance semantic search using PostgreSQL and PGVector.

⁠🛠️ Quick Start (Docker Compose)

The easiest way to run this agent is using docker-compose. Create a docker-compose.yml file:

services:
  postgres:
    image: pgvector/pgvector:pg15
    environment:
      POSTGRES_USER: raguser
      POSTGRES_PASSWORD: ragpass
      POSTGRES_DB: postgres
    ports:
      - "5432:5432"

  web-app:
    image: maruha/rag-agent:latest
    ports:
      - "8000:8000"
    depends_on:
      - postgres
    environment:
      - DATABASE_URL=postgresql://raguser:ragpass@postgres:5432/postgres
      - OPENAI_API_KEY=ollama  # Or your OpenAI key
      - OPENAI_BASE_URL=http://host.docker.internal:11434/v1 # For local Ollama
      - LLM_CHOICE=qwen2.5-coder
      - EMBEDDING_MODEL=nomic-embed-text

⁠⚙️ Environment Variables

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection stringRequired
OPENAI_API_KEYOpenAI API Key or 'ollama'Required
OPENAI_BASE_URLAPI base URL (use for Ollama/Local)-
LLM_CHOICEModel name (e.g., gpt-4o-mini, mistral)qwen2.5-coder
EMBEDDING_MODELVector model (e.g., nomic-embed-text)nomic-embed-text

⁠📖 Usage

  1. Access UI: Open http://localhost:8000 in your browser.
  2. Upload: Drag and drop files to the "Ingest" tab.
  3. Crawl: Enter a URL to scrape documentation.
  4. Chat: Ask questions about your documents in the chat interface.

Tag summary

Content type

Image

Digest

sha256:a5269a615…

Size

1.9 GB

Last updated

6 months ago

docker pull maruha/rag-agent