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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Scientific Blog Writing Guidelines
|
| 2 |
+
|
| 3 |
+
Guidelines for writing casual, accessible scientific content in interactive blog posts.
|
| 4 |
+
|
| 5 |
+
## Style References
|
| 6 |
+
|
| 7 |
+
Use these blog posts as inspiration for writing style:
|
| 8 |
+
|
| 9 |
+
- [The Smol Training Playbook](https://huggingface.co/spaces/HuggingFaceTB/smol-training-playbook)
|
| 10 |
+
- [Transformers Tenets](https://huggingface.co/spaces/transformers-community/Transformers-tenets)
|
| 11 |
+
- [FineWeb: decanting the web for the finest text data at scale](https://huggingface.co/spaces/HuggingFaceFW/blogpost-fineweb-v1)
|
| 12 |
+
- [FineVision: Open Data is All You Need](https://huggingface.co/spaces/HuggingFaceM4/FineVision)
|
| 13 |
+
- [The Ultra-Scale Playbook](https://huggingface.co/spaces/nanotron/ultrascale-playbook)
|
| 14 |
+
|
| 15 |
+
## Voice and Tone
|
| 16 |
+
|
| 17 |
+
- **Conversational but precise**: Write like explaining to a curious colleague over coffee
|
| 18 |
+
- **Direct address**: Use "you" and "we" freely
|
| 19 |
+
- **Active voice**: Prefer "the model learns" over "learning is performed by the model"
|
| 20 |
+
- **Short sentences**: Break complex ideas into digestible chunks
|
| 21 |
+
- **No hedging**: Say "X improves Y" not "X tends to potentially improve Y"
|
| 22 |
+
|
| 23 |
+
## Punctuation
|
| 24 |
+
|
| 25 |
+
- **No em-dashes (—)**: Use parentheses, commas, or separate sentences instead
|
| 26 |
+
- **En-dashes (–)** for ranges only: "2020–2024", "pages 10–15"
|
| 27 |
+
- **Minimal semicolons**: Prefer two sentences over one with a semicolon
|
| 28 |
+
|
| 29 |
+
## Formatting
|
| 30 |
+
|
| 31 |
+
- **Bold for key terms** on first introduction
|
| 32 |
+
- **Inline code** for technical identifiers: model names, hyperparameters, file paths
|
| 33 |
+
- Lists for features, steps, or comparisons
|
| 34 |
+
- Keep paragraphs short (3-5 sentences max)
|
| 35 |
+
|
| 36 |
+
## Structure
|
| 37 |
+
|
| 38 |
+
- Start sections with the conclusion or key insight
|
| 39 |
+
- Use progressive disclosure: overview first, details on demand
|
| 40 |
+
- Every claim should have a visible artifact (chart, code, demo) nearby
|
| 41 |
+
- Sidenotes for tangential but useful context
|
| 42 |
+
|
| 43 |
+
## Technical Writing
|
| 44 |
+
|
| 45 |
+
- Define jargon on first use
|
| 46 |
+
- Concrete examples over abstract explanations
|
| 47 |
+
- Show, don't tell: prefer an interactive demo over a paragraph of description
|
| 48 |
+
- Link to sources, don't just cite them
|
| 49 |
+
|
| 50 |
+
## Interactivity
|
| 51 |
+
|
| 52 |
+
- Treat figures as first-class content, not decoration
|
| 53 |
+
- Interactive elements should reveal insight, not just look fancy
|
| 54 |
+
- Ensure all visualizations work in dark mode
|
| 55 |
+
- Mobile-friendly is mandatory
|
| 56 |
+
|
| 57 |
+
## Content Structure
|
| 58 |
+
|
| 59 |
+
- **One file, one article**: Main content lives in `app/src/content/article.mdx`
|
| 60 |
+
- **Chapters for length**: Split long articles into `app/src/content/chapters/` and import them
|
| 61 |
+
- **Short sections**: Each section answers one question or supports one idea
|
| 62 |
+
- **TOC-friendly headings**: Use H2–H4 with short, descriptive titles (auto-generates table of contents)
|
| 63 |
+
|
| 64 |
+
## Math Notation
|
| 65 |
+
|
| 66 |
+
- **Introduce symbols** the first time they appear
|
| 67 |
+
- **Prefer well-known notation** over custom shorthand
|
| 68 |
+
- **Plain-language interpretation** after every significant formula
|
| 69 |
+
- Inline math: `$x^2$`, block math: `$$...$$`
|
| 70 |
+
- Use `\htmlId{name}{...}` for cross-referenceable equations
|
| 71 |
+
|
| 72 |
+
## Citations and References
|
| 73 |
+
|
| 74 |
+
- Citations from `app/src/content/bibliography.bib` using `[@key]` or `@key`
|
| 75 |
+
- Footnotes: `[^id]` with definition `[^id]: explanation`
|
| 76 |
+
- Deep-link anything with `id` prop on `Image`, `HtmlEmbed`, `Reference` components
|
| 77 |
+
- Link format: `[Figure 1](#my-figure-id)`
|
| 78 |
+
|
| 79 |
+
## Components Quick Reference
|
| 80 |
+
|
| 81 |
+
| Component | Use for |
|
| 82 |
+
|-----------|---------|
|
| 83 |
+
| `<Sidenote>` | Contextual notes in the margin |
|
| 84 |
+
| `<Note variant="info/success/danger">` | Callouts, tips, warnings |
|
| 85 |
+
| `<Accordion>` | Collapsible details, code examples |
|
| 86 |
+
| `<Image>` | Optimized images with captions, zoom |
|
| 87 |
+
| `<HtmlEmbed>` | D3/Plotly charts, interactive figures |
|
| 88 |
+
| `<Wide>` / `<FullWidth>` | Break out of content column |
|
| 89 |
+
| `<Glossary>` | Hover definitions for terms |
|
| 90 |
+
| `<Quote>` | Attributed quotations |
|
| 91 |
+
| `<Stack>` | Multi-column layouts |
|
| 92 |
+
|
| 93 |
+
## Chart Selection
|
| 94 |
+
|
| 95 |
+
Match visualization to analytical goal:
|
| 96 |
+
- **Compare values**: Bar, dot plot
|
| 97 |
+
- **Show distribution**: Histogram, box plot, violin
|
| 98 |
+
- **Part-to-whole**: Pie, stacked bar, treemap
|
| 99 |
+
- **Trends over time**: Line chart
|
| 100 |
+
- **Relationships**: Scatter, bubble
|
| 101 |
+
- **Flow/process**: Sankey, flowchart
|
| 102 |
+
|
| 103 |
+
Prefer D3 over Plotly for custom, web-native visualizations.
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
## Skills
|
| 108 |
+
|
| 109 |
+
### Vibe Coding D3 Charts
|
| 110 |
+
|
| 111 |
+
Create interactive D3 charts as self-contained HTML fragments. Charts must be **responsive**, **accessible**, **interactive**, and **dark mode ready**.
|
| 112 |
+
|
| 113 |
+
**Workflow:**
|
| 114 |
+
|
| 115 |
+
1. Read the directives at `app/src/content/embeds/vibe-code-d3-embeds-directives.md`
|
| 116 |
+
2. Optionally use an existing chart from `app/src/content/embeds/` as a starting point
|
| 117 |
+
3. Generate the chart with a prompt like:
|
| 118 |
+
```
|
| 119 |
+
I want you to code a new d3 chart named `yourchart`.
|
| 120 |
+
I have one CSV file called `yourdata.csv` in the data folder.
|
| 121 |
+
The csv has the following columns: `x`, `y`, `z`.
|
| 122 |
+
```
|
| 123 |
+
4. Iterate with small adjustments until satisfied
|
| 124 |
+
|
| 125 |
+
**Embedding:**
|
| 126 |
+
|
| 127 |
+
Use the `<HtmlEmbed>` component in MDX:
|
| 128 |
+
|
| 129 |
+
```jsx
|
| 130 |
+
<HtmlEmbed
|
| 131 |
+
id="fig1"
|
| 132 |
+
src="your-chart.html"
|
| 133 |
+
title="Chart Title"
|
| 134 |
+
desc="Figure 1: Description of the chart."
|
| 135 |
+
/>
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
**Reference examples:** `app/src/content/chapters/demo/vibe-coding-charts.mdx`
|
| 139 |
+
|
| 140 |
+
---
|
| 141 |
+
|
| 142 |
+
## End-of-Interaction Checklist
|
| 143 |
+
|
| 144 |
+
After completing any content edit, perform this reference audit:
|
| 145 |
+
|
| 146 |
+
1. **Scan for uncited claims**: Look for statements about methods, benchmarks, or prior work that lack citations
|
| 147 |
+
2. **Search for BibTeX entries**: For each missing reference, search online (Google Scholar, Semantic Scholar, arXiv) for the correct BibTeX entry
|
| 148 |
+
3. **Add to bibliography**: Place new entries in `app/src/content/bibliography.bib` with a descriptive key (e.g., `@article{vaswani2017attention, ...}`)
|
| 149 |
+
4. **Insert citations**: Add `[@key]` inline where the reference is needed
|
| 150 |
+
5. **Ask if unsure**: If multiple papers match or authorship is ambiguous, ask the user which reference is correct before adding
|
| 151 |
+
|
| 152 |
+
**What needs citations:**
|
| 153 |
+
- Model names (BERT, GPT, LLaMA)
|
| 154 |
+
- Datasets (ImageNet, C4, The Pile)
|
| 155 |
+
- Methods and techniques (attention, LoRA, RLHF)
|
| 156 |
+
- Benchmark results or comparisons
|
| 157 |
+
- Claims about prior work ("X showed that...")
|