Building Enterprise-Scale AI Applications with LangChain and LangSmith

rakuten · E-commerce · 2024 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Enterprise LLM application platform for business clients and employees

Rakuten needed to build and scale LLM-powered products across a large, multi-business organization: customer-facing business-client tools for market analysis, support, and documentation Q&A, plus internal employee chatbot creation over company documentation. The challenge was to move quickly while preserving prompt reuse, evaluation discipline, vendor flexibility, cost/performance control, and enterprise data-handling guarantees.

Constraints:

Architecture

Rakuten built a suite of LLM applications on LangChain and LangSmith. Rakuten AI for Business includes AI Analyst for market intelligence, AI Agent for self-serve marketplace support, and AI Librarian for document summarization and real-time Q&A. Internally, three engineers used LangChain OpenGPTs to stand up an employee chatbot platform over internal documentation in one week, with plans to roll it to 32k employees. LangChain provides chain/agent architectures and vendor abstraction; LangSmith provides observability, prompt sharing through Hub, custom Testing and Eval, and enterprise environment separation.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  rakuten-business-clients[Rakuten business clients] --> rakuten-ai-for-business[Rakuten AI for Business]
  rakuten-ai-for-business --> rakuten-ai-analyst[Rakuten AI Analyst]
  rakuten-ai-for-business --> rakuten-ai-agent[Rakuten AI Agent]
  rakuten-ai-for-business --> rakuten-ai-librarian[Rakuten AI Librarian]
  rakuten-ai-for-business --> langchain-framework[LangChain framework]
  rakuten-ai-for-business --> langsmith-platform[LangSmith platform]
  rakutenians[Rakutenians] --> opengpts-employee-platform[OpenGPTs employee platform]
  opengpts-employee-platform --> langchain-framework
  opengpts-employee-platform --> internal-documentation[Internal documentation]
  opengpts-employee-platform --> langsmith-platform
  langchain-framework --> rakuten-ai-for-business
  langchain-framework --> opengpts-employee-platform
  langchain-framework --> model-provider-options[Model/provider options]
  model-provider-options --> langchain-framework
  langsmith-platform --> langsmith-hub[LangSmith Hub]
  langsmith-platform --> langsmith-testing-and-eval[LangSmith Testing and Eval]
  langsmith-platform --> environment-separation[Environment separation]
  langsmith-hub --> langsmith-platform
  langsmith-testing-and-eval --> langsmith-platform
  environment-separation --> langsmith-platform
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Rakuten business clients Merchants and other marketplace clients using AI tools for analysis, support, and customer-facing documentation questions. Rakuten AI for Business
Rakuten AI for Business Comprehensive AI platform for client-facing business operations such as market analysis and customer support. Rakuten AI Analyst, Rakuten AI Agent, Rakuten AI Librarian, LangChain framework, LangSmith platform
Rakuten AI Analyst Research assistant that provides market intelligence backed by data and charts. Rakuten AI for Business
Rakuten AI Agent Self-serve support tool for questions about listing and transacting on Rakuten's marketplace. Rakuten AI for Business
Rakuten AI Librarian Document summarization and Q&A system for client documentation and end-customer/prospect questions. Rakuten AI for Business
Rakutenians Internal employee users intended to create or use documentation chatbots for knowledge management. OpenGPTs employee platform
OpenGPTs employee platform Internal chatbot platform over documentation, built with LangChain OpenGPTs for employee enablement. LangChain framework, Internal documentation, LangSmith platform
Internal documentation Company documentation used as grounding content for employee-built chatbots. OpenGPTs employee platform
LangChain framework Framework providing chain and agent architectures, interaction patterns, vendor abstraction, and customization hooks. Rakuten AI for Business, OpenGPTs employee platform, Model/provider options
Model/provider options Swappable model/provider choices used to manage cost/performance tradeoffs and reduce vendor lock-in. LangChain framework
LangSmith platform Observability, prompt collaboration, testing, evaluation, and enterprise assurance layer. LangSmith Hub, LangSmith Testing and Eval, Environment separation
LangSmith Hub Prompt sharing mechanism for distributing successful prompts and promoting cross-team collaboration. LangSmith platform
LangSmith Testing and Eval Experimentation layer for comparing models, cognitive architectures, and custom evaluation metrics. LangSmith platform
Environment separation Enterprise control that keeps data in Rakuten's environment and separates development workflows from production ones. LangSmith platform

Data flow

Business clients interact with Rakuten AI Analyst, Agent, or Librarian depending on whether they need market intelligence, self-serve support, or documentation Q&A. These applications use LangChain interaction patterns and agent/chain architectures, while LangSmith gives teams visibility into behavior and why outputs happen. Prompt approaches can be shared through LangSmith Hub, and candidate models or cognitive architectures can be tested with custom evaluation metrics. Internal teams use OpenGPTs to create chatbots over internal documentation, with data kept inside Rakuten's environment and development access separated from production.

4 supporting quotes
“Rakuten AI for Business is a comprehensive AI platform that supports business clients in essential business operations, including market analysis and customer support.”article, stated
“teams could build their own chatbots over internal documentation to help with knowledge management and employee enablement.”article, stated
“LangChain was helpful in providing common, successful interaction patterns for building with LLMs, and many of the off-the-shelf chain and agent architectures allowed Rakuten to iterate quickly. As the team got serious about scaling up their LangChain usage”article, stated
“they looked to LangSmith to harden their work and provide visibility into what’s happening and why. General Manager of AI for Business at Rakuten, Yusuke Kaji says, “LangSmith allows us to get things done scientifically. At a large company, usually”article, stated

Why this architecture

Rakuten chose LangChain and LangSmith to move quickly across several LLM application types while retaining enterprise controls. LangChain supplied reusable interaction patterns, chains, agents, OpenGPTs, and vendor abstraction; LangSmith supplied observability, prompt reuse, custom evals, and environment-level assurances. That combination let a large multi-business company avoid isolated team experimentation while keeping the platform flexible enough for 32k-employee scale.

4 supporting quotes
“LangChain and LangSmith are critical technologies that the team leverages to build these solutions with greater speed and reliability.”article, stated
“many of the off-the-shelf chain and agent architectures allowed Rakuten to iterate quickly. As the team got serious about scaling up their LangChain usage and allowing more users to interact with the applications, they looked to LangSmith to harden their”article, stated
“OpenGPTs because it gave them maximal flexibility and control on designing the cognitive architecture and user experience.”article, stated
“Data stays within Rakuten’s environment, and with LangSmith, Rakuten can separate access for development workflows from production ones”article, stated

Models used: LLMs · LangChain · LangSmith · LangChain OpenGPTs · LangSmith Hub · LangSmith Testing and Eval

Scale

Alternatives considered (roads not taken)

Limit the employee chatbot platform to a subset of employees.

Rejected because: Rakuten wanted broad employee access, which made model/provider flexibility and cost/performance control important at 32k-employee scale.

“they didn’t want to gate the experience to only a subset of employees and intend to roll the product to 32k employees”article, stated
“at this scale, the Data Science & ML team must keep a variety of options open and be able to control the cost / performance tradeoffs.”article, stated

Let each team independently discover good prompts and architectures.

Rejected because: At large-company scale, independent teams produce uneven approaches, so Rakuten used LangSmith Hub to distribute best prompts and promote collaboration.

“At a large company, usually multiple teams develop their ideas independently. Some teams find good approaches, while others don’t.”article, stated
“By using LangSmith Hub, we could distribute the best prompts and promote collaboration across teams. By using LangSmith Testing and Eval with our custom evaluation metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.)”article, stated

Choose a fixed model/provider architecture.

Rejected because: Rakuten needed vendor-lock-in abstraction and the ability to control cost/performance tradeoffs as usage scaled.

“LangChain’s framework makes the ability to customize and abstract away vendor lock-in possible. ### Why LangChain and LangSmith Rakuten was an early adopter of LangChain, and they first started building with the framework in January of 2023. LangChain was”article, stated
“and at this scale, the Data Science & ML team must keep a variety of options open and be able to control the cost / performance tradeoffs. LangChain’s framework makes the ability to customize and abstract away vendor lock-in possible. ### Why LangChain and LangSmith Rakuten was an early adopter of”article, stated

Rely on intuition when choosing models, prompts, and cognitive architectures.

Rejected because: Rakuten wanted experiments with custom evaluation metrics and measurable comparisons across approaches.

“By using LangSmith Testing and Eval with our custom evaluation metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.)”article, stated
“metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.) and measure the results. By combining the benefits of LangSmith and standing on the shoulders of a gigantic open-source community, we’re able to”article, stated

Patterns

prompt-versioning (collaboration)

Rakuten used LangSmith Hub to distribute successful prompts across teams and reduce isolated prompt experimentation.

“By using LangSmith Hub, we could distribute the best prompts and promote collaboration across teams.”article, stated

eval-driven-development (quality)

Rakuten used LangSmith Testing and Eval with custom metrics to compare models, cognitive architectures, and other approaches scientifically.

“visibility into what’s happening and why. General Manager of AI for Business at Rakuten, Yusuke Kaji says, “LangSmith allows us to get things done scientifically. At a large company, usually multiple teams develop their ideas independently. Some teams find good approaches, while others”article, stated
“By using LangSmith Testing and Eval with our custom evaluation metrics, we can run experiments on multiple approaches”article, stated

observability-tracing (operations)

LangSmith was adopted as Rakuten scaled beyond prototypes to harden applications and make behavior visible.

“they looked to LangSmith to harden their work and provide visibility into what’s happening and why.”article, stated

rag-retrieval (knowledge access)

AI Librarian and the OpenGPTs employee platform use documentation as the basis for summarization, Q&A, and knowledge management.

“Rakuten AI Librarian which summarizes all of the client’s documentation to answer questions from the client’s end customers and prospects in real time.”article, stated
“chatbots over internal documentation to help with knowledge management and employee enablement.”article, stated

model-routing (platform flexibility)

Rakuten valued LangChain abstraction so the team could keep provider options open and manage cost/performance tradeoffs for a 32k-employee rollout.

“keep a variety of options open and be able to control the cost / performance tradeoffs.”article, stated
“LangChain’s framework makes the ability to customize and abstract away vendor lock-in possible.”article, stated

privacy-preserving-processing (enterprise security)

LangSmith was used with enterprise assurances that data stays in Rakuten's environment and dev/prod access can be separated.

“Data stays within Rakuten’s environment, and with LangSmith, Rakuten can separate access for development workflows from production ones”article, stated

tool-use-orchestration (application architecture)

Rakuten used off-the-shelf chain and agent architectures from LangChain to build multiple client and employee LLM applications quickly.

“LangChain was helpful in providing common, successful interaction patterns for building with LLMs, and many of the off-the-shelf chain and agent architectures allowed Rakuten to iterate quickly.”article, stated
“many of the off-the-shelf chain and agent architectures allowed Rakuten to iterate quickly.”article, stated

Tradeoffs

Use LangChain OpenGPTs for the employee platform.

Chose OpenGPTs with flexible cognitive architecture and user-experience control. over A narrower fixed chatbot implementation..

Rationale: The team needed rapid initial delivery plus enough flexibility to support a 32k-employee rollout and changing cost/performance decisions.

“It only took three engineers one week to get the initial platform up and running.”article, stated
“maximal flexibility and control on designing the cognitive architecture and user experience.”article, stated

Adopt LangSmith as the hardening and visibility layer.

Chose LangSmith for visibility, Hub, Testing and Eval, and enterprise assurances. over Continuing with framework-only development and ad hoc observability..

Rationale: Scaling to more users required visibility into behavior, prompt sharing, measurable experiments, and user-data controls.

“they looked to LangSmith to harden their work and provide visibility into what’s happening and why.”article, stated
“LangSmith also provides Rakuten with the enterprise assurances that they need.”article, stated

Roll AI access broadly rather than gate it to a subset.

Chose A planned rollout to 32k employees. over Restricting the employee chatbot experience to a smaller group..

Rationale: Rakuten wanted broad employee enablement, accepting the added need for cost/performance optionality.

“they didn’t want to gate the experience to only a subset of employees and intend to roll the product to 32k employees”article, stated
“at this scale, the Data Science & ML team must keep a variety of options open”article, stated

Use custom evaluation metrics.

Chose LangSmith Testing and Eval with Rakuten-specific metrics. over Generic measurements or intuition-only comparisons..

Rationale: The organization needed to test multiple models and cognitive architectures against its own business requirements.

“with our custom evaluation metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.)”article, stated
“identify the right approaches for using LLMs in an enterprise-setting faster.”article, stated

Gotchas (what bit them)

Independent teams can rediscover uneven prompt approaches.

Root cause: Large companies often have many teams developing ideas separately, so good approaches do not automatically spread.

Resolution: Rakuten used LangSmith Hub to distribute the best prompts and promote collaboration.

“At a large company, usually multiple teams develop their ideas independently. Some teams find good approaches, while others don’t.”article, stated
“By using LangSmith Hub, we could distribute the best prompts and promote collaboration across teams.”article, stated

Scaling LLM apps without observability leaves teams unable to explain behavior.

Root cause: As more users interact with applications, teams need to know what is happening and why.

Resolution: Rakuten adopted LangSmith to harden work and provide visibility.

“As the team got serious about scaling up their LangChain usage and allowing more users to interact with the applications”article, stated
“and allowing more users to interact with the applications, they looked to LangSmith to harden their work and provide visibility into what’s happening and why. General Manager of AI for Business at Rakuten, Yusuke Kaji says, “LangSmith allows us to get things done scientifically. At a”article, stated

Broad employee rollout makes model/provider lock-in risky.

Root cause: At 32k-employee scale, cost/performance tradeoffs become material and the team needs optionality.

Resolution: Rakuten used LangChain's abstraction layer to customize cognitive architecture and abstract away vendor lock-in.

“intend to roll the product to 32k employees, and at this scale, the Data Science & ML team must keep a variety of options open”article, stated
“LangChain’s framework makes the ability to customize and abstract away vendor lock-in possible.”article, stated

Enterprise user data requires stricter environment controls than a generic SaaS workflow.

Root cause: Rakuten handles user data and needs development and production access boundaries.

Resolution: LangSmith provided data residency within Rakuten's environment and separate access for development and production workflows.

“maintaining the high bar that Rakuten requires when dealing with user data.”article, stated
“Rakuten can separate access for development workflows from production ones”article, stated

Evaluation

Rakuten used LangSmith Testing and Eval with custom evaluation metrics to run experiments on models, cognitive architectures, and related LLM application approaches. LangSmith Hub supported prompt comparison and reuse, while LangSmith visibility helped teams understand application behavior as usage scaled.

Metrics: Custom evaluation metrics for models and cognitive architectures. · Experiments across multiple approaches. · Prompt reuse and collaboration through LangSmith Hub. · Planned productivity improvement target of 20%.

4 supporting quotes
“By using LangSmith Testing and Eval with our custom evaluation metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.)”article, stated
“custom evaluation metrics, we can run experiments on multiple approaches (models, cognitive architecture, etc.) and measure the results. By combining the benefits of LangSmith and standing on the shoulders of a gigantic open-source community, we’re able to identify the right approaches for using”article, stated
“By using LangSmith Hub, we could distribute the best prompts and promote collaboration across teams.”article, stated
“Business** across its customer base, focusing particularly on merchants, hotels, retail stores, and local economies, with the aim to improve productivity by 20%. The team will continue to design and build technical architectures for large-scale AI applications across its suite of 70 businesses, and”article, stated

Outcomes

Rakuten's stated scale is organizationally large: 70+ businesses, 32k employees, and a planned customer-base distribution. The source is a LangChain customer story, so results should be read as vendor-reported and partially aspirational.

4 supporting quotes
“supports business clients in essential business operations, including market analysis and customer support.”article, stated
“It only took three engineers one week to get the initial platform up and running.”article, stated
“Additionally, they didn’t want to gate the experience to only a subset of employees and intend to roll the product to 32k employees, and at this scale, the Data Science & ML team must keep a variety of options open and be able to control the cost / performance tradeoffs.”article, stated
“Business** across its customer base, focusing particularly on merchants, hotels, retail stores, and local economies, with the aim to improve productivity by 20%. The team will continue to design and build technical architectures for large-scale AI applications across its suite of 70 businesses, and”article, stated