ragboost


Nameragboost JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryBoosting Retrieval-Augmented Generation with Context Reordering
upload_time2025-09-01 21:45:19
maintainerNone
docs_urlNone
authorYinsicheng Jiang, Chivier Humber
requires_python>=3.10
licenseMIT
keywords feed reader tutorial
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RAGBoost

## Getting Started 
### Install from Source
Python >=3.10
```bash
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:
```bash
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:
```bash
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:
```json
{
    "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
- [x] Implement the Group Aware RR scheduler
- [ ] Support online inference
- [ ] Implement a faster prefix cache
- [ ] Support multi-modality models

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ragboost",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "feed, reader, tutorial",
    "author": "Yinsicheng Jiang, Chivier Humber",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ef/5a/6e986919f248792bcd68432b52fc5f7831ec019e839a9638155027450659/ragboost-0.0.1.tar.gz",
    "platform": null,
    "description": "# RAGBoost\n\n## Getting Started \n### Install from Source\nPython >=3.10\n```bash\ngit clone https://github.com/SecretSettler/RAGBoost.git\ncd RAGBoost\npip install -e .\n```\n\n### Using Docker\n#### Docker Image\n```\ndocker pull seanjiang01/prompt-planner:v0.0.1\ndocker run -d --gpus all --name prompt-planner-container prompt-planner\ndocker exec -it prompt-planner-container bash\n```\n\n#### Build from scatch\n```\ngit clone https://github.com/SecretSettler/RAGBoost.git\ncd RAGBoost\ndocker build -t ragboost .\ndocker run -d --gpus all --name ragboost-container ragboost\ndocker exec -it ragboost-container bash\n```\n**Note:** This is slow due to building FlashAttention from scatch.\n\n## Quick usage\n### Offline\n#### Build dataset and index from scratch\n----------------\n**1. BM25, MultihopRAG**\n\nRECOMMENDED: Please refer to `examples/construct_rag_data/multihopRAG_bm25.py`\n\nQuick running command:\n```bash\ndocker run -d \\\n  --name elasticsearch \\\n  -p 9200:9200 \\\n  -p 9300:9300 \\\n  -e \"discovery.type=single-node\" \\\n  -e \"xpack.security.enabled=false\" \\\n  -e \"xpack.security.http.ssl.enabled=false\" \\\n  -e \"xpack.security.transport.ssl.enabled=false\" \\\n  -e \"ES_JAVA_OPTS=-Xms512m -Xmx512m\" \\\n  docker.elastic.co/elasticsearch/elasticsearch:8.18.2\n\npython examples/construct_rag_data/multihopRAG_bm25.py\n```\n\n**2. Faiss, MultihopRAG**\n\nRECOMMENDED: Please refer to `examples/construct_rag_data/multihopRAG_faiss.py`\n\nQuick running command:\n```bash\npython -m sglang.launch_server \\\n  --model-path Alibaba-NLP/gte-Qwen2-7B-instruct \\\n  --is-embedding \\\n  --host 0.0.0.0 \\\n  --port 30000\n\npython examples/construct_rag_data/multihopRAG_faiss.py\n```\n------\n#### Generating and selecting plan\nRECOMMENDED: Please refer to `examples/planner/generate_plan.py`\n\nQuick running command:\n```\npython examples/planner/generate_plan.py --prompts_path <PATH-TO-YOUR RETRIEVAL-OUTPUT> --output_path <YOUR-PLAN-SAVE-PATH>\n```\n\n#### Launch inference\nRECOMMENDED: Please refer to `examples/planner/sglang_inference.py`\n\nQuick running command:\n```\npython -m sglang.launch_server --model-path Qwen/Qwen3-32B --port 30000 --tp-size 4 --reasoning-parser qwen3 --enable-metrics --schedule-policy lpm\n\npython examples/planner/sglang_inference.py --model Qwen/Qwen3-32B --plan_path <YOUR-PLAN-SAVE-PATH> --corpus_path <PATH-TO-YOUR-CORPUS-WITH-CTX-LENGTH>\n```\n\n\n## Data Format:\nIf 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:\n```json\n{\n    \"qid\": 0,\n    \"text\": \"Is the sky blue?\",\n    \"answer\": [\"Yes\", \"Yes the sky is blue\"],\n    \"top_k_doc_id\": [2, 8, 1, 10]\n}\n```\nThis should be under the `--prompts_path` for plan generation and selection.\n\n## Roadmap\n- [x] Implement the Group Aware RR scheduler\n- [ ] Support online inference\n- [ ] Implement a faster prefix cache\n- [ ] Support multi-modality models\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Boosting Retrieval-Augmented Generation with Context Reordering",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/SecretSettler/RAGBoost"
    },
    "split_keywords": [
        "feed",
        " reader",
        " tutorial"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f0f47f0f81ef78f947f57f76c8664cf656464e544a75bbe074f2eef89dc71d8a",
                "md5": "222f4e3ed774234c6d1bedcd7d88f4b5",
                "sha256": "239d012774161659e186bf2c4f2c4e0af93fa38c272998e063a79854c6ea3992"
            },
            "downloads": -1,
            "filename": "ragboost-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "222f4e3ed774234c6d1bedcd7d88f4b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 2427,
            "upload_time": "2025-09-01T21:45:18",
            "upload_time_iso_8601": "2025-09-01T21:45:18.000501Z",
            "url": "https://files.pythonhosted.org/packages/f0/f4/7f0f81ef78f947f57f76c8664cf656464e544a75bbe074f2eef89dc71d8a/ragboost-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ef5a6e986919f248792bcd68432b52fc5f7831ec019e839a9638155027450659",
                "md5": "badc57e6354a9ebaa7e076555e425648",
                "sha256": "0a3cd8eaecb86877a8eaba8b5296e27cce32fcd2e2b661ab168ce3a4522bad96"
            },
            "downloads": -1,
            "filename": "ragboost-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "badc57e6354a9ebaa7e076555e425648",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3006,
            "upload_time": "2025-09-01T21:45:19",
            "upload_time_iso_8601": "2025-09-01T21:45:19.048473Z",
            "url": "https://files.pythonhosted.org/packages/ef/5a/6e986919f248792bcd68432b52fc5f7831ec019e839a9638155027450659/ragboost-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-01 21:45:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SecretSettler",
    "github_project": "RAGBoost",
    "github_not_found": true,
    "lcname": "ragboost"
}
        
Elapsed time: 0.55641s