melch
All syndicates

Hierarchical Decomposition

A coordinator agent breaks compound objectives into discrete components using gemini-3.8-flash. Worker subagents complete each assigned phase, and the coordinator merges the resulting segments into an unified final deliverable.

Hovering over a star highlights the corresponding lines that declare that agent or tool in the file below.
config/agents/examples/hierarchical.yaml
syndicate_name: "Hierarchical Task Decomposition"

orchestrator:
  name: "ProjectManager"
  model: "gemini-3.8-flash"
  instruction: |
    You are a Project Manager. When given a complex user goal, you practice hierarchical task decomposition.
    Instead of answering directly, break the problem into smaller, logical sub-tasks.
    1. Delegate data-gathering or analytical tasks to the ResearcherAgent.
    2. Delegate formatting, synthesis, or creative writing tasks to the WriterAgent.
    3. Once both subagents have returned their work, combine their outputs into a final cohesive response for the user.
    Do not skip steps or do the work yourself if a subagent is better suited.

subagents:
  - name: "ResearcherAgent"
    model: "gemini-3.8-flash"
    tools: ["google_search"]
    description: "Responsible for gathering facts, performing calculations, and providing raw analytical data."
    instruction: |
      You are a meticulous Researcher. Use your tools to find factual information, analyze data, and return detailed bullet points to the Project Manager.

  - name: "WriterAgent"
    model: "gemini-3.8-flash"
    description: "Responsible for taking raw data and formatting it into a beautiful, engaging, and structured narrative."
    instruction: |
      You are an expert Copywriter. Take the raw research provided by the Project Manager and transform it into a polished, well-structured, and engaging response.

Recorded trace

Captured directly from the engine with in-memory sessions and telemetry turned off. The diagram above replays the execution path across each participating star.

ProjectManager coordinated the planning process in 47.5 seconds on gemini-3.8-flash. It delegated research tasks to ResearcherAgent, then directed WriterAgent to assemble the blueprint.

2026-09-24 melchizedek-agents@0.12.0 gemini-3.8-flash 47.5 s sha256 2602ee859b31

  1. you

    Plan a two-week rollout of an internal fact-checking bot for a 40-person company, and find one published example of a company that did something similar.

  2. α ProjectManager to β ResearcherAgent

    Find a published case study or real-world example of a company implementing an internal fact-checking, verification, or internal Q&A/AI knowledge verification bot. Also outline best-practice milestones and logistics for a 2-week rollout of an internal bot in a 40-person company.

  3. β ResearcherAgent back to α ProjectManager
    ### 1. Published Real-World Case Study: AI @ Morgan Stanley Assistant * **Organization:** Morgan Stanley Wealth Management (~16,000 advisors and support personnel). * **Technology Partner:** OpenAI (GPT-4 via dedicated enterprise/Azure cloud infrastructure). * **Core Problem:** * Advisors managed an internal institutional repository of over **100,000 research reports, compliance manuals, and investment strategy d…

    ### 1. Published Real-World Case Study: AI @ Morgan Stanley Assistant * **Organization:** Morgan Stanley Wealth Management (~16,000 advisors and support personnel). * **Technology Partner:** OpenAI (GPT-4 via dedicated enterprise/Azure cloud infrastructure). * **Core Problem:** * Advisors managed an internal institutional repository of over **100,000 research reports, compliance manuals, and investment strategy documents**. * Internal audits revealed that advisors could reliably locate and access only **~20%** of available institutional research during rapid-turnaround client inquiries. * Strict regulatory oversight (FINRA, SEC) meant hallucinations or unverified financial advice carried severe legal liability. * **Verification & Grounding Architecture:** * **Strict Retrieval-Augmented Generation (RAG):** The model was prohibited from drawing on generic web facts for financial …

  4. α ProjectManager to γ WriterAgent

    Please take this research and draft a polished, executive-ready rollout plan and case study for a 40-person company deploying an internal fact-checking bot over 2 weeks. Structure requirements: 1. Executive Summary & Core Principles 2. Published Case Study Highlight: Morgan Stanley AI Assistant (draw direct parallels to why their grounding and verification mechanics matter for a small company) 3. 2-Week Day-by-Day Implementation Roadmap (Week 1: Knowledge Curation & Pilot; Week 2: Refinement, GA Launch & Governance) 4. Success Metrics & Maintenance Framework Raw data to include: - Morgan Stanley: 100k+ documents, strict RAG, negative guardrails, mandatory citation attribution, jump from 20% to 80% retrieval, 98% adoption. - 40-person company allocation: 0.5 FTE Tech Lead, 0.25 FTE Ops Lead. - Golden dataset of 30-50 questions, eval scoring, feedback UI (👍/👎), 15-minute all-hands demo, Week 2 KPIs.

  5. γ WriterAgent back to α ProjectManager
    # Operational Blueprint: Internal Fact-Checking & Knowledge Verification Engine **Two-Week Enterprise Rollout Plan & Comparative Case Study** --- ## 1. Executive Summary & Core Principles Modern organizations do not suffer from a lack of information; they suffer from an inability to verify it quickly. For a 40-person company, cross-departmental friction, duplicate inquiries, and institutional knowledge loss can qu…

    # Operational Blueprint: Internal Fact-Checking & Knowledge Verification Engine **Two-Week Enterprise Rollout Plan & Comparative Case Study** --- ## 1. Executive Summary & Core Principles Modern organizations do not suffer from a lack of information; they suffer from an inability to verify it quickly. For a 40-person company, cross-departmental friction, duplicate inquiries, and institutional knowledge loss can quietly consume hundreds of productive hours each month. This document outlines a high-velocity, **two-week implementation framework** to deploy an internal, fact-checking AI assistant. Operating with lean resource allocation—**0.5 FTE Tech Lead** and **0.25 FTE Operations Lead**—this deployment equips the organization with a verifiable, single source of truth across company wikis, policies, product specs, and operational workflows. ``` ┌───────────────────…

  6. α ProjectManager
    Here is the complete, executive-ready rollout plan and published case study for deploying an internal fact-checking bot in a 40-person company. --- # Operational Blueprint: Internal Fact-Checking & Knowledge Verification Engine **Two-Week Enterprise Rollout Plan & Comparative Case Study** --- ## 1. Executive Summary & Core Principles Modern organizations rarely suffer from a lack of information; they suffer from an inability to verify it quickly. For a 40-person company, cross-departmental friction, duplicate inquiries, and institutional knowledge loss can quietly consume hundreds of productive hours each month. This implementation framework outlines a high-velocity, **two-week sprint** to deploy an internal, fact-checking AI assistant. Operating with lean resource allocation—**0.5 FTE Technical Lead** and **0.25 FTE Operations Lead**—this deployment equips the organization with a verifiable single source of truth across company wikis, policies, product specs, and operational workflows. ``` ┌──────────────────────────────────────────────┐ │ Core Operating Principles │ └──────────────────────┬───────────────────────┘ │ …

    Here is the complete, executive-ready rollout plan and published case study for deploying an internal fact-checking bot in a 40-person company. --- # Operational Blueprint: Internal Fact-Checking & Knowledge Verification Engine **Two-Week Enterprise Rollout Plan & Comparative Case Study** --- ## 1. Executive Summary & Core Principles Modern organizations rarely suffer from a lack of information; they suffer from an inability to verify it quickly. For a 40-person company, cross-departmental friction, duplicate inquiries, and institutional knowledge loss can quietly consume hundreds of productive hours each month. This implementation framework outlines a high-velocity, **two-week sprint** to deploy an internal, fact-checking AI assistant. Operating with lean resource allocation—**0.5 FTE Technical Lead** and **0.25 FTE Operations Lead**—this deployment equips the organization with a verifiable single source of truth across company wikis, policies, product specs, and operational workflows. ``` ┌──────────────────────────────────────────────┐ │ Core Operating Principles │ └──────────────────────┬───────────────────────┘ │ ┌───────────────────────────────┼───────────────────────────────┐ ▼ ▼ ▼ [ 1. Zero Hallucination ] [ 2. Mandatory Citations ] [ 3. Frictionless Ingestion ] Strict RAG & negative Every answer must cite a No context-switching; bot guardrails; bot prefers verifiable, deep-linked lives natively inside "I don't know" to guesses. internal document. Slack/Teams with 👍/👎 UX. ``` ### Core Architecture Principles 1. **Grounding Over Generation (Strict RAG):** The model is mathematically restrained to answer *only* from ingested, authorized internal artifacts. It functions as an information retrieval engine, not a creative writer. 2. **Defensive Refusal (Negative Guardrails):** If an answer cannot be grounded in verified documentation with high confidence, the model defaults to: *"I cannot verify this based on current internal documentation."* 3. **Traceable Attribution:** Every output must include inline, deep-linked citations to internal documents. No citation means no answer. 4. **Lightweight Operational Footprint:** Designed to run without dedicated platform teams, leveraging targeted evaluation benchmarks and automated feedback loops. --- ## 2. Published Case Study: Morgan Stanley AI Assistant To design an enterprise-grade solution for a 40-person firm, we look directly at the industry benchmark for institutional knowledge verification: **Morgan Stanley’s Wealth Management AI Assistant** (developed in partnership with OpenAI). ``` ┌────────────────────────────────────────────────────────────────────────────────────────┐ │ CASE BENCHMARK: Morgan Stanley Wealth Management AI Assistant │ ├────────────────────────────────┬───────────────────────────────────────────────────────┤ │ Challenge │ 100,000+ complex research reports, investment notes, │ │ │ and policies; advisors spent hours searching manually.│ ├────────────────────────────────┼───────────────────────────────────────────────────────┤ │ Engineering Solution │ Strict Retrieval-Augmented Generation (RAG), negative │ │ │ guardrails, and mandatory citation attribution. │ ├────────────────────────────────┼───────────────────────────────────────────────────────┤ │ Impact & Results │ • Retrieval accuracy jumped from 20% to 80%+. │ │ │ • 98% sustained advisor adoption rate. │ └────────────────────────────────┴───────────────────────────────────────────────────────┘ ``` ### Why Scale Mechanics Matter for a 40-Person Firm It is a common misconception that strict AI governance is only necessary for Fortune 100 enterprises. In reality, grounding mechanics matter **more** in a high-growth, 40-person company: * **The Cost of Hallucination:** If Morgan Stanley’s assistant makes a mistake, a compliance officer flags it. If an internal bot at a 40-person company misquotes client pricing, product specs, or vacation carry-over policy, it directly derails operational execution and shatters internal trust immediately. * **The "Cold Start" Trust Curve:** Morgan Stanley drove an **increase from 20% to 80% retrieval precision** by enforcing strict negative guardrails and mandatory source citations. Employees only adopt an AI tool when they know it will never fabricate facts. When the system says *"I cannot find this in our handbook,"* trust increases; when it invents an answer, trust drops to zero. * **The Adoption Target:** Morgan Stanley achieved **98% adoption** not through coercive mandates, but because advisors realized the bot was faster and more reliable than manual searches. By adopting their exact verification mechanics—*strict RAG, negative fallbacks, and hyperlinked proof*—a 40-person firm can target comparable enterprise adoption within 14 days. --- ## 3. Two-Week Day-by-Day Implementation Roadmap ### Team Resource Allocation * **Tech Lead (0.5 FTE / 20 hrs/week):** Pipeline setup, embedding generation, RAG pipeline, negative guardrail logic, API integration. * **Operations Lead (0.25 FTE / 10 hrs/week):** Knowledge base hygiene, golden dataset curation, user acceptance testing, change management. ``` WEEK 1: Knowledge Curation & Pilot Architecture Mon Tue Wed Thu Fri [Day 1]───[Day 2]───[Day 3]───[Day 4]───[Day 5] Scope Data Golden Guardrail Pilot Audit Ingestion Dataset Tuning Launch ``` ### Week 1: Knowledge Curation & Pilot Architecture * **Day 1: Scope & Source Audit** * *Tech Lead:* Audit available knowledge infrastructure (Notion, Google Drive, Confluence, GitHub). Select target vector database and API pipeline. * *Ops Lead:* Define boundaries. Identify high-friction internal domains (e.g., HR benefits, customer onboarding playbooks, technical setup guides) and archive outdated documentation. * **Day 2: Data Ingestion & Strict RAG Pipeline Setup** * *Tech Lead:* Connect APIs, configure document chunking (512-token chunks with 10% overlap), and generate embeddings. Enforce strict retrieval parameters ($top\_k = 3$, cosine similarity threshold $\ge 0.82$). * *Ops Lead:* Review chunked outputs for formatting fidelity (ensuring tables, bullet points, and headers parse correctly). * **Day 3: Golden Dataset Benchmarking & Baseline Eval** * *Ops Lead:* Construct a **Golden Dataset of 30–50 canonical questions** representing real internal inquiries (e.g., *"What is our SLA for enterprise support tickets?"*, *"How do I expense equipment?"*), paired with verified human-authored answers and source links. * *Tech Lead:* Run automated batch evaluations against the golden dataset. Score baseline performance across **Faithfulness** (no hallucinations), **Answer Relevance**, and **Retrieval Precision**. Target: Baseline score $\ge 75\%$. * **Day 4: Guardrail Tuning & Negative Prompt Hardening** * *Tech Lead:* Implement explicit system prompts and negative guardrails: > *"You are an internal verification assistant. Answer ONLY using the provided context. If the answer cannot be completely derived from the text, state: 'I am unable to find this in company documentation' and suggest the appropriate department lead. Never extrapolate."* * *Ops Lead:* Run stress-testing using adversarial and out-of-scope questions (e.g., *"What is our 2027 IPO plan?"*). Verify the bot correctly refuses to answer. * **Day 5: Pilot Kickoff & Feedback UI Setup** * *Tech Lead:* Deploy the bot into an isolated Slack/Teams channel (`#ask-knowledge-pilot`). Embed binary **Feedback UI (👍/👎)** buttons beneath every response. * *Ops Lead:* Onboard **5–7 cross-functional power users** (Product, Sales, HR, Ops). Instruct them to log daily real-world queries and flag unhelpful or ungrounded responses. --- ``` WEEK 2: Refinement, GA Launch & Governance Mon Tue Wed Thu Fri [Day 6]───[Day 7]───[Day 8]───[Day 9]───[Day 10] Pilot Prompt GA Prep Company SLA & Review Tuning & Comms All-Hands Handover ``` ### Week 2: Refinement, GA Launch & Governance * **Day 6: Pilot Review & Error Gap Analysis** * *Tech Lead & Ops Lead:* Review telemetry and feedback from Days 5–6. Isolate all "👎" events. Classify failures into: * *Data Gap* (document doesn't exist). * *Retrieval Failure* (document exists, bot missed it). * *Generation Failure* (bot retrieved context but phrased answer inaccurately). * **Day 7: Prompt Engineering & Index Optimization** * *Tech Lead:* Refine retrieval parameters based on gap analysis. Add reranking if necessary. Re-run the 30–50 question Golden Dataset to ensure regression scores exceed **85%**. * *Ops Lead:* Fill identified knowledge gaps by directly updating source docs in Notion/Drive. * **Day 8: GA Readiness & Documentation** * *Tech Lead:* Migrate bot to the primary general channel (`#ask-internal` or direct bot DM). Implement rate limiting, monitoring alerts, and citation rendering checks. * *Ops Lead:* Draft a 1-page quick-start guide: *How to Talk to Our Knowledge Bot (and When to Escalate to a Human)*. * **Day 9: Company-Wide Launch (General Availability)** * *Tech Lead & Ops Lead:* Host a **mandatory 15-minute All-Hands live demo**: * **00:00–05:00:** Why we built it (speed, trust, zero manual searching). * **05:00–10:00:** Live demo: Asking good prompts, verifying citations, and observing the bot safely refuse to hallucinate. * **10:00–15:00:** Using the 👍/👎 button for continuous improvement. * Open `#ask-internal` to all 40 employees. * **Day 10: Post-Launch Monitoring, Governance Baseline & Handover** * *Tech Lead:* Review launch logs, latency metrics, and API utilization. Set up weekly automated eval runs. * *Ops Lead:* Establish official ownership handoff: document owners are responsible for source freshness; Ops handles triage for recurring unanswered queries. --- ## 4. Success Metrics & Ongoing Governance ### Week 2 Target KPIs | Metric | Target Benchmark | Tracking Mechanism | | :--- | :--- | :--- | | **Team Adoption** | $\ge 85\%$ of company querying $\ge 2\times/\text{week}$ | Slack/Teams workspace analytics | | **Golden Dataset Score** | $\ge 90\%$ accuracy across evaluation suite | Automated CI/CD prompt evaluation | | **Citation Attribution** | $100\%$ of substantive answers cite deep links | RAG pipeline programmatic enforcement | | **Feedback Ratio** | $\ge 85\%$ positive (👍) ratings across all queries | In-channel reaction database logs | | **Defensive Fallback Rate** | $10\% - 15\%$ safe refusal on ambiguous prompts | Telemetry query classification | --- ### Ongoing Governance Cadence Following Day 10, the project shifts from build mode to steady-state maintenance requiring minimal weekly overhead: ``` ┌────────────────────────────────────────────────────────────────────────┐ │ ONGOING GOVERNANCE CADENCE │ ├───────────────────────┬────────────────────────────────────────────────┤ │ Weekly Check-in │ Ops Lead reviews all "👎" flags and unanswered │ │ (30–45 mins/week) │ queries. Unanswered queries become candidates │ │ │ for documentation creation. │ ├───────────────────────┼────────────────────────────────────────────────┤ │ Golden Dataset Growth │ Add 3–5 real user queries weekly to the Golden │ │ (Ongoing) │ Dataset to continuously harden edge cases. │ ├───────────────────────┼────────────────────────────────────────────────┤ │ Monthly Index Health │ Tech Lead reviews chunk distribution, API │ │ (1 hour/month) │ latency, and deprecates archived documents │ │ │ to keep vector search lightweight and fast. │ └───────────────────────┴────────────────────────────────────────────────┘ ``` By pairing **strict RAG grounding** with **direct document ownership**, this plan provides a 40-person company with the exact factual rigor, verification speed, and high adoption seen in enterprise implementations like Morgan Stanley.