Skip to main content

RAGBoost

Getting Started

Install from Source

Python >=3.10

git clone https://github.com/SecretSettler/RAGBoost.git
cd RAGBoost
pip install -e .

Using Docker

Docker Image

docker pull seanjiang01/prompt-planner:v0.0.1
docker run -d --gpus all --name prompt-planner-container prompt-planner
docker exec -it prompt-planner-container bash

Build from scatch

git clone https://github.com/SecretSettler/RAGBoost.git
cd RAGBoost
docker build -t ragboost .
docker run -d --gpus all --name ragboost-container ragboost
docker exec -it ragboost-container bash

Note: This is slow due to building FlashAttention from scatch.

Quick usage

Offline

Build dataset and index from scratch


1. BM25, MultihopRAG

RECOMMENDED: Please refer to examples/construct_rag_data/multihopRAG_bm25.py

Quick running command:

docker run -d \
  --name elasticsearch \
  -p 9200:9200 \
  -p 9300:9300 \
  -e "discovery.type=single-node" \
  -e "xpack.security.enabled=false" \
  -e "xpack.security.http.ssl.enabled=false" \
  -e "xpack.security.transport.ssl.enabled=false" \
  -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
  docker.elastic.co/elasticsearch/elasticsearch:8.18.2

python examples/construct_rag_data/multihopRAG_bm25.py

2. Faiss, MultihopRAG

RECOMMENDED: Please refer to examples/construct_rag_data/multihopRAG_faiss.py

Quick running command:

python -m sglang.launch_server \
  --model-path Alibaba-NLP/gte-Qwen2-7B-instruct \
  --is-embedding \
  --host 0.0.0.0 \
  --port 30000

python examples/construct_rag_data/multihopRAG_faiss.py

Generating and selecting plan

RECOMMENDED: Please refer to examples/planner/generate_plan.py

Quick running command:

python examples/planner/generate_plan.py --prompts_path <PATH-TO-YOUR RETRIEVAL-OUTPUT> --output_path <YOUR-PLAN-SAVE-PATH>

Launch inference

RECOMMENDED: Please refer to examples/planner/sglang_inference.py

Quick running command:

python -m sglang.launch_server --model-path Qwen/Qwen3-32B --port 30000 --tp-size 4 --reasoning-parser qwen3 --enable-metrics --schedule-policy lpm

python examples/planner/sglang_inference.py --model Qwen/Qwen3-32B --plan_path <YOUR-PLAN-SAVE-PATH> --corpus_path <PATH-TO-YOUR-CORPUS-WITH-CTX-LENGTH>

Data Format:

If you have your own data, please format to the example below. Currently we only support data with jsonl format. Each json should at least contain these attributes:

{
    "qid": 0,
    "text": "Is the sky blue?",
    "answer": ["Yes", "Yes the sky is blue"],
    "top_k_doc_id": [2, 8, 1, 10]
}

This should be under the --prompts_path for plan generation and selection.

Roadmap

  • Implement the Group Aware RR scheduler
  • Support online inference
  • Implement a faster prefix cache
  • Support multi-modality models

Metadata

Release files for ragboost 0.0.1

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

Source distribution (sdist)

Source distribution for ragboost 0.0.1
File Size Uploaded Provenance Actions
ragboost-0.0.1.tar.gz 3.0 kB Without provenance Details for ragboost-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ragboost 0.0.1
File Interpreter ABI Platform Actions
ragboost-0.0.1-py3-none-any.whl Python 3 none any Details for ragboost-0.0.1-py3-none-any.whl

Total release size: 5.4 kB

Release files / ragboost-0.0.1.tar.gz

Download URL ragboost-0.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0a3cd8eaecb86877a8eaba8b5296e27cce32fcd2e2b661ab168ce3a4522bad96
BLAKE2b-256 checksum
How to use checksums
ef5a6e986919f248792bcd68432b52fc5f7831ec019e839a9638155027450659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Release files / ragboost-0.0.1-py3-none-any.whl

Download URL ragboost-0.0.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
239d012774161659e186bf2c4f2c4e0af93fa38c272998e063a79854c6ea3992
BLAKE2b-256 checksum
How to use checksums
f0f47f0f81ef78f947f57f76c8664cf656464e544a75bbe074f2eef89dc71d8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.18

Security for ragboost 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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