スキル一覧に戻る
eyadsibai

langchain-agents

by eyadsibai

0🍴 0📅 2026年1月15日
GitHubで見るManusで実行

SKILL.md


name: langchain-agents description: Use when "LangChain", "LLM chains", "ReAct agents", "tool calling", or asking about "RAG pipelines", "conversation memory", "document QA", "agent tools", "LangSmith" version: 1.0.0

LangChain - LLM Applications with Agents & RAG

The most popular framework for building LLM-powered applications.

When to Use

  • Building agents with tool calling and reasoning (ReAct pattern)
  • Implementing RAG (retrieval-augmented generation) pipelines
  • Need to swap LLM providers easily (OpenAI, Anthropic, Google)
  • Creating chatbots with conversation memory
  • Rapid prototyping of LLM applications

Core Components

ComponentPurposeKey Concept
Chat ModelsLLM interfaceUnified API across providers
AgentsTool use + reasoningReAct pattern
ChainsSequential operationsComposable pipelines
MemoryConversation stateBuffer, summary, vector
RetrieversDocument lookupVector search, hybrid
ToolsExternal capabilitiesFunctions agents can call

Agent Patterns

PatternDescriptionUse Case
ReActReason-Act-Observe loopGeneral tool use
Plan-and-ExecutePlan first, then executeComplex multi-step
Self-AskGenerate sub-questionsResearch tasks
Structured ChatJSON tool callingAPI integration

Tool Definition

ElementPurpose
NameHow agent refers to tool
DescriptionWhen to use (critical for selection)
ParametersInput schema
Return typeWhat agent receives back

Key concept: Tool descriptions are critical—the LLM uses them to decide which tool to call. Be specific about when and why to use each tool.


RAG Pipeline Stages

StagePurposeOptions
LoadIngest documentsWeb, PDF, GitHub, DBs
SplitChunk into piecesRecursive, semantic
EmbedConvert to vectorsOpenAI, Cohere, local
StoreIndex vectorsChroma, FAISS, Pinecone
RetrieveFind relevant chunksSimilarity, MMR, hybrid
GenerateCreate responseLLM with context

Chunking Strategies

StrategyBest ForTypical Size
RecursiveGeneral text500-1000 chars
SemanticCoherent passagesVariable
Token-basedLLM context limits256-512 tokens

Retrieval Strategies

StrategyHow It Works
SimilarityNearest neighbors by embedding
MMRDiversity + relevance balance
HybridKeyword + semantic combined
Self-queryLLM generates metadata filters

Memory Types

TypeStoresBest For
BufferFull conversationShort conversations
WindowLast N messagesMedium conversations
SummaryLLM-generated summaryLong conversations
VectorEmbedded messagesSemantic recall
EntityExtracted entitiesTrack facts about people/things

Key concept: Buffer memory grows unbounded. Use summary or vector for long conversations to stay within context limits.


Document Loaders

SourceLoader Type
Web pagesWebBaseLoader, AsyncChromium
PDFsPyPDFLoader, UnstructuredPDF
CodeGitHubLoader, DirectoryLoader
DatabasesSQLDatabase, Postgres
APIsCustom loaders

Vector Stores

StoreTypeBest For
ChromaLocalDevelopment, small datasets
FAISSLocalLarge local datasets
PineconeCloudProduction, scale
WeaviateSelf-hosted/CloudHybrid search
QdrantSelf-hosted/CloudFiltering, metadata

LangSmith Observability

FeatureBenefit
TracingSee every LLM call, tool use
EvaluationTest prompts systematically
DatasetsStore test cases
MonitoringTrack production performance

Key concept: Enable LangSmith tracing early—debugging agents without observability is extremely difficult.


Best Practices

PracticeWhy
Start simplecreate_agent() covers most cases
Enable streamingBetter UX for long responses
Use LangSmithEssential for debugging
Optimize chunk size500-1000 chars typically works
Cache embeddingsThey're expensive to compute
Test retrieval separatelyRAG quality depends on retrieval

LangChain vs LangGraph

AspectLangChainLangGraph
Best forQuick agents, RAGComplex workflows
Code to start<10 lines~30 lines
State managementLimitedNative
Branching logicBasicAdvanced
Human-in-loopManualBuilt-in

Key concept: Use LangChain for straightforward agents and RAG. Use LangGraph when you need complex state machines, branching, or human checkpoints.

Resources

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です