build-rag
Installation
SKILL.md
Build or modify RAG pipeline: $ARGUMENTS
Before Starting
- Search OpenAI docs for retrieval patterns:
- Use
mcp__openai-docs__search_openai_docswith query "vector stores" for vector store management - Use
mcp__openai-docs__search_openai_docswith query "file search tool" for file_search tool configuration - Use
mcp__openai-docs__search_openai_docswith query "retrieval augmented generation" for RAG best practices
- Use
- Read the existing RAG implementation in ai-lab-agent:
{{PROJECT_ROOT}}/{{AGENTS_DIR}}/ai-lab/retrieval/router.ts— intent classification and corpus routing{{PROJECT_ROOT}}/{{AGENTS_DIR}}/ai-lab/retrieval/search.ts— full pipeline (search → filter → re-sort → cite){{PROJECT_ROOT}}/{{AGENTS_DIR}}/ai-lab/retrieval/citations/parseSource.ts— file path → book/chapter/section{{PROJECT_ROOT}}/{{AGENTS_DIR}}/ai-lab/retrieval/citations/renderSources.ts— citation line + sources block
- Read the vector store integration:
{{PROJECT_ROOT}}/{{AGENTS_DIR}}/shared/tools.ts—executeFileSearch()using OpenAI Vector Store Search API{{PROJECT_ROOT}}/src/lib/writing-assistant/file-search.ts— org-specific vector store lookup