一键导入
sparkgen-rag
Ingest documents, query knowledge bases, evaluate RAG quality, and manage KBs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ingest documents, query knowledge bases, evaluate RAG quality, and manage KBs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate a new SparkGen-AWS project from the cookiecutter template
Develop and modify the SparkGen-AWS cookiecutter template — variables, hooks, files
Run cookiecutter matrix tests to verify template generates correctly across all variable combinations
Add, modify, remove, list, or show agents in the workflow
Send a chat message to the running agent server and display the response
Switch LLM providers, deployment modes, and manage environment configuration
| name | sparkgen-rag |
| description | Ingest documents, query knowledge bases, evaluate RAG quality, and manage KBs |
| user_invokable | true |
| auto_invokable | true |
| auto_invoke_hint | Invoke when the user discusses RAG, knowledge bases, document ingestion, or retrieval |
| arguments | <ingest|query|eval|kb-list|kb-add|config> [args] |
Manage the RAG (Retrieval-Augmented Generation) pipeline.
Before any action:
config/ai_workflow.yaml — knowledge_bases: and rag: sectionsls documents/ls local_data/vectors/ 2>/dev/nullcurl -sf http://localhost:8000/v1/rag/knowledge-bases -H "X-API-Key: ${API_KEY:-dev-local-key}"/sparkgen-rag ingest [--kb name] [--source path])python -m app.rag.ingest --kb ${KB:-default} --source ${SOURCE:-./documents}
This will:
config/ai_workflow.yaml settings (size, overlap, strategy)/sparkgen-rag query "<question>" [--mode standard|self_rag|graphrag] [--kb name])If server is running:
curl -s -X POST http://localhost:8000/v1/rag/query \
-H "Content-Type: application/json" \
-H "X-API-Key: ${API_KEY:-dev-local-key}" \
-d '{"question": "<question>", "mode": "<mode>", "knowledge_base": "<kb>"}'
Display: answer, sources with relevance scores, chunks retrieved.
/sparkgen-rag eval [--kb name])python -m app.rag.eval --kb ${KB:-default} --config config/rag.yaml
Runs RAG quality evaluation. Reports:
/sparkgen-rag kb-list)Parse config/ai_workflow.yaml knowledge_bases: section and display:
| Name | Description | Source Paths | File Types | Vector Store | Chunks |
/sparkgen-rag kb-add <name> --source <path> [--description text])Add a new knowledge base to config/ai_workflow.yaml:
- name: <name>
description: "<description>"
source_paths:
- <path>
file_types: [pdf, docx, txt, md]
auto_ingest: false
collection: <name>_vectors
chunking:
size: 500
overlap: 50
strategy: sliding_window
vector_store:
backend: faiss
index_path: ./local_data/vectors/<name>
Then assign it to relevant agents in their rag.knowledge_bases list.
/sparkgen-rag config)Show current RAG configuration: