LogoLogo
Home
  • Introduction
  • Quickstart
    • Starter guide
    • Core Concepts
      • Stack Type
      • Data Loader
      • Inputs/Outputs
      • Text Splitters
      • Embedding Model
      • Vector Store
      • Large Language Model
      • Memory
      • Chain
    • Testing Stack
    • Deployment
    • Knowledge Base
    • Organization and Teams
    • Secret Keys
    • Logs
  • Components
    • Inputs
    • Outputs
    • Document Loaders
    • Prompts
    • Text Splitters
    • Embeddings
    • Vector Store
    • Retrievers
    • Multi Modals
    • Agents
    • Large Language Models
    • Memories
    • Chains
    • Output Parsers
  • Customization
    • Writing Custom Components in GenAI Stack
    • Build your own custom component
    • Define parameters used for required components
  • Usecases
    • Simple QA using Open Source Large Language Models
    • Multilingual Indic Language Translation
    • Document Search and Chat
    • Chat with Multiple Documents
  • Terminologies
    • RAG - Retrieval Augmented Generation
    • Hybrid Search - Ensemble Retriever
  • REST APIs
    • GenAI Stack REST APIs
    • Chat API Reference
    • Text Generation API Reference
    • Rate Limiting and Sleep Mode
  • Troubleshooting
    • How to verify what is loaded and chunked from the loader?
  • Acknowledgements
    • Special Mentions
Powered by GitBook
On this page
  • Why We Need Chains?
  • The Use of Chains

Was this helpful?

  1. Quickstart
  2. Core Concepts

Chain

PreviousMemoryNextTesting Stack

Last updated 1 year ago

Was this helpful?

Chains in GenAI Stack are cohesive assemblies of interconnected and easily reusable components. They encapsulate a sequence of calls to various components such as models, document retrievers, other chains, etc., offering a streamlined and user-friendly interface to navigate through this sequence.

Why We Need Chains?

Chains serve as a mechanism to organize and connect various components within a system, facilitating the flow of data and instructions. This structured approach is crucial for the following reasons:

Understanding Context: Chains enable the system to comprehend not only individual components but also their interrelationships and contextual significance. By linking components in a chain, the system can grasp the broader context of the task at hand, enhancing its overall understanding and performance.

The Use of Chains

Chains serve as a mechanism to organize and connect various components within a system, facilitating the flow of data and instructions.Chains offer several key benefits in system design and operation:

Improving Workflow Efficiency: By organizing components into a chain, the system can streamline its workflow and optimize resource utilization. This structured approach enhances the efficiency of data processing and task execution, leading to improved overall performance.

Customizing Responses: Chains allow for the customization of system behavior and responses based on specific requirements or input conditions. By configuring the sequence and interaction of components within a chain, the system can tailor its responses to better suit the desired outcomes or user preferences.

Now, it's time to integrate all the remaining components into the RetrievalQA chain. To construct this chain, connect the Memory, Large Language Models (LLM), and Retriever. It's important to note that direct connection of LLM to the RetrievalQA chain is not possible; instead, we employ an additional chain known as CombinedDocsChain for this purpose.

Integrate all the components using chain

Conclusion

Here we have mentioned a simple chain flow, To know more about chains please refer the documentation . To know more about usecases please look at the Usecases section .

here
here