Demystifying LangChainJS Agent: Unraveling the Future of Language Processing

Daniel Chu
8 min readJul 8, 2023

LangChain serves as a breath of fresh air in the realm of developing applications for Large Language Models (LLMs).

It sets a new standard by providing a refreshing approach to LLM application development.

Here are some of the capability LangChain offered:

  1. Schema — Basic data types and schemas including Text, ChatMessages, Examples, and Document.
  2. Models — Large Language Models (LLMs), Chat Models, and Text Embedding.
  3. Prompts — Consisting of PromptValue, Prompt Templates, Example Selectors, and Output Parsers; facilitating input construction and output parsing for language models.
  4. Indexes — Structuring documents for LLMs, including Document Loaders, Text Splitters, VectorStores, and Retrievers.
  5. Memory — Storing and retrieving data in a conversation, with short-term and long-term memory capabilities.
  6. Chains — Sequences of modular components or other chains to accomplish common use cases, including LLMChain, Index-related chains (Stuffing, Map Reduce, Refine, Map-Rerank), and Prompt Selector.
  7. Agents — Used for unknown chains of calls to LLMs or tools, consisting of Tools, Toolkits, Agents, and Agent Executor.

These components and chains enable easy development and customisation of language model applications.

--

--