llm-application-dev
Skill9 starsChanged 7 months agoMITView on GitHub
End-to-end LLM application development: RAG pipelines, prompt engineering patterns, structured outputs, vector databases, embeddings, and LangChain/LangGraph orchestration with Claude. Triggers: /llm-application-dev, rag implementation, prompt engineering, vector database, embeddings, RAG система, промпт инжиниринг, LLM приложение.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MoizIbnYousaf/ai-agent-skillstheir own version, first seen Mar 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MoizIbnYousaf/ai-agent-skills★ 1.1ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository142 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- agents/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- claude-md/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- insight-architectSkill
- agent-teamsSkill
- brainstormingSkill
- claim-decomposerSkill
- context-engineeringSkill
- dispatcherSkill
- git-worktreesSkill
- hd-mavp-routerSkill
- mentor-modeSkill
- reference-registrySkill
- routing-policySkill
- skill-self-updateSkill
- tdd-workflowSkill
- ab-testSkill
- academic-researchSkill
- advanced-methodology-extensionsSkill
- agent-governanceSkill
- algorithm-designSkill
- analystSkill
- archcode-genomicsSkill
- arm-cortex-microcontrollersSkill
- atomizeSkill
- backward-traceabilitySkill
- boyko-goal-expansion-100Skill
- boyko-knowledge-auditSkill
- boyko-leverage-mapSkill
- boyko-methodSkill
- boyko-preflightSkill
- boyko-project-radarSkill
- boyko-scientific-consortiumSkill
- boyko-specialistSkill
- boyko-triangle-auditSkill
- boyko-why-ladderSkill
- browser-actSkill
- build-autoSkill
- c4-architectureSkill
- career-prepSkill
- changelog-genSkill
- citation-managementSkill
- code-debuggingSkill
- codex-skepticSkill
- codex-solverSkill
- codex-tracySkill
- combinatorial-creativitySkill
- common-groundSkill
- conductorSkill
- consilienceSkill
- construct-measurement-gateSkill
- cross-domainSkill
- data-analysisSkill
- data-breach-blast-radiusSkill
- defuddleSkill
- design-directionSkill
- diagram-generatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 220
Add chain-of-thought — measure delta
- Distinctive: line 221
Add few-shot examples (3-5) — measure delta
- Distinctive: line 222
Add output schema — measure parse failure rate
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- BSV
Скил : llm-application-dev
TL;DR : RAG пайплайны + промпт-инжиниринг для LLM приложений на Claude/LangChain
Вызов : /llm-application-dev, rag implementation, prompt engineering, RAG система
НЕ для : обучения моделей, fine-tuning, инфраструктуры GPU-кластеров
-->LLM Application Development
Build production-grade LLM applications: RAG systems, structured outputs, and optimized prompts.
When to Use This Skill
- Building RAG (Retrieval-Augmented Generation) systems over private documents
- Optimizing prompts for consistency and reliability in production
- Implementing structured outputs with Pydantic schemas
- Choosing and integrating vector databases (Pinecone, Weaviate, Chroma)
- Selecting embedding models for Claude applications
- Designing chain-of-thought and few-shot learning systems
- Debugging hallucinations, inconsistent outputs, or latency issues
- Building multi-step LLM workflows with LangGraph
Part 1: RAG Implementation
When RAG Beats Fine-Tuning
| Scenario | Approach |
| Proprietary documents, frequent updates | RAG |
| Stable domain knowledge, latency-critical | Fine-tuning |
| Need citations and source attribution | RAG |
| Behavior/style change | Fine-tuning |
Vector Database Selection
| DB | Best for | Notes |
| Pinecone | Production, managed | Serverless tier available |
| Weaviate | Hybrid search (dense + sparse) | Open-source, self-hosted option |
| Chroma | Development, local | Lightweight, zero-config |
| pgvector | Existing Postgres stack | SQL joins with vector search |
| Qdrant | High-throughput filtering | Rust core, fast payload filters |
Embedding Model Selection
| Model | Provider | Dims | Notes |
voyage-3-large | Voyage AI | 1024 | Anthropic recommended for Claude apps |
text-embedding-3-large | OpenAI | 3072 | Strong general-purpose |
bge-large-en-v1.5 | BAAI | 1024 | Open-source, competitive quality |
embed-english-v3.0 | Cohere | 1024 | Good multilingual |
Complete RAG Pipeline (LangGraph + Claude)
from langchain_anthropic import ChatAnthropic
from langchain_community.vectorstores import Chroma
from langchain_voyageai import VoyageAIEmbeddings
from langchain_core.prompts import ChatPromptTemplate
from langgraph.graph import START, StateGraph
from typing import TypedDict, List
from langchain_core.documents import Document
# State definition
class RAGState(TypedDict):
question: str
context: List[Document]
answer: str
# Initialize components
embeddings = VoyageAIEmbeddings(model="voyage-3-large")
vectorstore = Chroma(embedding_function=embeddings, persist_directory="./chroma_db")
retriever = vectorstore.as_retriever(search_kwargs={"k": 5})
llm = ChatAnthropic(model="claude-sonnet-4-6")
rag_prompt = ChatPromptTemplate.from_messages([
("system", """Answer using only the provided context.
If the answer is not in the context, say "I don't know."
Always cite the source document.
Context:
{context}"""),
("human", "{question}")
])
# Graph nodes
def retrieve(state: RAGState) -> RAGState:
docs = retriever.invoke(state["question"])
return {"context": docs}
def generate(state: RAGState) -> RAGState:
context_text = "\n\n".join(doc.page_content for doc in state["context"])
chain = rag_prompt | llm
response = chain.invoke({"question": state["question"], "context": context_text})
return {"answer": response.content}
# Build graph
graph = StateGraph(RAGState)
graph.add_node("retrieve", retrieve)
graph.add_node("generate", generate)
graph.add_edge(START, "retrieve")
graph.add_edge("retrieve", "generate")
rag_app = graph.compile()
# Run
result = rag_app.invoke({"question": "What is our refund policy?"})
print(result["answer"])Retrieval Strategies
- Dense retrieval — embedding similarity (good for semantic match)
- Sparse retrieval — BM25/keyword (good for exact terms, product names)
- Hybrid search — combine both with RRF (Reciprocal Rank Fusion)
- Multi-query — generate N query variants, union results
Reranking (improves top-k quality significantly)
from langchain_cohere import CohereRerank
from langchain.retrievers import ContextualCompressionRetriever
compressor = CohereRerank(model="rerank-english-v3.0", top_n=3)
compression_retriever = ContextualCompressionRetriever(
base_compressor=compressor,
base_retriever=retriever
)Part 2: Prompt Engineering Patterns
Few-Shot Learning
from langchain_core.prompts import FewShotChatMessagePromptTemplate
examples = [
{"input": "The product broke after 2 days", "output": "negative"},
{"input": "Best purchase I've made this year!", "output": "positive"},
{"input": "It works, nothing special", "output": "neutral"},
]
example_prompt = ChatPromptTemplate.from_messages([
("human", "{input}"), ("ai", "{output}")
])
few_shot_prompt = FewShotChatMessagePromptTemplate(
examples=examples,
example_prompt=example_prompt,
)Structured Outputs with Pydantic
from langchain_anthropic import ChatAnthropic
from langchain_core.prompts import ChatPromptTemplate
from pydantic import BaseModel, Field
class SQLQuery(BaseModel):
query: str = Field(description="The SQL query")
explanation: str = Field(description="Brief explanation")
tables_used: list[str] = Field(description="Tables referenced")
llm = ChatAnthropic(model="claude-sonnet-4-6")
structured_llm = llm.with_structured_output(SQLQuery)
prompt = ChatPromptTemplate.from_messages([
("system", """You are an expert SQL developer.
Generate efficient, secure SQL with parameterized queries."""),
("user", "Convert this to SQL: {query}")
])
chain = prompt | structured_llm
result = await chain.ainvoke({"query": "Find users registered in the last 30 days"})
print(result.query) # SELECT * FROM users WHERE created_at > ...
print(result.tables_used) # ['users']Chain-of-Thought Patterns
cot_prompt = ChatPromptTemplate.from_messages([
("system", """Solve problems step by step.
Format:
REASONING: <step-by-step thinking>
ANSWER: <final answer>"""),
("user", "{problem}")
])System Prompt Design Checklist
- Role and expertise defined ("You are an expert X")
- Output format specified (JSON, markdown, plain text)
- Constraints listed (max length, forbidden topics)
- Example of desired output included (if non-obvious)
- Edge case handling specified ("If unsure, say...")
Prompt Optimization Workflow
- Baseline: simple zero-shot prompt, measure accuracy on 20 samples
- Add chain-of-thought — measure delta
- Add few-shot examples (3-5) — measure delta
- Add output schema — measure parse failure rate
- A/B test variants, track: accuracy, consistency, latency, token cost
Common Pitfalls
| Pitfall | Fix |
| Hallucinated citations in RAG | Require model to quote exact passage before answering |
| Context window overflow | Rerank + truncate to top-3 docs, max 4K context |
| Inconsistent JSON output | Use with_structured_output() instead of text parsing |
| Over-engineered prompts | Start simple; complexity has diminishing returns |
| No error handling on LLM calls | Wrap in retry with exponential backoff |
| Hardcoded prompts in code | Store in version-controlled YAML/JSON files |
Production Checklist
- Retry logic with exponential backoff (transient API errors)
- Token usage logging per request
- Prompt version tracked in metadata
- Latency P50/P95/P99 monitored
- Fallback behavior when retrieval returns nothing
- PII scrubbing before sending to external APIs
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

