Skip to content
Back to skills

Rag Service

ASecurity

高性能 RAG 多路检索服务。集成 Milvus 向量数据库进行语义检索,并结合 Rerank 模型进行精准重排序,支持海量文档的高效存储与历史内容召回。

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added June 3, 2026
ai-agentspython

Works with

  • cli

Security analysis

A100/100

Scanned June 3, 2026

npx -y skills add majiayu000/claude-skill-registry --skill rag-service --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag Service?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rag Service
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-rag-service/badge)](https://www.skillsdirectory.com/skills/majiayu000-rag-service)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rag-service
description: 高性能 RAG 多路检索服务。集成 Milvus 向量数据库进行语义检索,并结合 Rerank 模型进行精准重排序,支持海量文档的高效存储与历史内容召回。
---

## 功能
RAG 多路检索服务,提供:
1. 向量语义检索 - 基于 Milvus 的向量相似度搜索
2. Rerank 重排序 - 对检索结果进行精排
3. 文档存储 - 保存文档到向量数据库

## 调用方式
```python
from services.rag_service.client import RAGServiceClient

client = RAGServiceClient()

# 健康检查
status = client.health()

# 语义检索
result = client.retrieve(
    query="Python 异步编程最佳实践",
    top_k=5,
    min_score=0.85,
    rerank=True
)
print(result["results"])

# 便捷方法:只获取文本列表
texts = client.retrieve_texts(query="Python 异步编程", top_k=5)

# 保存文档
client.save(documents=[
    {"text": "文档内容...", "metadata": {"title": "标题", "url": "..."}}
])
```

## 返回格式

### retrieve
```json
{
  "query": "Python 异步编程",
  "results": [
    {
      "id": "abc123",
      "text": "Python异步编程基于asyncio库...",
      "score": 0.92,
      "metadata": {"title": "Python官方文档", "url": "..."}
    }
  ],
  "total": 3,
  "elapsed_ms": 45.2,
  "from_cache": false
}
```

### save
```json
{
  "saved_count": 5,
  "collection_name": "websearch_results"
}
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.