Skip to content

A robust Retrieval-Augmented Generation (RAG) system for noisy, multi-intent queries using LLM-based query understanding. Implemented in Python with PostgreSQL and OpenSearch for retrieval and storage.

Notifications You must be signed in to change notification settings

derrdavid/omni-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omni-RAG: LLM-Assisted Query Understanding

Omni-RAG Pipeline

This project implements the core ideas of Omni-RAG (Dong et al. 2025): a Retrieval-Augmented Generation (RAG) system for real-world, noisy, and multi-intent queries.


Overview

  • LLM-based Query Understanding: Rewriting and decomposing user queries into sub-queries
  • Intent-Aware Retrieval: Vector search over external knowledge for each sub-query (e.g., FineWeb)
  • Reranking & Generation: BAAI/bge-base-en-v1.5 reranker and GPT-4.1-nano for final answer

Installation

# Clone repo and install dependencies
pip install -r requirements.txt

# Set up database and environment variables
cd docker
docker compose up -d

Usage

  1. Create a .env file with:
    • TIMESCALE_SERVICE_URL
    • OPENAI_API_KEY
  2. Setup DB and upload data:
    python src/upload_vectors.py
  3. Run the main pipeline:
    python src/main.py

Technologies Used

  • Python 3.10+
  • TimescaleDB (PostgreSQL)
  • Docker
  • FineWeb Dataset
  • GPT-4.1-nano
  • text-embedding-3-small
  • BAAI/bge-base-en-v1.5

Python Packages

openai
numpy
timescale-vector
pandas
dotenv
sentence-transformers
transformers
pydantic
datasets

📖 Reference


Research prototype inspired by the official Omni-RAG pipeline.

About

A robust Retrieval-Augmented Generation (RAG) system for noisy, multi-intent queries using LLM-based query understanding. Implemented in Python with PostgreSQL and OpenSearch for retrieval and storage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages