rag_architecture

Designs LangChain-based LLM applications with agents, memory, chains, and retrieval-augmented generation patterns.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/jvsandhu/agentic-skills --skill rag-architecture-jvsandhu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag_architecture
Source: https://github.com/jvsandhu/agentic-skills/tree/main/skills/rag_architecture
Command: npx skills add https://github.com/jvsandhu/agentic-skills --skill rag-architecture-jvsandhu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires langchain, chromadb, openai, and includes references (resource) and assets (resource) components.

What problem does it solve? Building production LLM applications requires coordinating agents, memory, document retrieval, and tool integration, which is error-prone without proven architectural patterns and evaluation workflows. ## Core Features & Use Cases - Agent & Chain Patterns: Provides implementations for ReAct agents, sequential chains, router chains, and custom tool integration using LangChain. - RAG Pipeline Design: Covers semantic chunking, hybrid search (BM25 + vector with RRF), HyDE query transformation, and citation-grounded generation. - Memory & Evaluation: Guides selection of memory types (buffer, summary, entity, vector store) and RAG evaluation using the RAG Triad with Ragas or TruLens. - Use Case: When building a document Q&A chatbot, use this Skill to set up a Chroma vector store, configure hybrid retrieval, ground answers with source citations, and measure groundedness before deployment. ## Quick Start Ask the agent to design a RAG pipeline with LangChain that loads documents, builds a vector store, and answers questions with source citations.

Frequently Asked Questions about rag_architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline with LangChain?

Load documents with a DocumentLoader, split them with a TextSplitter, embed them into a vector store like Chroma, and connect a RetrievalQA chain to an LLM. Use semantic chunking and hybrid search combining BM25 with vector similarity for better retrieval quality.

How to add memory to a LangChain agent?

Pass a memory object such as ConversationBufferMemory to initialize_agent with a memory_key. For long conversations use ConversationSummaryMemory, for sliding windows use ConversationBufferWindowMemory, and for semantic recall use VectorStoreRetrieverMemory.

What is hybrid search in retrieval augmented generation?

Hybrid search combines keyword-based BM25 retrieval with vector cosine similarity, merging results via Reciprocal Rank Fusion. It outperforms vector-only search, especially for queries containing exact terms or technical vocabulary.

Which LangChain memory type should I use for long conversations?

Use ConversationSummaryMemory to compress older messages into summaries, or ConversationBufferWindowMemory to keep only the last N messages. Plain ConversationBufferMemory suits short conversations under roughly ten messages.

Why does my RAG system hallucinate answers?

Hallucination occurs when the system prompt lacks strict grounding instructions or retrieved context is irrelevant. Instruct the model to answer only from provided context, add citation requirements, and measure groundedness with the RAG Triad using Ragas or TruLens.

How do I evaluate a RAG application?

Measure the RAG Triad: context relevance, groundedness, and answer relevance, using frameworks like Ragas or TruLens. Also track retrieval latency under 200ms and log negative user feedback as evaluation examples.