<html style="scrollbar-width: thin;scrollbar-color: rgb(219, 219, 219) rgb(255, 255, 255);"><head><meta charset="utf-8"><title>GBNF(GGML BNF) Explained- An Approach to Structuring LLM Outputs</title><style>
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.typography .markup table.image-wrapper img,
.typography.editor .markup table.image-wrapper img,
.typography .markup table.kindle-wrapper img,
.typography.editor .markup table.kindle-wrapper img {
max-width: 550px;
}
}
@media screen and (max-width: 650px) {
.typography .markup div.youtube-overlay,
.typography.editor .markup div.youtube-overlay,
.typography .markup div.vimeo-overlay,
.typography.editor .markup div.vimeo-overlay {
display: none !important;
}
}
@media screen and (max-width: 370px) {
.typography .markup div.tiktok-wrap,
.typography.editor .markup div.tiktok-wrap {
width: calc(95vw - 32px);
height: calc((95vw - 32px - 2px) / 0.485714);
}
}
@media screen and (max-width: 650px) {
.typography .markup div.embedded-publication-wrap .embedded-publication.show-subscribe,
.typography.editor .markup div.embedded-publication-wrap .embedded-publication.show-subscribe {
padding: 24px;
}
}
@media screen and (max-width: 650px) {
.typography .markup div.subscription-widget-wrap .subscription-widget.show-subscribe,
.typography.editor .markup div.subscription-widget-wrap .subscription-widget.show-subscribe,
.typography .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe,
.typography.editor .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe,
.typography .markup div.captioned-button-wrap .subscription-widget.show-subscribe,
.typography.editor .markup div.captioned-button-wrap .subscription-widget.show-subscribe {
padding: 0px 24px;
}
}
@media screen and (max-width: 650px) {
.typography .markup div.subscription-widget-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
.typography.editor .markup div.subscription-widget-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
.typography .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
.typography.editor .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
.typography .markup div.captioned-button-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
.typography.editor .markup div.captioned-button-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button {
padding: 10px 12px;
min-width: 110px;
}
}
@media (max-width: 650px) {
.typography .markup .tweet,
.typography.editor .markup .tweet {
padding: 12px;
}
}
@media (max-width: 650px) {
.typography .markup .tweet .tweet-text,
.typography.editor .markup .tweet .tweet-text {
font-size: 14px;
line-height: 20px;
}
}
@media (max-width: 650px) {
.typography .markup .tweet .tweet-photos-container.two,
.typography.editor .markup .tweet .tweet-photos-container.two,
.typography .markup .tweet .tweet-photos-container.three,
.typography.editor .markup .tweet .tweet-photos-container.three,
.typography .markup .tweet .tweet-photos-container.four,
.typography.editor .markup .tweet .tweet-photos-container.four {
height: 200px;
}
}
@media (max-width: 650px) {
.typography .markup .tweet a.expanded-link .expanded-link-img,
.typography.editor .markup .tweet a.expanded-link .expanded-link-img {
max-height: 180px;
}
}
@media (max-width: 650px) {
.typography .markup .tweet a.expanded-link .expanded-link-description,
.typography.editor .markup .tweet a.expanded-link .expanded-link-description {
display: none;
}
}
@media screen and (max-width: 650px) {
.typography .markup .apple-podcast-container,
.typography.editor .markup .apple-podcast-container {
width: unset;
}
}
@media (max-width: 420px) {
.typography .markup .install-substack-app-embed img.install-substack-app-embed-img,
.typography.editor .markup .install-substack-app-embed img.install-substack-app-embed-img {
margin: 0 auto 16px auto;
}
}
@media (max-width: 420px) {
.typography .markup .install-substack-app-embed .install-substack-app-embed-text,
.typography.editor .markup .install-substack-app-embed .install-substack-app-embed-text {
margin: 0 0 12px 0;
max-width: 100%;
width: auto;
text-align: center;
}
}
@media (max-width: 420px) {
.typography .markup .install-substack-app-embed .install-substack-app-embed-link,
.typography.editor .markup .install-substack-app-embed .install-substack-app-embed-link {
display: flex;
justify-content: center;
}
}
@media screen and (min-width: 481px) {
.share-button-container {
height: 38px;
}
}
@media screen and (min-width: 481px) {
.share-button-container a.comment {
height: 38px;
line-height: 38px;
padding-right: 10px;
}
}
@media screen and (max-width: 480px) {
.share-button-container .separator {
display: block;
margin: 0;
height: 8px;
border-left: none;
}
}
@media screen and (max-width: 480px) {
.share-button-container a.share.first img {
padding-left: 0;
}
}
@media screen and (min-width: 481px) {
.share-button-container a.mobile {
display: none !important;
}
}
@media screen and (min-width: 541px) {
.settings-add-pub-modal-wrapper .container .add-recommending-pub-modal-container {
padding: 36px;
height: 680px;
}
}
@media screen and (min-width: 541px) {
.settings-add-pub-modal-wrapper .container .add-recommending-pub-modal-container .footer {
position: absolute;
bottom: 36px;
margin: 0px;
}
}
@media screen and (max-width: 650px) {
.header-anchor-parent {
display: none;
}
}
@media screen and (min-width: 768px) {
.post {
padding: 32px 0 0 0;
}
}
@media screen and (max-width: 650px) {
.post .post-header .post-label {
margin-top: 8px;
}
}
@media screen and (max-width: 650px) {
.post .post-header .meta-author-wrap.alternative-meta .meta-right-column .post-meta {
margin-top: 6px;
}
}
@media screen and (max-width: 650px) {
.post .footer-facepile-container {
height: 64px;
padding: 0 16px;
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
}
}
@media screen and (max-width: 650px) {
.post .post-footer.use-separators {
justify-content: center;
}
}
@media screen and (max-width: 650px) {
.post .post-footer.next-prev {
height: 64px;
justify-content: space-between;
box-sizing: border-box;
}
}
@media screen and (max-width: 650px) {
.post-contributor-footer .post-contributor-bio-table {
display: block;
}
.post-contributor-footer .post-contributor-bio-table-row {
display: flex;
flex-direction: row;
}
.post-contributor-footer .post-contributor-bio-userhead-cell,
.post-contributor-footer .post-contributor-bio-body-cell {
display: block;
}
.post-contributor-footer .post-contributor-bio-body-cell {
flex-grow: 1;
}
.post-contributor-footer .post-contributor-bio-body-table {
display: block;
}
.post-contributor-footer .post-contributor-bio-body-table-row {
display: block;
}
.post-contributor-footer .post-contributor-bio-copy-cell,
.post-contributor-footer .post-contributor-bio-controls-cell {
display: block;
}
.post-contributor-footer .post-contributor-bio-copy-cell {
margin: 0 0 16px 0;
}
.post-contributor-footer .post-contributor-bio-controls-cell {
width: auto;
}
.post-contributor-footer .post-contributor-bio-controls {
margin: auto;
}
.post-contributor-footer .post-contributor-bio-controls .button.primary {
width: 100%;
}
.post-contributor-footer .post-contributor-bio-text {
font-size: 14px;
}
}
@media screen and (min-width: 768px) {
.post-silhouette {
padding: 32px 0;
}
}
@media screen and (max-width: 650px) {
.post-silhouette .post-silhouette-title {
margin-top: 10.44225025px;
height: 120px;
}
}
@media screen and (max-width: 650px) {
.post-silhouette .post-silhouette-meta {
width: 75%;
}
}
@media screen and (max-width: 650px) {
.post-silhouette .post-silhouette-meta.with-byline-image {
margin: 20px 0;
}
}
@media screen and (max-width: 650px) {
.use-theme-bg .post-meta.alternative-meta .post-meta-item,
.post-meta.alternative-meta .post-meta-item {
padding-right: 16px;
}
}
@media screen and (max-width: 370px) {
.use-theme-bg .post-meta.alternative-meta .post-meta-item,
.post-meta.alternative-meta .post-meta-item {
font-size: 14px;
}
}
@media screen and (max-width: 650px) {
.use-theme-bg .post-meta.alternative-meta .post-meta-item.guest-author-publication,
.post-meta.alternative-meta .post-meta-item.guest-author-publication {
display: none;
}
}
@media screen and (max-width: 370px) {
.post-meta .post-meta-item .post-meta-button {
height: 36px !important;
/* important to override in-line height style on emails */
}
.post-meta .post-meta-item .post-meta-button .meta-button-label {
display: none;
}
.post-meta .post-meta-item .post-meta-button > svg {
margin-right: 0;
}
}
@media screen and (max-width: 370px) {
.post-meta .post-meta-item {
font-size: 12px;
}
}
@media screen and (max-width: 650px) {
.post .floating-subscribe-button {
bottom: 20px;
right: 20px;
}
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
body .markup table.image-wrapper img,
body .markup table.kindle-wrapper img {
max-width: 550px;
}
}
@media screen and (max-width: 650px) {
body .markup div.youtube-overlay,
body .markup div.vimeo-overlay {
display: none !important;
}
}
@media screen and (max-width: 370px) {
body .markup div.tiktok-wrap {
width: calc(95vw - 32px);
height: calc((95vw - 32px - 2px) / 0.485714);
}
}
@media screen and (max-width: 650px) {
body .markup div.embedded-publication-wrap .embedded-publication.show-subscribe {
padding: 24px;
}
}
@media screen and (max-width: 650px) {
body .markup div.subscription-widget-wrap .subscription-widget.show-subscribe,
body .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe,
body .markup div.captioned-button-wrap .subscription-widget.show-subscribe {
padding: 0px 24px;
}
}
@media screen and (max-width: 650px) {
body .markup div.subscription-widget-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
body .markup div.subscription-widget-wrap-editor .subscription-widget.show-subscribe .subscription-widget-subscribe .button,
body .markup div.captioned-button-wrap .subscription-widget.show-subscribe .subscription-widget-subscribe .button {
padding: 10px 12px;
min-width: 110px;
}
}
@media (max-width: 650px) {
body .markup .tweet {
padding: 12px;
}
}
@media (max-width: 650px) {
body .markup .tweet .tweet-text {
font-size: 14px;
line-height: 20px;
}
}
@media (max-width: 650px) {
body .markup .tweet .tweet-photos-container.two,
body .markup .tweet .tweet-photos-container.three,
body .markup .tweet .tweet-photos-container.four {
height: 200px;
}
}
@media (max-width: 650px) {
body .markup .tweet a.expanded-link .expanded-link-img {
max-height: 180px;
}
}
@media (max-width: 650px) {
body .markup .tweet a.expanded-link .expanded-link-description {
display: none;
}
}
@media screen and (max-width: 650px) {
body .markup .apple-podcast-container {
width: unset;
}
}
@media (max-width: 420px) {
body .markup .install-substack-app-embed img.install-substack-app-embed-img {
margin: 0 auto 16px auto;
}
}
@media (max-width: 420px) {
body .markup .install-substack-app-embed .install-substack-app-embed-text {
margin: 0 0 12px 0;
max-width: 100%;
width: auto;
text-align: center;
}
}
@media (max-width: 420px) {
body .markup .install-substack-app-embed .install-substack-app-embed-link {
display: flex;
justify-content: center;
}
}
@media screen and (min-width: 500px) {
body .header a.logo {
width: 42px;
height: 42px;
border-radius: 12px;
}
}
@media screen and (max-width: 420px) {
body .subscription-receipt table:first-of-type .subscription-amount .subscription-discount {
width: 72px !important;
}
}
@media screen and (min-width: 481px) {
body .share-button-container {
height: auto;
}
}
@media screen and (max-width: 480px) {
body .share-button-container .separator {
display: block !important;
margin: 0 !important;
height: 8px !important;
border-left: none !important;
}
}
@media screen and (max-width: 650px) {
.digest .item .post-meta-item.audience {
display: none;
}
}
@media screen and (min-width: 500px) {
.digest-publication .logo img {
width: 42px;
height: 42px;
border-radius: 8px;
}
}
@media screen and (max-width: 650px) {
.comments-page .container .comment-list .collapsed-reply {
margin-left: calc(10 + 32px - 24px);
}
}
@media screen and (max-width: 650px) {
.comment > .comment-list {
padding-left: 24px;
}
}
@media screen and (max-width: 650px) {
.finish-magic-login-modal .modal-content .container {
padding: 24px 0;
}
}
@media (max-width: 650px) {
.reader2-text-b3 {
line-height: 24px;
}
}
@media screen and (max-width: 650px) {
.reader2-text-h4 {
line-height: 24px;
}
}
@media screen and (min-width: 541px) {
.user-profile-modal {
padding-left: 12px;
padding-right: 12px;
}
}
@media screen and (max-width: 650px) {
.subscribe-widget form.form .sideBySideWrap button.rightButton {
padding: 10px 12px;
}
}
@media screen and (min-width: 541px) {
.pub-icon:hover .logo-hover,
.feed-item-icon:hover .logo-hover {
display: block;
}
}
@media screen and (max-width: 650px) {
.post-ufi.single-full-width-button .post-ufi-button-wrapper {
width: 100%;
padding: 16px;
}
.post-ufi.single-full-width-button .post-ufi-button-wrapper:empty {
display: none;
}
.post-ufi.single-full-width-button .post-ufi-button {
width: 100%;
justify-content: center;
}
}
@media screen and (max-width: 768px) {
.file-embed-wrapper {
padding: 0;
}
}
@media screen and (max-width: 768px) {
.file-embed-wrapper-editor {
padding: 0;
}
}
@media screen and (max-width: 768px) {
.file-embed-wrapper-editor:active {
padding: 0;
}
}
@media only screen and (max-width: 650px) {
.file-embed-button.wide,
.file-embed-error-button.wide {
display: none;
}
}
@media only screen and (min-width: 630px) {
.file-embed-button.narrow,
.file-embed-error-button.narrow {
display: none;
}
}
@media screen and (min-width: 541px) {
.audio-player-wrapper .audio-player {
min-width: 500px;
}
}
@media screen and (max-width: 650px) {
.audio-player-wrapper .audio-player .audio-player-progress {
border-left-width: 16px;
border-right-width: 16px;
}
}
@media screen and (max-width: 650px) {
.audio-player-wrapper .audio-player .audio-player-progress .audio-player-progress-bar .audio-player-progress-bar-popup {
top: -54px;
}
}
@media screen and (max-width: 650px) {
.audio-player-wrapper-fancy .audio-player .audio-player-progress {
border-left-width: 16px;
border-right-width: 16px;
}
}
@media screen and (max-width: 650px) {
.audio-player-wrapper-fancy .audio-player .audio-player-progress .audio-player-progress-bar .audio-player-progress-bar-popup {
top: -54px;
}
}
@media (min-width: 250px) {
.audio-player-wrapper-fancy .audio-player {
padding: 32px;
}
.audio-player-wrapper-fancy .audio-player .btn-group {
display: flex;
}
.audio-player-wrapper-fancy .audio-player .btn-group .button:last-of-type {
display: block;
}
}
@media (min-width: 300px) {
.audio-player-wrapper-fancy .audio-player .btn-group {
display: block;
}
.audio-player-wrapper-fancy .audio-player .btn-group .button:first-of-type {
display: block;
}
}
@media (min-width: 350px) {
.audio-player-wrapper-fancy .audio-player .audio-player-substack-logo {
display: block;
}
.audio-player-wrapper-fancy .audio-player .audio-player-title {
margin-top: 16px;
}
.audio-player-wrapper-fancy .audio-player .audio-player-hero-image-container {
padding-top: 15%;
width: 15%;
display: block;
}
.audio-player-wrapper-fancy .audio-player .btn-group .button:first-of-type {
display: block;
}
.audio-player-wrapper-fancy .audio-player .audio-player-substack-logo {
display: block;
}
}
@media (min-width: 350px) {
.audio-player-wrapper-fancy .audio-player .audio-player-hero-image-container {
padding-top: 25%;
width: 25%;
display: block;
}
.audio-player-wrapper-fancy .audio-player .btn-group {
display: flex;
}
.audio-player-wrapper-fancy .audio-player .btn-group .button:first-of-type {
display: block;
}
}
@media (min-width: 400px) {
.audio-player-wrapper-fancy .audio-player .audio-player-hero-image-container {
padding-top: 40%;
width: 40%;
}
}
@media (max-width: 400px) {
.audio-player-wrapper-fancy .audio-player .btn-group {
margin-top: 12px;
}
.audio-player-wrapper-fancy .audio-player .btn-group .button {
font-size: 13px;
padding: 6px 12px;
height: auto;
margin-top: 10px;
}
}
@media (min-width: 600px) {
.audio-player-wrapper-fancy .audio-player .audio-player-hero-image-container {
padding-top: 55%;
width: 55%;
}
}
@media (max-width: 650px) {
.poll-editor-modal {
min-width: calc(100% - 20px);
}
}
@media (max-width: 750px) {
.poll-embed .poll-anchor-target .poll-anchor-copy-button {
left: 8px;
top: 45px;
}
}
@media screen and (min-width: 541px) {
.poll-embed .poll-wrapper.poll-web .poll-dialog .modal-table .modal-row .modal-content > .container {
width: 552px;
padding: 26px 24px;
}
}
@media screen and (max-width: 650px) {
.poll-embed .poll-wrapper.poll-web .poll-dialog .modal-table .modal-row .modal-content > .container {
padding: 40px 0;
}
}
@media screen and (max-width: 650px) {
.poll-embed .poll-wrapper.poll-web .poll-dialog .modal-row .modal-cell .modal-exit-btn {
margin-right: -20px;
}
}</style></head><body class="email-body" style="font-kerning: auto;"><img src="https://eotrx.substackcdn.com/open?token=eyJtIjoiPDIwMjQxMTIyMTIyMjU5LjMuMTgxMmI4ZWYyZjA5MjlkNEBtZy1kMS5zdWJzdGFjay5jb20-IiwidSI6MjgxNjY2NTkyLCJyIjoibGlicmVvZmZpY2VAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwiZCI6Im1nLWQxLnN1YnN0YWNrLmNvbSIsInAiOjE1MDcwOTc0MCwidCI6Im5ld3NsZXR0ZXIiLCJhIjoiZXZlcnlvbmUiLCJzIjo4MTc1MCwiYyI6InBvc3QiLCJmIjp0cnVlLCJwb3NpdGlvbiI6InRvcCIsImlhdCI6MTczMjI3ODE4NSwiZXhwIjoxNzM0ODcwMTg1LCJpc3MiOiJwdWItMCIsInN1YiI6ImVvIn0.O8_5rv9SOYCk-LC47pElBeJzaSyjhHTR6-QPKtD3Oq4" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/><div class="preview" style="display:none;font-size:1px;color:#333333;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">As the adoption of Large Language Models (LLMs) has increased across various applications, the rate of associated challenges has also risen.</div><div class="preview" style="display:none;font-size:1px;color:#333333;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ </div><table class="email-body-container" role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td></td><td class="content" width="550"></td><td></td></tr><tr><td></td><td class="content" width="550" align="left"><div style="font-size: 16px;line-height: 26px;max-width: 550px;width: 100%;margin: 0 auto;overflow-wrap: break-word;"><table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="right" style="height:20px;"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><span class="pencraft pc-reset _reset_h3mln_1 tw-font-body tw-text-ssm tw-text-substack-secondary" style="font-family: SF Pro Text, -apple-system, system-ui, BlinkMacSystemFont, Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol !important;font-size: 13px !important;color: rgb(119, 119, 119) !important;list-style: none;text-decoration: unset;margin: 0;"><div class="pencraft pc-reset _align-right_h3mln_16 _size-12_h3mln_35 _reset_h3mln_1" style="list-style: none;color: unset;text-align: right;font-size: 12px;line-height: 16px;text-decoration: unset;margin: 0;"><span class="pencraft pc-reset _reset_h3mln_1" translated="" style="list-style: none;color: unset;text-decoration: unset;margin: 0;">Forwarded this email? <a class="pencraft pc-reset _decoration-underline_h3mln_280 _reset_h3mln_1" href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly93d3cuZGV2c2hvcnRzLmluL3N1YnNjcmliZT91dG1fc291cmNlPWVtYWlsJnV0bV9jYW1wYWlnbj1lbWFpbC1zdWJzY3JpYmUmcj00bnAzYzAmbmV4dD1odHRwcyUzQSUyRiUyRnd3dy5kZXZzaG9ydHMuaW4lMkZwJTJGZ2JuZmdnbWwtYm5mLWV4cGxhaW5lZC1hbi1hcHByb2FjaCIsInAiOjE1MDcwOTc0MCwicyI6ODE3NTAsImYiOnRydWUsInUiOjI4MTY2NjU5MiwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi0wIiwic3ViIjoibGluay1yZWRpcmVjdCJ9.j8xRudh_EZjtN5XooO8uo3BoVONa6NHnaGGqVThr7hk?" style="list-style: none;color: unset;text-decoration: unset;margin: 0;-webkit-text-decoration-line: underline;text-decoration-line: underline;">Subscribe here</a> for more</span></div></span></td></tr></tbody></table></td></tr></tbody></table><table class="header graphic-header" role="presentation" style="border-spacing: 0;padding: 16px 0 32px;"><tbody><tr><td align="center" style="text-align: center;padding: 0;"><a href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly93d3cuZGV2c2hvcnRzLmluL3AvZ2JuZmdnbWwtYm5mLWV4cGxhaW5lZC1hbi1hcHByb2FjaD91dG1fY2FtcGFpZ249ZW1haWwtaGFsZi1wb3N0JnI9NG5wM2MwJnRva2VuPWV5SjFjMlZ5WDJsa0lqb3lPREUyTmpZMU9USXNJbkJ2YzNSZmFXUWlPakUxTURjd09UYzBNQ3dpYVdGMElqb3hOek15TWpjNE1UZzFMQ0psZUhBaU9qRTNNelE0TnpBeE9EVXNJbWx6Y3lJNkluQjFZaTA0TVRjMU1DSXNJbk4xWWlJNkluQnZjM1F0Y21WaFkzUnBiMjRpZlEubEMyTm9tQ1QyUjhrbW43QkgxVUJBaW9aZkc4azRlSXhtTlBsM1Ywa0FUTSIsInAiOjE1MDcwOTc0MCwicyI6ODE3NTAsImYiOnRydWUsInUiOjI4MTY2NjU5MiwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi0wIiwic3ViIjoibGluay1yZWRpcmVjdCJ9.SKlBj8mjyThqnzJAkNP-629pG6IiHihdkiGWtqtJ7_Y?"><img class="header-image" role="presentation" width="550" height="128" src="https://substackcdn.com/image/fetch/w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F65f1cc0f-26a5-430b-bea9-4a6c6eeaf8fb_3240x750.png" style="border: none !important;vertical-align: middle;max-width: 550px;display: block;margin: 0 auto;height: auto;width: 100%;"></a></td></tr></tbody></table><div class="post typography" dir="auto" style="padding: 16px 0 0 0;font-size: 16px;line-height: 26px;"><div class="post-header" style="font-size: 16px;line-height: 26px;"><h1 class="post-title published" style="color: rgb(54, 55, 55);font-family: 'Roboto Slab',sans-serif;font-weight: 700;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 0;line-height: 36px;font-size: 32px;"><a href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=post-email-title&utm_campaign=email-post-title&isFreemail=true&r=4np3c0&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi04MTc1MCIsInN1YiI6InBvc3QtcmVhY3Rpb24ifQ.lC2NomCT2R8kmn7BH1UBAioZfG8k4eIxmNPl3V0kATM" style="color: rgb(54, 55, 55);text-decoration: none;">GBNF(GGML BNF) Explained- An Approach to Structuring LLM Outputs</a></h1><table class="post-meta" role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 1em 0;height: 20px;align-items: center;"><tbody><tr><td><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><div class="pencraft pc-reset _color-primary_h3mln_166 _line-height-20_h3mln_80 _font-meta_h3mln_115 _size-11_h3mln_31 _weight-medium_h3mln_145 _transform-uppercase_h3mln_237 _reset_h3mln_1 _meta_h3mln_437 custom-css-email-post-author" style="list-style: none;font-size: 11px;line-height: 20px;text-decoration: unset;color: rgb(54, 55, 55);margin: 0;font-family: 'SF Compact', -apple-system, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: 500;text-transform: uppercase;letter-spacing: .2px;"><a class="pencraft pc-reset _color-primary_h3mln_166 _line-height-20_h3mln_80 _font-meta_h3mln_115 _size-11_h3mln_31 _weight-medium_h3mln_145 _transform-uppercase_h3mln_237 _reset_h3mln_1 _meta_h3mln_437" style="list-style: none;color: rgb(54, 55, 55);margin: 0;font-size: 11px;line-height: 20px;font-family: 'SF Compact', -apple-system, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: 500;text-transform: uppercase;letter-spacing: .2px;text-decoration: none" href="https://substack.com/@sridevi17j">Sridevi Panneerselvam</a></div></td></tr></tbody></table></td></tr><tr><td><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><div class="pencraft pc-reset _color-secondary_h3mln_169 _line-height-20_h3mln_80 _font-meta_h3mln_115 _size-11_h3mln_31 _weight-medium_h3mln_145 _transform-uppercase_h3mln_237 _reset_h3mln_1 _meta_h3mln_437" style="list-style: none;font-size: 11px;line-height: 20px;text-decoration: unset;color: rgb(119, 119, 119);margin: 0;font-family: 'SF Compact', -apple-system, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: 500;text-transform: uppercase;letter-spacing: .2px;"><time datetime="2024-11-22T12:23:01.167Z">Nov 22</time></div></td></tr></tbody></table></td></tr></tbody></table></td><td align="right"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><a href="https://substack.com/@sridevi17j"><img class="custom-css-email-avatar _avatar_1mh60_65" src="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F078dc670-7dfb-43d6-9680-30bb7cb85ace_144x144.png" style="border-radius: 500000px;box-sizing: border-box;max-width: 550px;border: none;vertical-align: middle;width: 40px;height: 40px;min-width: 40px;min-height: 40px;object-fit: cover;margin: 0px;display: inline" width="40" height="40"></a></td></tr></tbody></table></td></tr></tbody></table><table class="email-ufi-2-top" role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 1px solid rgb(0, 0, 0, .1);border-bottom: 1px solid rgb(0, 0, 0, .1);min-width: 100%;"><tbody><tr height="16"><td height="16" style="font-size:0px;line-height:0;"> </td></tr><tr><td><table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><table role="presentation" width="38" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-icon-button" href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=substack&isFreemail=true&submitLike=true&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwicmVhY3Rpb24iOiLinaQiLCJpYXQiOjE3MzIyNzgxODUsImV4cCI6MTczNDg3MDE4NSwiaXNzIjoicHViLTgxNzUwIiwic3ViIjoicmVhY3Rpb24ifQ.kQKhOjvKFj7FNhzWJGlX_1e1LJYUVFStV-hZG40CVBw&utm_medium=email&utm_campaign=email-reaction&r=4np3c0" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 1;padding: 9px 0;text-decoration: none;color: rgb(119, 119, 119);min-width: 38px;box-sizing: border-box;width: 38px"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideHeart%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="border: none;vertical-align: middle;max-width: 18px" alt=""></a></td></tr></tbody></table></td><td width="8" style="min-width: 8px"></td><td style="vertical-align:middle;"><table role="presentation" width="38" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-icon-button" href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=substack&utm_medium=email&isFreemail=true&comments=true&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi04MTc1MCIsInN1YiI6InBvc3QtcmVhY3Rpb24ifQ.lC2NomCT2R8kmn7BH1UBAioZfG8k4eIxmNPl3V0kATM&r=4np3c0&utm_campaign=email-half-magic-comments&action=post-comment&utm_source=substack&utm_medium=email" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 1;padding: 9px 0;text-decoration: none;color: rgb(119, 119, 119);min-width: 38px;box-sizing: border-box;width: 38px"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideComments%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="border: none;vertical-align: middle;max-width: 18px" alt=""></a></td></tr></tbody></table></td><td width="8" style="min-width: 8px"></td><td style="vertical-align:middle;"><table role="presentation" width="38" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-icon-button" href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=substack&utm_medium=email&utm_content=share&utm_campaign=email-share&action=share&triggerShare=true&isFreemail=true&r=4np3c0&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi04MTc1MCIsInN1YiI6InBvc3QtcmVhY3Rpb24ifQ.lC2NomCT2R8kmn7BH1UBAioZfG8k4eIxmNPl3V0kATM" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 1;padding: 9px 0;text-decoration: none;color: rgb(119, 119, 119);min-width: 38px;box-sizing: border-box;width: 38px"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideShare2%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="border: none;vertical-align: middle;max-width: 18px" alt=""></a></td></tr></tbody></table></td><td width="8" style="min-width: 8px"></td><td style="vertical-align:middle;"><table role="presentation" width="38" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-icon-button" href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly9vcGVuLnN1YnN0YWNrLmNvbS9wdWIvZGV2c2hvcnRzL3AvZ2JuZmdnbWwtYm5mLWV4cGxhaW5lZC1hbi1hcHByb2FjaD91dG1fc291cmNlPXN1YnN0YWNrJnV0bV9tZWRpdW09ZW1haWwmdXRtX2NhbXBhaWduPWVtYWlsLXJlc3RhY2stY29tbWVudCZhY3Rpb249cmVzdGFjay1jb21tZW50JnI9NG5wM2MwJnRva2VuPWV5SjFjMlZ5WDJsa0lqb3lPREUyTmpZMU9USXNJbkJ2YzNSZmFXUWlPakUxTURjd09UYzBNQ3dpYVdGMElqb3hOek15TWpjNE1UZzFMQ0psZUhBaU9qRTNNelE0TnpBeE9EVXNJbWx6Y3lJNkluQjFZaTA0TVRjMU1DSXNJbk4xWWlJNkluQnZjM1F0Y21WaFkzUnBiMjRpZlEubEMyTm9tQ1QyUjhrbW43QkgxVUJBaW9aZkc4azRlSXhtTlBsM1Ywa0FUTSIsInAiOjE1MDcwOTc0MCwicyI6ODE3NTAsImYiOnRydWUsInUiOjI4MTY2NjU5MiwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi0wIiwic3ViIjoibGluay1yZWRpcmVjdCJ9.XJAjFgmcK9MLe6dHxU1EbGema6scD4pIYpeoAUBMV2o?&utm_source=substack&utm_medium=email" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 1;padding: 9px 0;text-decoration: none;color: rgb(119, 119, 119);min-width: 38px;box-sizing: border-box;width: 38px"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FNoteForwardIcon%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="border: none;vertical-align: middle;max-width: 18px" alt=""></a></td></tr></tbody></table></td></tr></tbody></table></td><td align="right"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="vertical-align:middle;"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-button-outline" href="https://open.substack.com/pub/devshorts/p/gbnfggml-bnf-explained-an-approach?utm_source=email&redirect=app-store&utm_campaign=email-read-in-app" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 12px;padding: 9px 14px;text-decoration: none;color: rgb(119, 119, 119);"><div class="email-button-spacer" style="font-size: 16px;line-height: 26px;display: inline-block;vertical-align: middle;max-width: 0;min-height: 18px;"></div><span class="email-button-text" style="vertical-align: middle;margin-right: 4px">READ IN APP</span><img class="icon text-icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideArrowUpRight%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="min-width: 18px;min-height: 18px;border: none;vertical-align: middle;margin-right: 0;margin-left: 0;max-width: 18px" alt=""></a></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr height="16"><td height="16" style="font-size:0px;line-height:0;"> </td></tr></tbody></table></div></div><div class="post typography" dir="auto" style="padding: 16px 0 0 0;font-size: 16px;line-height: 26px;"><div class="body markup" dir="auto" style="text-align: initial;font-size: 16px;line-height: 26px;width: 100%;word-break: break-word;margin-bottom: 16px;font-family: 'Roboto Slab',sans-serif;font-weight: 400;"><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;margin-top: 0;">As the adoption of Large Language Models (LLMs) has increased across various applications, the rate of associated challenges has also risen. One notable challenge is the need to structure LLM outputs for specific use cases. While LLMs excel at producing fluent context-aware text, many practical applications demand more structured and predictable output formats.</p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">The real challenge, however, is ensuring that LLMs adhere to these structured formats. While prompt engineering is one way to address this, GBNF provides the same solution through a different approach.</p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">By defining strict structural rules, GBNF ensures consistency and predictability in responses. To understand how GBNF achieves this and its significance in the LLM ecosystem, let's delve deeper into what GBNF is and how it works.</p><h2 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.625em;">What is GBNF?</h2><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><span>GBNF</span><a href="https://substack.com/redirect/b6b7d8a8-bbc7-4c71-b07c-f5fd7f70a9a9?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" rel="" style="color: rgb(54, 55, 55);text-decoration: underline;"> (GGML [Backus-Naur Form])</a><span> is an extension of the traditional Backus-Naur Form, specifically designed for use with Large Language Models (LLMs). It provides a formal way to define grammars that constrain and structure the output of LLMs. By implementing GBNF, developers can guide LLMs to generate content in specific formats, such as JSON or custom data structures, while maintaining the model's ability to produce relevant and contextual responses. This tool bridges the gap between the free-form nature of LLM outputs and the structured data requirements of many practical applications.</span></p><div class="captioned-image-container-static" style="font-size: 16px;line-height: 26px;margin: 32px auto;"><figure style="width: 100%;margin: 0 auto;"><table class="image-wrapper" data-component-name="Image2ToDOMStatic" width="100%" border="0" cellspacing="0" cellpadding="0" style="mso-padding-alt: 1em 0 1.6em;"><tbody><tr><td style="text-align: center;"></td><td class="content" align="left" width="1342" style="text-align: center;"><a class="image-link" rel="" target="_blank" href="https://substack.com/redirect/7f0bc97e-583c-421c-b0ac-1f3c12dbf123?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" style="position: relative;flex-direction: column;align-items: center;padding: 0;width: auto;height: auto;border: none;text-decoration: none;display: block;margin: 0;"><img class="wide-image" data-attrs="{"src":"https://substack-post-media.s3.amazonaws.com/public/images/3afb7054-1aab-4699-bc5b-60211eb0e1d1_1342x721.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":721,"width":1342,"resizeWidth":null,"bytes":143091,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":false,"topImage":true,"internalRedirect":null,"isProcessing":false}" alt="" width="550" height="295.4918032786885" src="https://substackcdn.com/image/fetch/w_2684,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3afb7054-1aab-4699-bc5b-60211eb0e1d1_1342x721.png" style="border: none !important;vertical-align: middle;display: block;-ms-interpolation-mode: bicubic;height: auto;margin-bottom: 0;width: auto !important;max-width: 100% !important;margin: 0 auto;"></a></td><td style="text-align: center;"></td></tr></tbody></table></figure></div><h2 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.625em;">Why GBNF?</h2><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">Many real-world applications require LLM outputs in specific formats (e.g., JSON, XML) for seamless integration with existing systems or APIs. GBNF enables this without compromising the LLM's language understanding capabilities.</p><h2 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.625em;">Sample GBNF Implementation with llama.cpp:</h2><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">Now that we understand what GBNF is and why it's valuable, let's explore how it's implemented in practice. One notable framework that utilizes GBNF is llama.cpp. llama.cpp is a lightweight, portable C/C++ implementation is designed for efficient large language model inference across various hardware platforms, both locally and in the cloud.</p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">To illustrate GBNF's practical application with llama.cpp, let us look at an example, structuring a person's details in JSON format. We'll start by defining a GBNF grammar that outlines the expected structure. Below is the GBNF file with GBNF rules:</p><pre style="position: relative;background: #eeeeee;padding: 16px;margin: 32px 0;border-radius: 8px;box-sizing: border-box;"><code style="white-space: pre-wrap;font-size: 16px;line-height: 20px;font-weight: 500;">root ::= "{" ws pair (ws "," ws pair)* ws "}"
pair ::= string ws ":" ws value
string ::= "\"" ([a-zA-Z0-9_])+ "\""
value ::= string | number
number ::= [0-9]+
ws ::= [ \t\n]*</code></pre><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">While GBNF file format is useful for defining grammars, some users have reported parsing issues when reading these files with llama.cpp. As an alternative, you can define the grammar inline as a string in the code as below.</p><pre style="position: relative;background: #eeeeee;padding: 16px;margin: 32px 0;border-radius: 8px;box-sizing: border-box;"><code style="white-space: pre-wrap;font-size: 16px;line-height: 20px;font-weight: 500;">grammar_string = r"""root ::= "{" pair ("," pair)* "}"
pair ::= string ":" value
string ::= "\"" [a-zA-Z0-9_]+ "\""
value ::= string | number
number ::= [0-9]+"""</code></pre><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><span>If you have a JSON structure that you want to use as a template for your LLM's output, llama.cpp provides a </span><a href="https://substack.com/redirect/4fd42309-c310-4374-8303-9ab598c0f558?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" rel="" style="color: rgb(54, 55, 55);text-decoration: underline;">Python script</a><span> that can convert it into GBNF format. This script allows you to create GBNF grammars based on your JSON templates without manually writing the grammar rules.</span></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">The code snippet demonstrates how to use GBNF grammar with llama.cpp using its Python bindings.</p><pre style="position: relative;background: #eeeeee;padding: 16px;margin: 32px 0;border-radius: 8px;box-sizing: border-box;"><code style="white-space: pre-wrap;font-size: 16px;line-height: 20px;font-weight: 500;">from llama_cpp import Llama,LlamaGrammar
llm = Llama(model_path="./models/7B/llama-model.gguf")
my_grammar = LlamaGrammar.from_string(grammar_string, verbose=True)
prompt="Give me a person info"
output = llm(prompt,max_tokens=100,grammar=my_grammar)
output['choices'][0]['text']</code></pre><div class="pullquote" style="font-size: 16px;line-height: 26px;border-top: 1px solid #2b2832;border-bottom: 1px solid #2b2832;margin: 32px auto;"><p style="color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;margin: 32px 0;text-align: center;font-weight: 500;font-style: italic;"><span>About GGUF Model Format: The code uses a GGUF (GGML Universal File Format) file, which is the format supported by llama.cpp. GGUF files are designed for efficient storage of model weights and are optimized for inference. They support various quantization levels, allowing large language models to run efficiently on a wide range of hardware. In the code, the GGUF file is specified in the model_path parameter when initializing the Llama object. Check gguf files here:- </span><a href="https://substack.com/redirect/9a23dd84-179a-4bd7-bf60-91903d5c7e5b?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" rel="" style="color: rgb(54, 55, 55);text-decoration: underline;">Link</a></p></div><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">Without using the grammar string, the output is unstructured:</p><pre style="position: relative;background: #eeeeee;padding: 16px;margin: 32px 0;border-radius: 8px;box-sizing: border-box;"><code style="white-space: pre-wrap;font-size: 16px;line-height: 20px;font-weight: 500;">prompt="Give me a person info"
output = llm(prompt,max_tokens=100)
output['choices'][0]['text']
':\nAnna works with a Lab Centre and her age is 50 years and lives in Australia.\n Create a variable for each info.\n Use these variables to create the user.'</code></pre><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">When we apply the GBNF grammar, the output will be structured according to the defined rules, typically in a format like JSON or another specified structure.</p><pre style="position: relative;background: #eeeeee;padding: 16px;margin: 32px 0;border-radius: 8px;box-sizing: border-box;"><code style="white-space: pre-wrap;font-size: 16px;line-height: 20px;font-weight: 500;">prompt="Give me a person info"
output = llm(prompt,max_tokens=100,grammar=my_grammar)
output['choices'][0]['text']
'{"name":"Shayla","gender":"Female","age":"31","city":"Chicago","state":"IL"}'</code></pre><h2 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.625em;">GBNF Grammar Breakdown:- Components and Syntax</h2><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><strong>Rule Format</strong></p><ul style="margin-top: 0;padding: 0;"><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;">A: The left-hand side of the production rule is always a single non-terminal.</p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;">a: The first symbol on the right-hand side is always a single terminal.</p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;">α: The rest of the right-hand side can be any string of non-terminals, including the empty string.</p></li></ul><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">The following visual representation deconstructs our previously defined grammar, offering an intuitive breakdown of its core elements. This diagram provides a clear, at-a-glance understanding of the grammar's structure, simplifying complex concepts through color-coded components.</p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">GBNF Grammar used in above script:</p><div class="captioned-image-container-static" style="font-size: 16px;line-height: 26px;margin: 32px auto;"><figure style="width: 100%;margin: 0 auto;"><table class="image-wrapper" data-component-name="Image2ToDOMStatic" width="100%" border="0" cellspacing="0" cellpadding="0" style="mso-padding-alt: 1em 0 1.6em;"><tbody><tr><td style="text-align: center;"></td><td class="content" align="left" width="1260" style="text-align: center;"><a class="image-link" rel="" target="_blank" href="https://substack.com/redirect/f14b6169-0858-4d6b-836e-35274e84b570?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" style="position: relative;flex-direction: column;align-items: center;padding: 0;width: auto;height: auto;border: none;text-decoration: none;display: block;margin: 0;"><img class="wide-image" data-attrs="{"src":"https://substack-post-media.s3.amazonaws.com/public/images/69c9435f-2d6d-484c-ae4e-7ebfb83e879a_1260x519.png","srcNoWatermark":null,"fullscreen":null,"imageSize":null,"height":519,"width":1260,"resizeWidth":null,"bytes":73705,"alt":null,"title":null,"type":"image/png","href":null,"belowTheFold":true,"topImage":false,"internalRedirect":null,"isProcessing":false}" alt="" width="550" height="226.54761904761904" src="https://substackcdn.com/image/fetch/w_2520,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69c9435f-2d6d-484c-ae4e-7ebfb83e879a_1260x519.png" style="border: none !important;vertical-align: middle;display: block;-ms-interpolation-mode: bicubic;height: auto;margin-bottom: 0;width: auto !important;max-width: 100% !important;margin: 0 auto;"></a></td><td style="text-align: center;"></td></tr></tbody></table></figure></div><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><strong>Here's how the grammar rules shaped this result:</strong></p><ul style="margin-top: 0;padding: 0;"><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>root</code><span>: Outlines the overall structure (e.g., </span><code>{ "key":"value" }</code><span>).</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>pair</code><span>: Describes key-value pairs with a colon separator.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>value</code><span>: Allows flexibility (string or number).</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>string</code><strong>/</strong><code>number</code><span>: Specifies valid formats for keys and values.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>ws:</code><span> handles optional spaces for clean formatting.</span></p></li></ul><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">The GBNF grammar rules above illustrate how they effectively guided the LLM to generate a valid JSON object, maintaining consistent key-value formatting as defined in the grammar.</p><h3 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.375em;">Key Grammar Terms (Simplified)</h3><ul style="margin-top: 0;padding: 0;"><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Rule</strong><span>: Defines how a part of the output is built.</span><br><span>Example: </span><code>root ::= "{" pair ("," pair)* "}"</code></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Non-Terminal</strong><span>: A concept that can be expanded further, written in lowercase.</span><br><span>Examples: </span><code>root</code><span>, </span><code>pair</code><span>, </span><code>string</code></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Terminal</strong><span>: Fixed characters or strings in quotes, appearing in the output.</span><br><span>Examples: </span><code>"{"</code><span>, </span><code>","</code><span>, </span><code>":"</code></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Expression</strong><span>: The right-hand side of a rule explaining how to build the non-terminal.</span><br><span>Example: In </span><code>pair ::= string ":" value</code><span>, the expression is </span><code>string ":" value</code><span>.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Alternatives (</strong><code>|</code><strong>)</strong><span>: Offers options.</span><br><span>Example: </span><code>value ::= string | number</code><span>.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;"><strong>Repetition</strong><span>:</span></p><ul style="margin-top: 0;padding: 0;"><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>*</code><span> = Zero or more (e.g., </span><code>("," pair)*</code><span>)</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>+</code><span> = One or more</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><code>?</code><span> = Optional (zero or one)</span></p></li></ul></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Grouping (</strong><code>()</code><strong>)</strong><span>: Combines elements.</span><br><span>Example: </span><code>("," pair)*</code><span>.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Character Sets (</strong><code>[]</code><strong>)</strong><span>: Specifies allowed characters.</span><br><span>Example: </span><code>[a-zA-Z0-9_]</code><span>.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Root Rule</strong><span>: Defines the overall structure of the output.</span><br><span>Example: </span><code>root ::= "{" pair ("," pair)* "}"</code><span>.</span></p></li><li style="margin: 8px 0 0 32px;mso-special-format: bullet;"><p style="color: rgb(54, 55, 55);line-height: 26px;margin-bottom: 0;box-sizing: border-box;padding-left: 4px;font-size: 16px;margin: 0;"><strong>Whitespace (</strong><code>ws</code><strong>)</strong><span>: Allows optional spaces, tabs, or newlines.</span><br><span>Example: </span><code>ws ::= [ \t\n]*</code><span>.</span></p></li></ul><h2 class="header-anchor-post" style="position: relative;--highlight-bg: rgba(var(--color-bg-accent-themed-rgb), 0.2);font-family: 'SF Pro Display', -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';font-weight: bold;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: antialiased;-webkit-appearance: optimizelegibility;-moz-appearance: optimizelegibility;appearance: optimizelegibility;margin: 1em 0 0.625em 0;color: rgb(54, 55, 55);line-height: 1.16em;font-size: 1.625em;">Explore Further:</h2><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;">After understanding GBNF basics, practical implementation becomes key. For developers working with API responses, GBNF may be helpful to enforce strict JSON structure directly at the grammar level when generating responses from Large Language Models (LLMs).</p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><span>As already mentioned, Traditional approaches, like prompting with "Please respond in JSON format" may be promising but may fall short, as LLMs may overlook such instructions. GBNF is another area to help on this but yet to be explored more. It’s integration with tools like </span><strong>llama.cpp</strong><span> showcases practical implementations of this approach. </span></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"><span>Explore more on implementation : </span><a href="https://substack.com/redirect/884ef83c-c42d-43db-8a6b-07984a6daa8c?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" rel="" style="color: rgb(54, 55, 55);text-decoration: underline;">GitHub - llama.cpp grammars</a><span>.</span></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;"></p><p style="margin: 0 0 20px 0;color: rgb(54, 55, 55);line-height: 26px;font-size: 16px;margin-bottom: 0;"></p></div></div><div class="postscript-placeholder" style="margin: 32px 0 0;width: 100%;box-sizing: border-box;font-size: 16px;line-height: 26px;"></div><table class="email-ufi-2-bottom" role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 1px solid rgb(0, 0, 0, .1);border-bottom: 1px solid rgb(0, 0, 0, .1);min-width: 100%;"><tbody><tr height="16"><td height="16" style="font-size:0px;line-height:0;"> </td></tr><tr><td><table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0" style="margin:0 auto;"><tbody><tr><td style="vertical-align:middle;"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-button-outline" href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=substack&isFreemail=true&submitLike=true&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwicmVhY3Rpb24iOiLinaQiLCJpYXQiOjE3MzIyNzgxODUsImV4cCI6MTczNDg3MDE4NSwiaXNzIjoicHViLTgxNzUwIiwic3ViIjoicmVhY3Rpb24ifQ.kQKhOjvKFj7FNhzWJGlX_1e1LJYUVFStV-hZG40CVBw&utm_medium=email&utm_campaign=email-reaction&r=4np3c0" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 12px;padding: 9px 14px;text-decoration: none;color: rgb(119, 119, 119);"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideHeart%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="margin-right: 8px;min-width: 18px;min-height: 18px;border: none;vertical-align: middle;max-width: 18px" alt=""><span class="email-button-text" style="vertical-align: middle;">Like</span></a></td></tr></tbody></table></td><td width="8" style="min-width: 8px"></td><td style="vertical-align:middle;"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-button-outline" href="https://substack.com/app-link/post?publication_id=81750&post_id=150709740&utm_source=substack&utm_medium=email&isFreemail=true&comments=true&token=eyJ1c2VyX2lkIjoyODE2NjY1OTIsInBvc3RfaWQiOjE1MDcwOTc0MCwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi04MTc1MCIsInN1YiI6InBvc3QtcmVhY3Rpb24ifQ.lC2NomCT2R8kmn7BH1UBAioZfG8k4eIxmNPl3V0kATM&r=4np3c0&utm_campaign=email-half-magic-comments&action=post-comment&utm_source=substack&utm_medium=email" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 12px;padding: 9px 14px;text-decoration: none;color: rgb(119, 119, 119);"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FLucideComments%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="margin-right: 8px;min-width: 18px;min-height: 18px;border: none;vertical-align: middle;max-width: 18px" alt=""><span class="email-button-text" style="vertical-align: middle;">Comment</span></a></td></tr></tbody></table></td><td width="8" style="min-width: 8px"></td><td style="vertical-align:middle;"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td align="center"><a class="email-button-outline" href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly9vcGVuLnN1YnN0YWNrLmNvbS9wdWIvZGV2c2hvcnRzL3AvZ2JuZmdnbWwtYm5mLWV4cGxhaW5lZC1hbi1hcHByb2FjaD91dG1fc291cmNlPXN1YnN0YWNrJnV0bV9tZWRpdW09ZW1haWwmdXRtX2NhbXBhaWduPWVtYWlsLXJlc3RhY2stY29tbWVudCZhY3Rpb249cmVzdGFjay1jb21tZW50JnI9NG5wM2MwJnRva2VuPWV5SjFjMlZ5WDJsa0lqb3lPREUyTmpZMU9USXNJbkJ2YzNSZmFXUWlPakUxTURjd09UYzBNQ3dpYVdGMElqb3hOek15TWpjNE1UZzFMQ0psZUhBaU9qRTNNelE0TnpBeE9EVXNJbWx6Y3lJNkluQjFZaTA0TVRjMU1DSXNJbk4xWWlJNkluQnZjM1F0Y21WaFkzUnBiMjRpZlEubEMyTm9tQ1QyUjhrbW43QkgxVUJBaW9aZkc4azRlSXhtTlBsM1Ywa0FUTSIsInAiOjE1MDcwOTc0MCwicyI6ODE3NTAsImYiOnRydWUsInUiOjI4MTY2NjU5MiwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi0wIiwic3ViIjoibGluay1yZWRpcmVjdCJ9.XJAjFgmcK9MLe6dHxU1EbGema6scD4pIYpeoAUBMV2o?&utm_source=substack&utm_medium=email" style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';display: inline-block;font-weight: 500;border: 1px solid rgb(0, 0, 0, .1);border-radius: 9999px;text-transform: uppercase;font-size: 12px;line-height: 12px;padding: 9px 14px;text-decoration: none;color: rgb(119, 119, 119);"><img class="icon" src="https://substackcdn.com/image/fetch/w_36,c_scale,f_png,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Ficon%2FNoteForwardIcon%3Fv%3D4%26height%3D36%26fill%3Dnone%26stroke%3D%2523808080%26strokeWidth%3D2" width="18" height="18" style="margin-right: 8px;min-width: 18px;min-height: 18px;border: none;vertical-align: middle;max-width: 18px" alt=""><span class="email-button-text" style="vertical-align: middle;">Restack</span></a></td></tr></tbody></table></td></tr></tbody></table></td><td align="right"><table role="presentation" width="auto" border="0" cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></td></tr></tbody></table></td></tr><tr height="16"><td height="16" style="font-size:0px;line-height:0;"> </td></tr></tbody></table><div class="footer _footer_11ym1_1" style="color: rgb(119, 119, 119);text-align: center;font-size: 16px;line-height: 26px;padding: 24px 0;"><div style="font-size: 16px;line-height: 26px;padding-bottom: 24px"><p class="pencraft pc-reset _color-secondary_h3mln_169 _size-12_h3mln_35 _reset_h3mln_1 small _meta_11ym1_14" style="list-style: none;font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';padding-bottom: 0;font-size: 12px;line-height: 16px;margin: 0;color: rgb(119, 119, 119);text-decoration: unset;">© 2024 <span>Aravind Putrevu</span><br>3543 BN, Utrecht, Netherlands <br><a href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly93d3cuZGV2c2hvcnRzLmluL2FjdGlvbi9kaXNhYmxlX2VtYWlsP3Rva2VuPWV5SjFjMlZ5WDJsa0lqb3lPREUyTmpZMU9USXNJbkJ2YzNSZmFXUWlPakUxTURjd09UYzBNQ3dpYVdGMElqb3hOek15TWpjNE1UZzFMQ0psZUhBaU9qRTNOak00TVRReE9EVXNJbWx6Y3lJNkluQjFZaTA0TVRjMU1DSXNJbk4xWWlJNkltUnBjMkZpYkdWZlpXMWhhV3dpZlEuOG5teEN0Vzg3NlRpZnhmYzQ0bGNyNW9MM2RvcVo2MnkyTkV2YkxoSnpDYyIsInAiOjE1MDcwOTc0MCwicyI6ODE3NTAsImYiOnRydWUsInUiOjI4MTY2NjU5MiwiaWF0IjoxNzMyMjc4MTg1LCJleHAiOjE3MzQ4NzAxODUsImlzcyI6InB1Yi0wIiwic3ViIjoibGluay1yZWRpcmVjdCJ9.LpjiP6Q6qfzZ2XjQMvtNDqiiO3Q2-Weal-kfm_lmDeM?" style="text-decoration: underline;color: rgb(119, 119, 119);"><span style="color: rgb(119, 119, 119);text-decoration: underline;">Unsubscribe</span></a></p></div><p class="_footerSection_11ym1_5 small powered-by-substack" style="padding: 0 24px;font-size: 12px;line-height: 20px;margin: 0;color: rgb(119, 119, 119);font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';padding-bottom: 0;margin-top: 0;"><a href="https://substack.com/redirect/2ae62e68-2bd8-435b-b9e6-4d2bb8ef700c?j=eyJ1IjoiNG5wM2MwIn0.fgYMQxm_bMUPGBi586SuBifZTGGQNdX5geZ4b-C6ELE" style="color: rgb(119, 119, 119);text-decoration: none;display: inline-block;margin: 0 4px;"><img src="https://substackcdn.com/image/fetch/w_262,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fgeneric-app-button%402x.png" srcset="https://substackcdn.com/image/fetch/w_131,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fgeneric-app-button.png, https://substackcdn.com/image/fetch/w_262,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fgeneric-app-button%402x.png 2x, https://substackcdn.com/image/fetch/w_393,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fgeneric-app-button%403x.png 3x" width="131" alt="Get the app" height="40" style="max-width: 550px;border: none !important;vertical-align: middle;"></a><a href="https://substack.com/redirect/2/eyJlIjoiaHR0cHM6Ly9zdWJzdGFjay5jb20vc2lnbnVwP3V0bV9zb3VyY2U9c3Vic3RhY2smdXRtX21lZGl1bT1lbWFpbCZ1dG1fY29udGVudD1mb290ZXImdXRtX2NhbXBhaWduPWF1dG9maWxsZWQtZm9vdGVyJmZyZWVTaWdudXBFbWFpbD1saWJyZW9mZmljZUBsaXN0cy5mcmVlZGVza3RvcC5vcmcmcj00bnAzYzAiLCJwIjoxNTA3MDk3NDAsInMiOjgxNzUwLCJmIjp0cnVlLCJ1IjoyODE2NjY1OTIsImlhdCI6MTczMjI3ODE4NSwiZXhwIjoxNzM0ODcwMTg1LCJpc3MiOiJwdWItMCIsInN1YiI6ImxpbmstcmVkaXJlY3QifQ.dbLbFf9Pb_nqGTIzkePDMMaDR3NgDX3fKOVSZz9j-AU?" style="color: rgb(119, 119, 119);text-decoration: none;display: inline-block;margin: 0 4px;"><img src="https://substackcdn.com/image/fetch/w_270,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fpublish-button%402x.png" srcset="https://substackcdn.com/image/fetch/w_135,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fpublish-button.png, https://substackcdn.com/image/fetch/w_270,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fpublish-button%402x.png 2x, https://substackcdn.com/image/fetch/w_405,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Femail%2Fpublish-button%403x.png 3x" width="135" alt="Start writing" height="40" style="max-width: 550px;border: none !important;vertical-align: middle;"></a></p></div></div></td><td></td></tr></tbody></table><img src="https://eotrx.substackcdn.com/open?token=eyJtIjoiPDIwMjQxMTIyMTIyMjU5LjMuMTgxMmI4ZWYyZjA5MjlkNEBtZy1kMS5zdWJzdGFjay5jb20-IiwidSI6MjgxNjY2NTkyLCJyIjoibGlicmVvZmZpY2VAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwiZCI6Im1nLWQxLnN1YnN0YWNrLmNvbSIsInAiOjE1MDcwOTc0MCwidCI6Im5ld3NsZXR0ZXIiLCJhIjoiZXZlcnlvbmUiLCJzIjo4MTc1MCwiYyI6InBvc3QiLCJmIjp0cnVlLCJwb3NpdGlvbiI6ImJvdHRvbSIsImlhdCI6MTczMjI3ODE4NSwiZXhwIjoxNzM0ODcwMTg1LCJpc3MiOiJwdWItMCIsInN1YiI6ImVvIn0.4V9ZYqlZIXvwzcMSlO1ygEuefWWpBpf9XjnOiGwXsfE" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/><img width="1px" height="1px" alt="" src="https://email.mg-d1.substack.com/o/eJw8kEuO5CAQBU_T7MYi02BgwVksPmk3ahssPjXy7UeeKvU2nhQKveA67aXe9iqts2hn47kOCyMLakZUGgxndLp0rDtlqq5TXF3_XbUUy8y-LQkQtHiNysAGWksZhAYPQQavlAOWLHIUAIiAiNJM8wQa0GvacOMGTRRfgp_7nwhTG751F36mUE6W2rpV-p9gex3EntLVjZgoB7L0onqX_MEpWpBccaMEf5N-X2Qz_W0H9U6VXcOvoZznyKnfK2XnD4of8fBHCq6nkh-RBiU5q_ZIvlLZthToS_Ajtd6mpyhS--nlmkrdWRs-ltOlbCO92nepvbH-_nQ0qo8ONSzLIg2yl8V_AQAA___jFXx3"></body></html>