Neural Sketch

Chain-Of-Thought

Example sketch of Chain-of-Thought(ish) diagram

CoT
examples/cot-s.tex
\nskContainer[
  text-north=Chain-Of-Thought (CoT),
  text-north-loc=west,
]
{
  \foreach \i in {0, 1, 2, 3, j} {
      \nskBlock[
        width=1cm, height=1.2cm,
        last-pos-s={right=.5cm},
        text-north={$x_\i$},
        fill=nskMainAccent,
      ]
    }
  \nskBlock[
    width=7.2cm, height=1cm,
    pos={below right=.5cm and -1cm of rectangle1},
    text-center={Large Language Model},
    fill=nskSecondaryAccent,
  ]
  \nskBlock[
    width=1cm, height=1.2cm,
    last-pos-s={below left=.5cm and -1cm},
    fill=nskRed,
  ]
  \foreach \i/\c in {1/A, 2/B, 3/C, j/D} {
      \nskBlock[
        width=1cm, height=1.2cm,
        last-pos-s={right=.5cm},
        text-south={$x_\i$},
        text-center={\c},
        fill=nskOrange,
      ]
    }
}
\foreach \i in {1, ..., 4} {
    \tikzmath{
      int \o;
      \o = \i+7;
    }
    \nskGroup[
      on background layer,
    ]
    {
      \nskConnect[
        from=rectangle\i.east,
        to=rectangle\o.west,
        bend-type=double,
        bend-direction=right,
        bend-distance=2mm,
        corner-radius=2mm,
      ]
    }
  }