Essentials on LangChain 🦜️🔗

Langchain is one of the most sought after tool that enables the ability to build smart genai based projects and startups today. Let's get exploring in the essentials of this trending topic that's only few min read away to get it going with fundamentals


Driven Technophile 🚀 Passionate Developer 🙋🏻‍♀️ Creative Visionary ✨

August 21, 2023


Find more articles like this
Machine LearningDeep LearningNLPNeural NetworksComputer VisionLLMPALM2Neural NetworksTransformerAutoencodersData ScienceAlgorithm
Top Highlights Today!

Breaking Barriers: Democratizing Access to Vector Databases

Large language models (LLMs) and AI-related technologies are on everyone’s lips. Vector databases, the critical infrastructure for LLMs and AI applications, have gained widespread attention from a broader user base, expanding from algorithm engineers to include application and backend developers.

Essentials on Langchain

What is LangChain?

LangChain is a framework for developing applications powered by large language models (LLMs).

TL;DR LangChain makes the complicated parts of working & building with language models easier. It helps do this in two ways:

  1. Integration - Bring external data, such as your files, other applications, and API data, to LLMs
  2. Agents - Allows LLMs to interact with its environment via decision making and use LLMs to help decide which action to take next

To build effective Generative AI applications, it is key to enable LLMs to interact with external systems. This makes models data-aware and agentic, meaning they can understand, reason, and use data to take action in a meaningful way. The external systems could be public data corpus, private knowledge repositories, databases, applications, APIs, or access to the public internet via Google Search.

Here are a few patterns where LLMs can be augmented with other systems:

  • Convert natural language to SQL, executing the SQL on database, analyze and present the results
  • Calling an external webhook or API based on the user query
  • Synthesize outputs from multiple models, or chain the models in a specific order

It may look trivial to plumb these calls together and orchestrate them but it becomes a mundane task to write glue code again and again e.g. for every different data connector or a new model. That’s where LangChain comes in!

Why LangChain?

LangChain’s modular implementation of components and common patterns combining these components makes it easier to build complex applications based on LLMs. LangChain enables these models to connect to data sources and systems as agents to take action.

  1. Components are abstractions that works to bring external data, such as your documents, databases, applications,APIs to language models. LangChain makes it easy to swap out abstractions and components necessary to work with LLMs.
  2. Agents enable language models to communicate with its environment, where the model then decides the next action to take. LangChain provides out of the box support for using and customizing 'chains' - a series of actions strung together.

Though LLMs can be straightforward (text-in, text-out) you'll quickly run into friction points that LangChain helps with once you develop more complicated applications.