RAGLink是一个开源的Retrieval-Augmented Generation框架,旨在通过结合检索和大模型生成技术,提升自然语言处理任务的性能和效率。为用户提供了一个强大、灵活且易于扩展的开发环境。
Project description
RAGLink
RAGLink是一个开源的Retrieval-Augmented Generation框架,旨在通过结合检索和大模型生成技术,提升自然语言处理任务的性能和效率。为用户提供了一个强大、灵活且易于扩展的开发环境。
🔑核心特性
- 检索增强:通过检索技术,框架能够快速从大量数据中检索相关信息,为生成任务提供上下文支持。
- 生成能力:集成了多种生成大模型,能够根据检索到的信息生成流畅、准确的文本。
- 模块化设计:采用模块化设计,便于开发者根据需求定制和扩展功能。
🗺️集成
向量数据库
- Milvus
- Qdrant
Embeddings模型
- OpenAIEmbeddings
- MiniMaxEmbeddings
- HuggingFaceEmbedding
Reranker模型
- bce-embedding-base_v1
📚使用文档
安装说明
可以直接从终端中的pip命令安装RAGLink:
pip install raglink
基本用法
配置 RAGLink
from raglink import RAGLink
# 配置RAGLink
config = {
……
}
rag = RAGLink.from_config(config)
config 配置
# 文档切分配置
# character:固定大小分块; separator:分隔符分块;recursive_character:递归字符分割
config = {
……
"test_splitter": {
"provider": "character",
"config": {
"chunk_size": 300,
"chunk_overlap": 20
}
}
……
}
# 向量模型配置
# openai:OpenAI的Embeddings模型;minimax:MiniMax的Embeddings模型;huggingface:HuggingFace的Embeddings模型
config = {
……
"embedder": {
"provider": "minimax",
"config": {
"api_key": ……,
"group_id": ……
}
}
……
}
# 向量数据库配置
# qdrant:Qdrant向量数据库;milvus:Milvus向量数据库
config = {
……
"vector_store": {
"provider": "qdrant",
"config": {
"collection_name": "……",
"vector_size": 1536,
"host": "localhost",
"port": 6333
}
}
……
}
文档向量化
# 输入文档地址进行向量化
rag.execute_store(file_path=file_path)
检索获取上下文
# 输入查询语句进行检索获取上下文
result = rag.get_context(question=question, limit=limit)
版本更新
v0.0.7
新增Milvus向量数据库,数据插入
v0.0.6
新增Milvus向量数据库,数据修改、删除等功能
v0.0.3
新增HuggingFaceEmbedding
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
RAGLink-0.0.7.tar.gz
(15.8 kB
view details)
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
RAGLink-0.0.7-py3-none-any.whl
(26.9 kB
view details)
File details
Details for the file RAGLink-0.0.7.tar.gz.
File metadata
- Download URL: RAGLink-0.0.7.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31e6f1dc35d1e1c3e6f38755db1565bb3c4cc890e763f95eade5f91e46c2cbfc
|
|
| MD5 |
f01d8bbf5a7950770bd08445663a8497
|
|
| BLAKE2b-256 |
778fb971f56a5f5042bc575926660223c94d3ada7e009cba59eb4f5bd224602b
|
File details
Details for the file RAGLink-0.0.7-py3-none-any.whl.
File metadata
- Download URL: RAGLink-0.0.7-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
880c06c60979170fd7f29c3bc103b0106ffd74dd067ed0f7d5de61591007ae2e
|
|
| MD5 |
4788bd4ef1ff5dfc96201650627be94d
|
|
| BLAKE2b-256 |
e7cedd4c53988826f1a0b76c6ea7a2dda7e62031727139937dc580b962a27657
|