Works with the AI Agents you already use
Production RAG Application Builder
Build a practical Python RAG application with modular architecture, reliable retrieval, grounded answers, evaluation, and deployment guidance.
Free
Production RAG Application Builder
Example session with this skill installed
I need to build a RAG app using FastAPI and Pinecone for 1,000 internal PDF manuals. Show me the project structure and an ingestion script that handles metadata.
- Read your context and instructions
- Compiled the production rag application
I will design a modular RAG application for your PDF manuals using FastAPI and Pinecone, focusing on metadata preservation and clear separation of concerns.
RAG Project Architecture
The structure separates the Pinecone adapter from the document processing logic to ensure you can swap components later without refactoring the core API.
# ingestion/processor.py
import uuid
from typing import List, Dict
from langchain.text_splitter import RecursiveCharacterTextSplitter
class DocumentProcessor:
def __init__(self, chunk_size: int = 1000, chunk_overlap: int = 100):
self.splitter = RecursiveCharacterTextSplitter(
chunk_size=chunk_size,
chunk_overlap=chunk_overlap
)
def process(self, text: str, metadata: Dict) -> List[Dict]:
"""Cleans text and creates chunks with preserved metadata."""
chunks = self.splitter.split_text(text)
processed_docs = []
for i, chunk in enumerate(chunks):
processed_docs.append({
"id": str(uuid.uuid4()),
"text": chunk,
"metadata": {
**metadata,
"chunk_index": i,
"source": metadata.get("filename")
}
})
return processed_docs
# adapters/vector_store.py
import pinecone
from typing import List, Dict
class PineconeAdapter:
def __init__(self, api_key: str, index_name: str):
self.index = pinecone.Index(index_name)
def upsert_documents(self, documents: List[Dict], embeddings: List[List[float]]):
vectors = [
(doc["id"], emb, doc["metadata"])
for doc, emb in zip(documents, embeddings)
]
self.index.upsert(vectors=vectors)
Next steps
- Initialize your Pinecone index with the correct dimensions for your chosen embedding model.
- Configure your
.envfile withPINECONE_API_KEYandOPENAI_API_KEY. - Run the ingestion script on a small batch of 5 PDFs to verify metadata filtering.
Connects securely to your tools. The creator never sees your data.
About this skill
Building a RAG application often leads to a tangled mess of brittle scripts, leaking abstractions, and ungrounded hallucinations. This skill helps you architect a maintainable Python RAG system from ingestion to deployment. It enforces modular design to ensure your retrieval logic, embedding providers, and vector stores remain swappable and testable.
What it does
- Architectural design defines a modular structure separating ingestion, chunking, storage, and generation.
- Robust ingestion implements structured text cleaning, metadata preservation, and error handling for various file formats.
- Retrieval optimization configures similarity search, metadata filtering, and citation handling.
- Evaluation strategy generates tests for retrieval recall and answer faithfulness using representative datasets.
- Deployment readiness provides FastAPI integration, environment configuration, and logging setup.
How it works
- Discovery phase establishes your document types, corpus size, security requirements, and preferred LLM providers.
- Modular scaffolding generates a project structure using typed interfaces and adapter patterns.
- Pipeline implementation builds the ingestion and retrieval logic based on your specific metadata needs.
- Validation and testing executes unit tests for chunking and mock-based tests for vector store integration.
Frameworks & tools
Primarily targets Python 3.9+ environments. Works with FastAPI for API layers, standard vector databases, and various embedding or LLM providers.
Why this beats prompting it yourself
Standard prompts often produce monolithic scripts that break when you switch providers or scale your document library. This skill enforces strict separation of concerns and production-ready security patterns like authorization-aware retrieval and input sanitization that generic LLM requests typically omit.
Use cases
- Build a document Q&A system from scratch with citations.
- Migrate a RAG prototype from a local script to a FastAPI microservice.
- Implement evaluation metrics to measure answer quality and retrieval relevance.
- Add multi-tenant document isolation to an existing retrieval pipeline.
Known limitations
Does not provide automated infrastructure provisioning or managed cloud hosting setup. Requires manual human review for final evaluation metrics and threshold tuning.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
Permissions
What's inside
Frequently Asked Questions
New in LLM Ops
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.