韬略问答Agent多跳策略的多轮检索模块
Project description
多跳策略的多轮检索模块
使用方法
from taolue_multi_retrival.multi_retrieve import efficient_rag
efficient_rag(search_rerank_func, query, top_k, libs, kb_ids, kb_file_ids)
search_rerank_func函数:
def search_rerank_func(query, top_k, libs, kb_ids, kb_file_ids)
参数说明
参数 类型 默认值 说明 search_rerank_func 函数 传入执行检索+精排操作的函数 query str 原始query libs List[str] ["es_chunk","es_summary","es_embedding","es_summary_embedding"] 一般情况下检索所有库,第二轮检索开始只检索es切片库、es摘要库,不检索向量库。 kb_ids List[int] / 哪个字段有值用哪个,Tuple结构:(知识库id, 文件id列表) kb_file_ids List[Tuple[int, List[int]]] / top_k int 10 每轮检索的数据量
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taolue_multi_retrival-1.0.3.tar.gz.
File metadata
- Download URL: taolue_multi_retrival-1.0.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da496144964fbf70a5b3757082cba47c16ef5fb7cf433fcdaa9b0ff5f9c4c75
|
|
| MD5 |
17bac990968fb28a1626192195d52df4
|
|
| BLAKE2b-256 |
cc32ee8bd4805d94ffe12fd459aa01c1710a86b8eafcafbc347dac6bed971c13
|
File details
Details for the file taolue_multi_retrival-1.0.3-py3-none-any.whl.
File metadata
- Download URL: taolue_multi_retrival-1.0.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ec28d589b3b6e320b2f0c2ee6937a1154fb14ebbe7322d705e473e0ccaeeeea
|
|
| MD5 |
541c7a02f0ef9326aa1bc02468df71b3
|
|
| BLAKE2b-256 |
dc3b7f3130b72f411e2a2a45dddde510ffbf1ffa1006a5d1390cbbb5ac55d8c8
|