Agent skill
ai-prompting-langchain-rag-pipeline
Sub-skill of ai-prompting: LangChain RAG Pipeline (+4).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/ai/prompting/ai-prompting/langchain-rag-pipeline
SKILL.md
LangChain RAG Pipeline (+4)
LangChain RAG Pipeline
from langchain.document_loaders import DirectoryLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.embeddings import OpenAIEmbeddings
from langchain.vectorstores import Chroma
from langchain.chains import RetrievalQA
from langchain.chat_models import ChatOpenAI
# Load and split documents
loader = DirectoryLoader("./docs", glob="**/*.md")
*See sub-skills for full details.*
## DSPy Optimized Pipeline
```python
import dspy
from dspy.teleprompt import BootstrapFewShot
# Define signature
class QASignature(dspy.Signature):
"""Answer questions based on context."""
context = dspy.InputField(desc="Relevant context")
question = dspy.InputField(desc="Question to answer")
answer = dspy.OutputField(desc="Concise answer")
*See sub-skills for full details.*
## Prompt Engineering Patterns
```python
# Chain-of-Thought Prompting
COT_TEMPLATE = """
Solve this step by step:
Problem: {problem}
Let's think through this carefully:
1. First, I'll identify the key information...
2. Next, I'll determine the approach...
*See sub-skills for full details.*
## PandasAI Data Querying
```python
import pandas as pd
from pandasai import SmartDataframe
from pandasai.llm import OpenAI
# Load data
df = pd.read_csv("sales_data.csv")
# Create AI-enabled dataframe
llm = OpenAI(api_token="...")
*See sub-skills for full details.*
## Agenta Prompt Management
```python
from agenta import Agenta
# Initialize
ag = Agenta()
# Define prompt variant
@ag.variant
def summarize_text(text: str, style: str = "concise"):
prompt = f"""
*See sub-skills for full details.*
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?