Skip to main content

RAG Fusion Pipeline Llama Pack

This LlamaPack creates the RAG Fusion Query Pipeline, which runs multiple retrievers in parallel (with varying chunk sizes), and aggregates the results in the end with reciprocal rank fusion.

You can run it out of the box, but we also encourage you to inspect the code to take a look at how our QueryPipeline syntax works. More details on query pipelines can be found here: https://docs.llamaindex.ai/en/stable/module_guides/querying/pipeline/root.html.

Check out our notebook guide as well.

CLI Usage

You can download llamapacks directly using llamaindex-cli, which comes installed with the llama-index python package:

llamaindex-cli download-llamapack RAGFusionPipelinePack --download-dir ./rag_fusion_pipeline_pack

You can then inspect the files at ./rag_fusion_pipeline_pack and use them as a template for your own project!

Code Usage

You can download the pack to a ./rag_fusion_pipeline_pack directory:

from llama_index.core.llama_pack import download_llama_pack

# download and install dependencies
RAGFusionPipelinePack = download_llama_pack(
    "RAGFusionPipelinePack", "./rag_fusion_pipeline_pack"
)

From here, you can use the pack, or inspect and modify the pack in ./rag_fusion_pipeline_pack.

Then, you can set up the pack like so:

# create the pack
pack = RAGFusionPipelinePack(docs, llm=OpenAI(model="gpt-3.5-turbo"))

The run() function is a light wrapper around query_pipeline.run(*args, **kwargs).

response = pack.run(input="What did the author do during his time in YC?")

You can also use modules individually.

# get query pipeline directly
pack.query_pipeline

# get retrievers for each chunk size
pack.retrievers

# get query engines for each chunk size
pack.query_engines

Metadata

Release files for llama-index-packs-query 0.3.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 llama-index-packs-query 0.3.1
File Size Uploaded Provenance Actions
llama_index_packs_query-0.3.1.tar.gz 5.1 kB Without provenance Details for llama_index_packs_query-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-packs-query 0.3.1
File Interpreter ABI Platform Actions
llama_index_packs_query-0.3.1-py3-none-any.whl Python 3 none any Details for llama_index_packs_query-0.3.1-py3-none-any.whl

Total release size: 9.9 kB

Release files / llama_index_packs_query-0.3.1.tar.gz

Download URL llama_index_packs_query-0.3.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b3ee6b6bde2d51dc29f12f7a3c7b6c44acf759fe2ec84dfaddde01115a83f85
BLAKE2b-256 checksum
How to use checksums
0d94f11935b4a44a0ed776d6c9ae9f2d77c674dcd7643f91b1df124a94ec1fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / llama_index_packs_query-0.3.1-py3-none-any.whl

Download URL llama_index_packs_query-0.3.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff9f0e3dd6b04aec44afb832469de4125d0a0c1e2daf3d4e06b5998b199451eb
BLAKE2b-256 checksum
How to use checksums
03dcc07c658e847d981a666ea24ef87afe589acc99ebb56a68d8567ce6edf328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Security for llama-index-packs-query 0.3.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.

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