Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

LangChain 7 min read Opinion easyNovice

How to build a knowledge factory for AI agents

A "knowledge factory" is a system for collecting, curating and maintaining the tacit company knowledge agents need: skills (procedures), domain knowledge (definitions, policies, facts) and data access guidance (where data lives and how to query it). Working agents get a tool to flag missing or wrong knowledge. A background curator agent periodically reads those flags, agent traces and raw sources like Notion and Slack, then updates the knowledge store, whose storage format matters less than the loop. A revenue-report example shows a renamed BigQuery column and a finance lead's formatting feedback being folded back into skills overnight, and the recommendation is to start with one recurring workflow and close the loop.

Assumes: LLM agents and tool callingagent skills

Related posts

  • Institutional knowledge doesn't scale: Building an agentic data analyst

    incident.io mediumAdept

    incident.io built an internal "data brain" agent that answers business questions against BigQuery by encoding institutional analyst knowledge rather than relying on raw text-to-SQL. A query skill routes the agent through per-domain themes, vetted SQL examples and schema subsets hydrated at compile time by a Go CLI from the semantic layer, dbt manifest and BigQuery metadata. A guarded data_query tool dry-runs SQL, enforces table allow-lists and scan limits, and logs every call with the guidance consulted. Examples are bootstrapped from certified dashboard SQL, and a theme-audit routine catches guidance rot such as stale examples, missing coverage and trigger-phrase collisions. Over half the company uses it weekly, with near 60% week-on-week retention.

  • An Organizational Second Brain: Building an AI That Learns From Experts

    Meta Engineering mediumAdept

    Meta built a domain-expert AI agent for a compliance domain that separates declarative knowledge files (positions, taxonomies, routing indexes, gateway tests with YAML dependency graphs) from imperative composable "recipes" that encode expert reasoning workflows. Dense, frequently used knowledge lives in a curated wiki while sparse reference material is served via RAG. Restructuring into recipe-driven stages with progressive disclosure cut tokens per turn by about 80%. A self-improvement loop diagnoses expert corrections as recipe flaws, knowledge gaps or genuine ambiguity, compiles them into minimal edits checked by an adversarial reviewer agent and a deterministic linter, and validates them with replay and regression tests, improving the agent without retraining the model while keeping humans in control through checkpoints and escalations.

  • How our GTM Agent builds consistent, high-quality sales artifacts

    LangChain mediumAdept

    LangChain's internal GTM Agent generates sales artifacts such as account plans, proof-of-value documents, proposal decks and onboarding plans, producing over 100 per week across 12 weeks. Most of its quality comes from business context rather than prompt tuning: sales-stage gates, leadership-owned templates, Salesforce and call data, and a brand kit baked into a sandbox image. The pipeline fills templates with python-pptx, renders them through LibreOffice to rasterized pages for visual self-review, then files native Google docs and hands them off in Slack. A stop rule (ship once one review finds no real defect) cut a one-pager run from 18 to 7 minutes, and deals with a sent artifact advanced 47% of the time versus 16% for matched deals.

  • Why We Rebuilt LangChain’s Chatbot and What We Learned

    LangChain mediumAdept

    LangChain replaced chat.langchain.com's chunk-and-embed vector retrieval with tool-calling agents that search structured sources directly: full doc pages via Mintlify's API, a scan-titles-then-read pattern over the Pylon knowledge base, and ripgrep/tree/file-read tools over the codebase. A fast createAgent with Claude Haiku 4.5 handles most docs questions in 3-6 tool calls and under 15 seconds. A Deep Agent with separate docs, knowledge-base and code subagents handles implementation questions in 1-3 minutes, with each subagent filtering its results so the orchestrator's context stays small. The rebuild removed constant reindexing, kept document structure intact and produced verifiable citations down to line numbers, with LangSmith traces used to tune prompts and cut wasted tool calls.

  • How to set up ClickHouse for agentic analytics

    ClickHouse mediumAdept

    Preparing a ClickHouse Cloud warehouse for AI agents comes down to classic warehousing discipline: isolate workloads on separate compute services over shared storage, expose only curated marts, and enforce guardrails through roles and resource limits. The suggested setup uses four services (read/write ingestion, transformation and development, plus a read-only LLM service) and raw/staging/marts databases. An LLM role restricted to SELECT on marts is capped with settings such as readonly, max_execution_time, max_memory_usage, max_rows_to_read and max_threads. Incremental materialized views handle staging and refreshable materialized views produce consistent marts before the agent connects via MCP using read-only credentials.

The quest for software engineering knowledge.

Look:
Layout: