Fusion retriever
HybridFusionRetrieverPack #
Bases: BaseLlamaPack
Hybrid fusion retriever pack.
Ensembles vector and bm25 retrievers using fusion.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/hybrid_fusion/base.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
get_modules #
get_modules() -> Dict[str, Any]
Get modules.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/hybrid_fusion/base.py
72 73 74 75 76 77 78 79 |
|
retrieve #
retrieve(query_str: str) -> Any
Retrieve.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/hybrid_fusion/base.py
81 82 83 |
|
run #
run(*args: Any, **kwargs: Any) -> Any
Run the pipeline.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/hybrid_fusion/base.py
85 86 87 |
|
QueryRewritingRetrieverPack #
Bases: BaseLlamaPack
Query rewriting retriever pack.
Given input nodes, build a vector index.
Then rewrite the query into multiple queries and rerank the results.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/query_rewrite/base.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
get_modules #
get_modules() -> Dict[str, Any]
Get modules.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/query_rewrite/base.py
52 53 54 55 56 57 58 |
|
retrieve #
retrieve(query_str: str) -> Any
Retrieve.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/query_rewrite/base.py
60 61 62 |
|
run #
run(*args: Any, **kwargs: Any) -> Any
Run the pipeline.
Source code in llama-index-packs/llama-index-packs-fusion-retriever/llama_index/packs/fusion_retriever/query_rewrite/base.py
64 65 66 |
|