Index of every page on this site: llms.txt
All skills
langchain-ai avatar

/langchain-rag

@7a385cd official
Run it yourself

Retired skill, replaced by `langchain-build-agent`. Use for retrieval-augmented generation with LangChain: it tells you to switch to `langchain-build-agent`.

Use this Skill: https://skilld.dev/gh/langchain-ai/langchain-skills/langchain-rag

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈43 tokens for metadata: the name and description. ≈114 when used: this file.

Description uses 2.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈173 characters, or 2.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

langchain-rag (retired)

langchain-rag was retired from langchain-skills. Use the langchain-build-agent skill instead.

  1. If langchain-build-agent is available, use it for this task.

  2. Otherwise, install it, then use it:

    npx skills add langchain-ai/langchain-skills --skill langchain-build-agent --yes
  3. Tell the user that langchain-rag is retired and that they can remove it with npx skills remove langchain-rag.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warningtoday5 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    This skill is an informational placeholder indicating that the tool has been retired and replaced by a newer version. It includes standard migration instructions and uses resources from the author's own infrastructure.

  • Sockettoday

    No alerts

  • Snyk1d

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    1/1 file flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 7a385cd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated yesterday
metadata
{
  "internal": "true"
}
  • rag
  • langchain
  • embeddings
  • vector-stores
  • document-loaders
  • retrieval
  • chroma
  • faiss
  • pinecone
  • openai

README badge

README badge for langchain-ai/langchain-skills/langchain-rag

Skill provides document loading, text splitting, embedding, and vector store integration for building retrieval-augmented generation (RAG) systems with LangChain. It covers loaders for PDFs and web content, RecursiveCharacterTextSplitter for chunking, OpenAI embeddings, and vector stores including Chroma, FAISS, and Pinecone. Use this when indexing external knowledge sources and retrieving relevant context to augment LLM responses.

Generated from the current SKILL.md.

What vector stores does this skill support?
The skill covers InMemoryVectorStore (testing), FAISS (local, high performance), Chroma (development), and Pinecone (production, managed). Each has different persistence and use-case tradeoffs.
Does this skill support both Python and TypeScript?
Yes. Code examples are provided for both Python (using langchain, langchain-community, langchain-openai) and TypeScript (using @langchain packages).
What embedding models are covered?
The skill demonstrates OpenAI embeddings (text-embedding-3-small). It does not prescribe other embedding providers, though LangChain supports multiple options.
Can I filter retrieval results by document metadata?
Yes. The skill covers adding metadata to documents and filtering search results using metadata properties like language or topic.
What document sources can I load from?
The skill covers PDFs (PyPDFLoader), web pages (WebBaseLoader, CheerioWebBaseLoader), and local directories (DirectoryLoader). It does not cover databases or APIs.

Generated from the current SKILL.md. These answers refresh after source changes.