Skip to content

docs(cookbook): revamp eval-correction-loop + add Mermaid component#660

Open
SuhaniNagpal7 wants to merge 2 commits into
devfrom
docs/eval-correction-loop-revamp
Open

docs(cookbook): revamp eval-correction-loop + add Mermaid component#660
SuhaniNagpal7 wants to merge 2 commits into
devfrom
docs/eval-correction-loop-revamp

Conversation

@SuhaniNagpal7
Copy link
Copy Markdown
Contributor

Summary

  • Mermaid component (src/components/docs/Mermaid.astro) registered in the auto-import map. Lazy-loads mermaid@11 from jsdelivr CDN, dark/light theme-aware, deduplicated across diagrams per page. Lets cookbook authors drop <Mermaid code={\...`} />` into any MDX with no manual imports.
  • eval-correction-loop revamp to the cookbook playbook bar: kebab-case frontmatter with structured last-tested-with, plainer description, new "What you'll build" section, expanded "Why this matters" with concrete production-incident lead, a Mermaid flowchart of the 5-step loop, em dashes purged, Verify column added to Troubleshooting, technical-ladder Next steps, and a real Evaluations dashboard screenshot after Step 4.

Test plan

  • pnpm dev (or pnpm astro dev) and visit /docs/cookbook/evaluation/eval-correction-loop — confirm the Mermaid flowchart renders (not a raw code block).
  • Toggle the docs theme — diagram re-renders in the new theme.
  • Visit any docs page without a <Mermaid> usage — confirm mermaid.js is not loaded (lazy bundle).
  • pnpm astro build passes; 926+ pages built; the eval-correction-loop page emits a data-mermaid wrapper.
  • Verify the S3 screenshot URL renders inside Step 4.

Notes

  • 3 other cookbook files (semantic-caching, debug-traces-from-ide, docker-compose-quickstart) have related local edits that are not in this PR by design. They'll go in a follow-up once their real dashboard screenshots are captured.

Suhani Nagpal added 2 commits May 21, 2026 13:37
Lazy-loads mermaid@11 from jsdelivr CDN the first time a <Mermaid>
appears on a page. Registered in the auto-import map so cookbook
authors can drop <Mermaid code={`...`} /> into MDX without manual
imports. Theme-aware (re-renders on dark/light toggle) and
deduplicated across multiple diagrams per page via Astro's hoisted
<script> bundling.
- Frontmatter expanded to kebab-case schema (slug, author, products,
  frameworks, difficulty, tags, og-image, canonical, last-tested-date,
  structured last-tested-with, code-repo-url, page-type).
- Rewrote description for plain-language clarity ("Build a fi.evals
  evaluator that matches your team's judgments...").
- Added "What you'll build" section with 5 concrete artifact bullets.
- Expanded "Why this matters" with concrete production-incident lead
  (unauthorized refunds) and the four playbook elements: bad outcome,
  why standard tooling misses it, which FAGI product helps, metric
  that proves the fix.
- Added Mermaid flowchart of the 5-step correction loop.
- Em dashes purged (5 occurrences) per docs style.
- Troubleshooting table gained "Verify" column.
- Replaced "Explore further" reference cards with a 4-item technical
  next-steps ladder (CI gate, 80/20 holdout, trace-pipeline promotion,
  quarterly recalibration).
- Added real Evaluations dashboard screenshot after Step 4 with
  caption explaining how the registered template appears in the list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant