LangSmith Integration for Automated Feedback and Improved Iteration in SDLC
factory · Tech · 2024 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.6 (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: Autonomous software development lifecycle automation
Factory needed observability and feedback infrastructure for autonomous LLM systems operating across secure customer SDLC environments. Traditional pipeline tracing, context debugging, and manual prompt iteration were too cumbersome for complex Droid workflows and enterprise privacy requirements.
Constraints:
- Factory's Droids automate different stages of the software development lifecycle
- customer environments have tight data controls and enterprise-level security requirements
- custom LLM tooling made many observability tools hard to set up
- engineers needed to track data flow across agentic pipeline stages
- feedback needed to attach to specific LLM calls and workflow stages
- manual prompt optimization was time-consuming and often inaccurate
- the system needed to identify hallucinations and context-awareness issues from real customer input
Architecture
Factory deployed self-hosted LangSmith as the observability and feedback loop layer for its autonomous SDLC Droids. LangSmith custom tracing captures LLM workflow events and exports them to AWS CloudWatch, giving engineers a single source of truth for data flow and agentic stage position. User feedback on Droid outputs is linked directly to LLM calls through LangSmith's Feedback API, appended to workflow stages, exported to datasets, and analyzed for patterns. Factory then uses custom LangChain tooling and LLM-assisted analysis to identify why prompts caused bad examples, re-prompt or optimize, and improve accuracy with less manual overhead.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR Factory_Droids["Factory Droids"] --> Droid_workflow_stages["Droid workflow stages"] Droid_workflow_stages --> Self_hosted_LangSmith["Self-hosted LangSmith"] Droid_workflow_stages --> AWS_CloudWatch_logs["AWS CloudWatch logs"] Self_hosted_LangSmith --> AWS_CloudWatch_logs Factory_Droids --> User_feedback_surface["User feedback surface"] User_feedback_surface --> Feedback_API["Feedback API"] Feedback_API --> Self_hosted_LangSmith Feedback_API --> Feedback_datasets["Feedback datasets"] Feedback_datasets --> LLM_root_cause_analyzer["LLM root-cause analyzer"] Feedback_datasets --> Prompt_optimization_loop["Prompt optimization loop"] LLM_root_cause_analyzer --> Prompt_optimization_loop Prompt_optimization_loop --> Factory_Droids
Components
| Component | Role | Interacts with |
|---|---|---|
Factory Droids |
Autonomous agents that automate stages of the SDLC. | Droid workflow stages, User feedback surface |
Droid workflow stages |
Agentic LLM pipeline stages that produce outputs and require tracing. | Factory Droids, Self-hosted LangSmith, AWS CloudWatch logs |
Self-hosted LangSmith |
Enterprise-deployed observability and feedback system for secure customer environments. | Droid workflow stages, AWS CloudWatch logs, Feedback API, Feedback datasets |
AWS CloudWatch logs |
Log backend linked with LangSmith events and steps for data-flow debugging. | Self-hosted LangSmith, Droid workflow stages |
User feedback surface |
Positive/negative feedback collection point on Droid outputs such as code comments. | Factory Droids, Feedback API |
Feedback API |
LangSmith interface that appends feedback to LLM calls and workflow stages. | User feedback surface, Self-hosted LangSmith, Feedback datasets |
Feedback datasets |
Exported examples and labels used to analyze patterns and drive prompt optimization. | Feedback API, Prompt optimization loop |
Prompt optimization loop |
Factory engineers and custom LangChain tooling use feedback examples to revise prompts and re-prompt models. | Feedback datasets, Factory Droids |
LLM root-cause analyzer |
Model-assisted analysis that compares good and bad feedback examples and explains prompt failure hypotheses. | Feedback datasets, Prompt optimization loop |
Data flow
A Droid performs SDLC work and posts an output such as a code comment. Users provide positive or negative feedback. LangSmith attaches that feedback to the relevant LLM call and workflow stage, while traces are linked with AWS CloudWatch logs to show the agentic stage and data movement. Feedback is exported into datasets, analyzed for patterns, and used by Factory engineers and custom LangChain tooling to optimize prompts, re-prompt the LLM, and reduce errors in later Droid runs.
3 supporting quotes
Why this architecture
Factory chose self-hosted LangSmith because customer environments required tight data controls, custom LLM tooling made generic observability difficult, and autonomous Droid workflows needed stage-level traces plus feedback attached to the exact LLM call. Exporting traces to CloudWatch preserved the existing log workflow, while LangSmith's Feedback API created a structured loop from user feedback to datasets to prompt optimization.
3 supporting quotes
Models used: autonomous Droids · LLMs · LangSmith · LangChain tooling · AWS CloudWatch
Scale
- Factory reports a 2x improvement in iteration speed.“Factory was able to 2x their iteration speed.”article, stated
- Factory reports around 20% reduction in open-to-merge time for average customers.“Factory also reports their average customer experienced a ~20% reduction in open-to-merge time”article, stated
- Factory reports a 3x reduction in code churn on Droid-impacted code during the first 90 days.“a 3x reduction in code churn on code impacted by Droids in the first 90 days.”article, stated
- Factory reports over 550,000 hours of development time saved across organizations.“with over 550,000 hours of development time saved across various organizations.”article, stated
- Factory announced $15 million in Series A funding.“With the recent public launch of their AI Droids and $15 million in Series A funding led by Sequoia Capital”article, stated
Alternatives considered (roads not taken)
Traditional data-flow tracking across LLM pipelines
Rejected because: The article says these methods were cumbersome for Factory's context-awareness debugging.
Most off-the-shelf LLM observability tools
Rejected because: Factory's custom LLM tooling made many tools challenging to set up, while LangSmith offered custom tracing through a first-party API.
Manual prompt optimization
Rejected because: Manual optimization was slower and less accurate than collecting/analyzing feedback through LangSmith's Feedback API.
Build a proprietary logging system for hallucination debugging
Rejected because: LangSmith linked feedback to each LLM call and helped identify hallucinations without proprietary logging.
Patterns
observability-tracing (operations)
Factory uses self-hosted LangSmith and CloudWatch integration to track data flow and agentic stage position across Droid pipelines.
eval-driven-development (evaluation)
Feedback examples are exported to datasets, benchmarked, and used to optimize prompts based on real outcomes.
human-in-the-loop-gate (feedback)
Human users provide positive/negative feedback on Droid outputs, and Factory focuses feedback collection on the most critical stages.
multi-agent-orchestration (architecture)
Factory's fleet of Droids automates different stages of the SDLC, with Code Droid as one specialized autonomous worker.
tool-use-orchestration (architecture)
Droids operate in software-development workflows where comments, code changes, tracing, feedback APIs, datasets, and prompt tools are connected into an automation loop.
Tradeoffs
Self-host LangSmith.
Chose self-hosted observability in customer-controlled environments over LLM infrastructure that cannot operate under tight data controls.
Rationale: Self-hosting gives Factory observability while preserving customer security and privacy requirements.
Link LangSmith traces with CloudWatch.
Chose LangSmith events plus AWS CloudWatch logs over separate trace and log sources.
Rationale: Linking the two creates a single source of truth for data flow across LLM stages.
Automate feedback collection and processing.
Chose LangSmith Feedback API and dataset exports over manual data collection and human-driven prompt iteration.
Rationale: Automation cut mental overhead and improved iteration speed while still using real customer feedback.
Use LLM-assisted prompt root-cause analysis.
Chose model analyzes good/bad feedback examples for prompt failure hypotheses over engineers manually inspecting every bad example.
Rationale: The LLM helps explain why a prompt may cause bad examples and accelerates prompt refinement.
Gotchas (what bit them)
Generic observability tools may not fit custom autonomous LLM systems.
Root cause: Factory's custom LLM tooling and secure customer environments made many LLM observability tools hard to deploy.
Resolution: Use self-hosted LangSmith with custom tracing through a first-party API.
Context-awareness bugs are hard to diagnose without tying feedback to the exact LLM call.
Root cause: Generated responses can hallucinate or miss context, but the failure source is buried inside the pipeline.
Resolution: Link feedback directly to each LLM call so problems are visible next to the trace.
Manual prompt iteration creates slow, high-overhead feedback loops.
Root cause: Teams must collect examples, identify patterns, and reason about prompt failures by hand.
Resolution: Automate feedback collection, export it to datasets, and use model-assisted prompt failure analysis.
Feedback loops can create infrastructure overhead if every stage is treated equally.
Root cause: Not all stages need the same depth of human feedback and analysis.
Resolution: Focus feedback collection on final or critical stages of Droid performance.
Evaluation
Factory evaluates and improves Droid behavior by collecting positive/negative feedback on outputs, attaching feedback to specific LLM calls and workflow stages, exporting feedback into datasets, benchmarking examples, and analyzing patterns to optimize prompts.
Metrics: 2x iteration speed · ~20% reduction in open-to-merge time · 3x reduction in code churn · over 550,000 development hours saved · feedback labels on Droid comments · hallucination/context-awareness issue identification
Outcomes
- Factory reports 2x faster iteration versus manual data collection and prompt iteration.
- Factory reports average customer open-to-merge time reduced by about 20%.
- Factory reports 3x reduction in code churn on Droid-impacted code in the first 90 days.
- Factory reports over 550,000 development hours saved across organizations.
- Feedback attached to LLM calls helped identify issues such as hallucinations without building a proprietary logging system.
The article is a customer story and includes promotional claims, but it provides concrete reported outcomes: 2x iteration speed, ~20% open-to-merge reduction, 3x code churn reduction over the first 90 days, over 550,000 development hours saved, public Droid launch, and $15 million Series A funding.