Skip to main content

韬略问答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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taolue_multi_retrival-1.0.7.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taolue_multi_retrival-1.0.7-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file taolue_multi_retrival-1.0.7.tar.gz.

File metadata

  • Download URL: taolue_multi_retrival-1.0.7.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for taolue_multi_retrival-1.0.7.tar.gz
Algorithm Hash digest
SHA256 9290453bfac2eadcda535fc01587d35b26d884c447ca35c476b4ab8e04a7c9d8
MD5 f5ac7cd9e603d7340ee4f8be4f126bfb
BLAKE2b-256 c1bc5f1858f68a3328e37e33394f147fed7f932bf42a078e1a5b2f0115dad8a6

See more details on using hashes here.

File details

Details for the file taolue_multi_retrival-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for taolue_multi_retrival-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 12c7925753bcf62998b51f35bdbd367e76137daa8eeeae2af5d554dca54610d1
MD5 706730144dfa3d86127de68aaf6266b5
BLAKE2b-256 961167e4f10e1b14461c40b7a2526305f6d03ca440c9e4c5474b7601af90a95f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page