LangChain
LangChain is an open-source Python and JavaScript framework that provides abstractions and components for building applications that use large language models, including chains, agents, memory, and tool integrations.
Comprendre LangChain
Released in October 2022, LangChain became one of the most widely adopted frameworks in the LLM application ecosystem. It introduced standardized abstractions for the most common patterns in LLM-powered applications: connecting a model to external data sources, chaining multiple prompts together, enabling LLMs to use tools, and persisting context across interactions. LangChain's core primitives include: **Chains**: Sequences of LLM calls and other operations composed into a pipeline. A chain might retrieve relevant documents, inject them into a prompt, call the LLM, and parse the output. **Agents**: LLM-driven decision loops that choose which tools to use and in what order to accomplish a goal. LangChain popularized the ReAct (Reasoning + Acting) agent pattern. **Memory**: Mechanisms for persisting context across multiple LLM calls, from simple conversation buffers to vector-store-based long-term memory. **Tool integrations**: A large ecosystem of pre-built connectors to external APIs, databases, and services. As agent use cases became more sophisticated, the LangChain team built LangGraph as a separate library for complex, stateful, multi-agent workflows. LangGraph provides more explicit control over agent execution flow using a graph-based model, addressing limitations of LangChain's sequential chain abstraction for production agentic systems. LangChain remains widely used for prototyping and simpler LLM applications, while LangGraph is preferred for production-grade agent systems that require fine-grained control, human-in-the-loop workflows, and persistent state.
Comment GAIA utilise LangChain
GAIA's backend is built on LangGraph rather than LangChain's chain-based abstraction, giving it fine-grained control over the multi-agent execution graph that orchestrates tasks across 50+ integrations. LangGraph's stateful, graph-based approach is better suited to GAIA's complex, long-running agent workflows than LangChain's simpler sequential chains. The LangChain ecosystem's tool integrations and community patterns informed GAIA's architecture.
Concepts liés
LangGraph
LangGraph est un framework permettant de créer des applications IA multi-agents avec état, prenant en charge des flux de travail complexes incluant des cycles, des embranchements, une logique conditionnelle et une gestion persistante des états.
Boucle d'agent
Une boucle d'agent est le cycle d'exécution itératif d'un agent IA, au cours duquel il raisonne sur l'état actuel, sélectionne et exécute une action (souvent l'appel d'un outil), observe le résultat, et répète ce processus jusqu'à ce que la tâche soit terminée ou qu'une condition d'arrêt soit atteinte.
Large Language Model (LLM)
Un Large Language Model (LLM) est un modèle d'apprentissage profond entraîné sur d'immenses ensembles de textes, capable de comprendre, générer et raisonner sur le langage humain dans une grande variété de tâches.
Appel de fonction
L’appel de fonction est une fonctionnalité des modèles d’IA qui leur permet de générer des appels structurés et lisibles par machine vers des fonctions prédéfinies, permettant aux systèmes d’IA d’appeler de façon fiable des API et outils externes avec les bons arguments.
Orchestration IA
L'orchestration IA est la coordination de plusieurs agents, modèles et outils d'intelligence artificielle pour collaborer à la réalisation de tâches complexes et multi-étapes, qu’aucun composant unique ne pourrait gérer seul.


