5:"$Sreact.fragment" 6:I[7192,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","177","static/chunks/app/layout-e2605612ca64d1d4.js"],"ThemeProvider"] 7:I[3306,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"Sheet"] 8:I[3306,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"SheetTrigger"] 9:I[3306,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"SheetContent"] a:I[3569,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"DialogTitle"] b:I[3306,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"SheetHeader"] c:I[3306,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"SheetClose"] d:I[459,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","686","static/chunks/686-b7d2cd287b15961f.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","32","static/chunks/32-fc39ad8e07d133c3.js","870","static/chunks/app/docs/%5B%5B...slug%5D%5D/page-30c266826d66b2cc.js"],""] e:I[3115,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"default"] f:I[5218,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"default"] 10:I[8986,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"default"] 11:I[6658,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","356","static/chunks/356-d1f63c392b75ec65.js","763","static/chunks/763-0f277b20cff78e1f.js","499","static/chunks/app/docs/layout-763aaf626694b420.js"],"ModeToggle"] 12:I[6312,[],""] 13:I[9417,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","39","static/chunks/app/error-05a83bd475a75953.js"],"default"] 14:I[958,[],""] 15:I[4548,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","686","static/chunks/686-b7d2cd287b15961f.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","32","static/chunks/32-fc39ad8e07d133c3.js","870","static/chunks/app/docs/%5B%5B...slug%5D%5D/page-30c266826d66b2cc.js"],"ScrollArea"] 17:I[4969,[],"OutletBoundary"] 19:I[4969,[],"MetadataBoundary"] 1b:I[4969,[],"ViewportBoundary"] 1d:I[647,[],""] 1:HL["/_next/static/media/7ab9c4cba5a6d4c2-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 2:HL["/_next/static/media/fc727f226c737876-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] 3:HL["/_next/static/css/0790576569b8c287.css","style"] 4:HL["/_next/static/css/2a797d424d7a344c.css","style"] 0:{"P":null,"b":"wX-EG0lj4TM92v30RFng-","p":"","c":["","docs","getting-started","guide","systems"],"i":false,"f":[[["",{"children":["docs",{"children":[["slug","getting-started/guide/systems","oc"],{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$5","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/0790576569b8c287.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/2a797d424d7a344c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","link",null,{"rel":"stylesheet","type":"text/css","href":"https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css"}]}],["$","body",null,{"className":"__variable_b3b596 __variable_33c22e font-regular antialiased tracking-wide","suppressHydrationWarning":true,"children":["$","$L6",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":[["$","nav",null,{"className":"w-full border-b h-16 sticky top-0 z-50 bg-background","children":["$","div",null,{"className":"sm:container mx-auto w-[95vw] h-full flex items-center sm:justify-between md:gap-2","children":[["$","div",null,{"className":"flex items-center sm:gap-5 gap-2.5","children":[["$","$L7",null,{"children":[["$","$L8",null,{"asChild":true,"children":["$","button",null,{"className":"items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 w-9 md:hidden flex","ref":"$undefined","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-align-left","children":[["$","line","1fp77t",{"x1":"21","x2":"3","y1":"6","y2":"6"}],["$","line","v6grx8",{"x1":"15","x2":"3","y1":"12","y2":"12"}],["$","line","1awlsn",{"x1":"17","x2":"3","y1":"18","y2":"18"}],"$undefined"]}]}]}],["$","$L9",null,{"className":"flex flex-col gap-4 px-0","side":"left","children":[["$","$La",null,{"className":"sr-only","children":"Menu"}],["$","$Lb",null,{"children":["$","$Lc",null,{"className":"px-5","asChild":true,"children":["$","$Ld",null,{"href":"/","className":"flex items-center gap-2.5","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-radius w-6 h-6 text-muted-foreground","children":[["$","path","fydyku",{"d":"M20.34 17.52a10 10 0 1 0-2.82 2.82"}],["$","circle","17f5cg",{"cx":"19","cy":"19","r":"2"}],["$","path","1gqbwc",{"d":"m13.41 13.41 4.18 4.18"}],["$","circle","1c9p78",{"cx":"12","cy":"12","r":"2"}],"$undefined"]}],["$","h2",null,{"className":"text-md font-bold font-code","children":"Optimas"}]]}]}]}],["$","div",null,{"className":"flex flex-col gap-4 overflow-y-auto","children":[["$","div",null,{"className":"flex flex-col gap-2.5 mt-3 mx-2 px-5","children":[["$","$Lc","Documentation/docs/getting-started/introduction",{"asChild":true,"children":["$","$Le","Documentation/docs/getting-started/introduction",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/docs/getting-started/introduction","children":"Documentation"}]}],["$","$Lc","Blogs/blogs",{"asChild":true,"children":["$","$Le","Blogs/blogs",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/blogs","children":"Blogs"}]}],["$","$Lc","GitHubhttps://github.com/snap-stanford/optimas",{"asChild":true,"children":["$","$Le","GitHubhttps://github.com/snap-stanford/optimas",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"https://github.com/snap-stanford/optimas","children":"GitHub"}]}],["$","$Lc","Team/team",{"asChild":true,"children":["$","$Le","Team/team",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/team","children":"Team"}]}]]}],["$","div",null,{"className":"ml-2 pl-5","children":["$","$Lf",null,{"isSheet":true}]}],["$","div",null,{"className":"p-6 pb-4 flex gap-2.5","children":"$undefined"}]]}]]}]]}],["$","div",null,{"className":"flex items-center gap-6","children":[["$","div",null,{"className":"lg:flex hidden","children":["$","$Ld",null,{"href":"/","className":"flex items-center gap-2.5","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-radius w-6 h-6 text-muted-foreground","children":[["$","path","fydyku",{"d":"M20.34 17.52a10 10 0 1 0-2.82 2.82"}],["$","circle","17f5cg",{"cx":"19","cy":"19","r":"2"}],["$","path","1gqbwc",{"d":"m13.41 13.41 4.18 4.18"}],["$","circle","1c9p78",{"cx":"12","cy":"12","r":"2"}],"$undefined"]}],["$","h2",null,{"className":"text-md font-bold font-code","children":"Optimas"}]]}]}],["$","div",null,{"className":"md:flex hidden items-center gap-4 text-sm font-medium text-muted-foreground","children":[["$","$Le","Documentation/docs/getting-started/introduction",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/docs/getting-started/introduction","children":"Documentation"}],["$","$Le","Blogs/blogs",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/blogs","children":"Blogs"}],["$","$Le","GitHubhttps://github.com/snap-stanford/optimas",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"https://github.com/snap-stanford/optimas","children":"GitHub"}],["$","$Le","Team/team",{"activeClassName":"!text-primary dark:font-medium font-semibold","absolute":true,"className":"flex items-center gap-1 sm:text-sm text-[14.5px] dark:text-stone-300/85 text-stone-800","href":"/team","children":"Team"}]]}]]}]]}],["$","div",null,{"className":"flex items-center sm:justify-normal justify-between sm:gap-3 ml-1 sm:w-fit w-[90%]","children":[["$","$L10",null,{"appId":"$undefined","indexName":"$undefined","apiKey":"$undefined"}],["$","div",null,{"className":"flex items-center justify-between sm:gap-2","children":["$","div",null,{"className":"flex ml-4 sm:ml-0","children":[["$","$Ld",null,{"href":"https://x.com/ShirleyYXWu/status/1943325591190593983","className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 w-9","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-twitter h-[1.1rem] w-[1.1rem]","children":[["$","path","pff0z6",{"d":"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z"}],"$undefined"]}]}],["$","$Ld",null,{"href":"https://www.linkedin.com/feed/update/urn:li:activity:7349090121251504128/","className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 w-9","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-linkedin h-[1.1rem] w-[1.1rem]","children":[["$","path","c2jq9f",{"d":"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}],["$","rect","mk3on5",{"width":"4","height":"12","x":"2","y":"9"}],["$","circle","bt5ra8",{"cx":"4","cy":"4","r":"2"}],"$undefined"]}]}],["$","$Ld",null,{"href":"mailto:shirwu@cs.stanford.edu","className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 w-9","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-mail h-[1.1rem] w-[1.1rem]","children":[["$","rect","18n3k1",{"width":"20","height":"16","x":"2","y":"4","rx":"2"}],["$","path","1ocrg3",{"d":"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}],"$undefined"]}]}],["$","$L11",null,{}]]}]}]]}]]}]}],["$","main",null,{"className":"sm:container mx-auto w-[90vw] h-auto scroll-smooth","children":["$","$L12",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$13","errorStyles":[],"errorScripts":[],"template":["$","$L14",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","div",null,{"className":"min-h-[87vh] px-2 sm:py-28 py-36 flex flex-col gap-4 items-center","children":[["$","div",null,{"className":"text-center flex flex-col items-center justify-center w-fit gap-2","children":[["$","h2",null,{"className":"text-7xl font-bold pr-1","children":"404"}],["$","p",null,{"className":"text-muted-foreground text-md font-medium","children":["Page not found ",":("]}],["$","p",null,{"children":"Oops! The page you're looking for doesn't exist."}]]}],["$","$Ld",null,{"href":"/","className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 py-2","children":"Back to homepage"}]]}],"notFoundStyles":[]}]}],["$","footer",null,{"className":"border-t w-full h-16","children":["$","div",null,{"className":"container flex items-center sm:justify-between justify-center sm:gap-0 gap-4 h-full text-muted-foreground text-sm flex-wrap sm:py-0 py-3 max-sm:px-4","children":[["$","div",null,{"className":"flex items-center gap-3","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-radius sm:block hidden w-5 h-5 text-muted-foreground","children":[["$","path","fydyku",{"d":"M20.34 17.52a10 10 0 1 0-2.82 2.82"}],["$","circle","17f5cg",{"cx":"19","cy":"19","r":"2"}],["$","path","1gqbwc",{"d":"m13.41 13.41 4.18 4.18"}],["$","circle","1c9p78",{"cx":"12","cy":"12","r":"2"}],"$undefined"]}],["$","p",null,{"className":"text-center","children":["Build by"," ",["$","$Ld",null,{"className":"px-1 underline underline-offset-2","href":"/team","children":"Optimas team."}]]}]]}],["$","div",null,{"className":"gap-4 items-center hidden md:flex","children":"$undefined"}]]}]}]]}]}]]}]]}],{"children":["docs",["$","$5","c",{"children":[null,["$","div",null,{"className":"flex items-start gap-8","children":[["$","aside","leftbar",{"className":"md:flex hidden w-[20rem] sticky top-16 flex-col h-[93.75vh] overflow-y-auto","children":["$","$L15",null,{"className":"py-4 px-2","children":["$","$Lf",null,{}]}]}],["$","div",null,{"className":"flex-[5.25]","children":["$","$L12",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L14",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]}]]}]]}],{"children":[["slug","getting-started/guide/systems","oc"],["$","$5","c",{"children":[null,["$","$L12",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","$0:f:0:1:2:children:2:children:0","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L14",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]]}],{"children":["__PAGE__",["$","$5","c",{"children":["$L16",null,["$","$L17",null,{"children":"$L18"}]]}],{},null]},null]},null]},null],["$","$5","h",{"children":[null,["$","$5","cFGGUJibiJ7Zp0dQBA_z6",{"children":[["$","$L19",null,{"children":"$L1a"}],["$","$L1b",null,{"children":"$L1c"}],["$","meta",null,{"name":"next-size-adjust"}]]}]]}]]],"m":"$undefined","G":["$1d","$undefined"],"s":false,"S":true} 1c:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 1e:I[2500,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","686","static/chunks/686-b7d2cd287b15961f.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","32","static/chunks/32-fc39ad8e07d133c3.js","870","static/chunks/app/docs/%5B%5B...slug%5D%5D/page-30c266826d66b2cc.js"],"default"] 16:["$","div",null,{"className":"flex items-start gap-10","children":[["$","div",null,{"className":"flex-[4.5] py-10 mx-auto","children":["$","div",null,{"className":"w-full mx-auto","children":[["$","div",null,{"className":"pb-5","children":["$","nav",null,{"ref":"$undefined","aria-label":"breadcrumb","children":["$","ol",null,{"ref":"$undefined","className":"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5","children":[["$","li",null,{"ref":"$undefined","className":"inline-flex items-center gap-1.5","children":["$","a",null,{"ref":"$undefined","className":"transition-colors hover:text-foreground","children":"Docs"}]}],[["$","$5","getting-started",{"children":[["$","li",null,{"role":"presentation","aria-hidden":"true","className":"[&>svg]:size-3.5","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]}],["$","li",null,{"ref":"$undefined","className":"inline-flex items-center gap-1.5","children":["$","a",null,{"ref":"$undefined","className":"transition-colors hover:text-foreground a","children":"Getting Started"}]}]]}],["$","$5","guide",{"children":[["$","li",null,{"role":"presentation","aria-hidden":"true","className":"[&>svg]:size-3.5","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]}],["$","li",null,{"ref":"$undefined","className":"inline-flex items-center gap-1.5","children":["$","a",null,{"ref":"$undefined","className":"transition-colors hover:text-foreground a","children":"Guide"}]}]]}],["$","$5","systems",{"children":[["$","li",null,{"role":"presentation","aria-hidden":"true","className":"[&>svg]:size-3.5","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]}],["$","li",null,{"ref":"$undefined","className":"inline-flex items-center gap-1.5","children":["$","span",null,{"ref":"$undefined","role":"link","aria-disabled":"true","aria-current":"page","className":"font-normal text-foreground b","children":"Systems"}]}]]}]]]}]}]}],["$","div",null,{"className":"prose sm:prose-base prose-sm prose-zinc dark:prose-invert prose-code:font-normal prose-code:font-code dark:prose-code:bg-stone-900/25 prose-code:bg-stone-50 prose-pre:bg-background prose-headings:scroll-m-20 w-[85vw] sm:w-full sm:mx-auto prose-code:text-sm prose-code:leading-6 dark:prose-code:text-white prose-code:text-stone-800 prose-code:p-[0.085rem] prose-code:rounded-md prose-code:border pt-2 !min-w-full prose-img:rounded-md prose-img:border prose-code:before:content-none prose-code:after:content-none prose-code:px-1.5 prose-code:overflow-x-auto !max-w-[500px] prose-img:my-3 prose-h2:my-4 prose-h2:mt-8 prose-code:break-all md:prose-code:break-normal prose-td:px-4","children":[["$","h1",null,{"className":"sm:text-3xl text-2xl !-mt-0.5","children":"Build Systems"}],["$","p",null,{"className":"-mt-4 text-muted-foreground sm:text-[16.5px] text-[14.5px]","children":"Combine components into an evaluable, optimizable system."}],["$","div",null,{"children":[["$","h2",null,{"id":"define-a-system","children":[["$","$Ld",null,{"href":"#define-a-system","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"Define a System"]}],"\n",["$","p",null,{"children":["Systems, inherited from ",["$","$Ld",null,{"href":"https://github.com/snap-stanford/optimas/blob/main/optimas/arch/system.py","children":["$","code",null,{"children":"CompoundAISystem"}],"target":"_blank","rel":"noopener noreferrer"}],", are the core abstraction in Optimas that organize a set of components. A system is constructed by declaring its components, specifying their input/output dependencies, defining the final output and ground truth fields, and providing an evaluation function."]}],"\n",["$","p",null,{"children":"Required Fields:"}],"\n",["$","div",null,{"className":"relative max-w-full overflow-auto","children":["$","table",null,{"ref":"$undefined","className":"w-full caption-bottom text-sm","children":[["$","thead",null,{"ref":"$undefined","className":"[&_tr]:border-b","children":["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","th",null,{"ref":"$undefined","className":"h-12 !px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0","children":"Argument"}],["$","th",null,{"ref":"$undefined","className":"h-12 !px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0","children":"Type"}],["$","th",null,{"ref":"$undefined","className":"h-12 !px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0","children":"Description"}]]}]}],["$","tbody",null,{"ref":"$undefined","className":"[&_tr:last-child]:border-0","children":[["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"components"}]}],["$","td",null,{"children":["$","code",null,{"children":"Dict[str, BaseComponent]"}]}],["$","td",null,{"children":"Dictionary mapping names to component instances"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"final_output_fields"}]}],["$","td",null,{"children":["$","code",null,{"children":"List[str]"}]}],["$","td",null,{"children":"Names of the fields returned during inference"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"ground_fields"}]}],["$","td",null,{"children":["$","code",null,{"children":"List[str]"}]}],["$","td",null,{"children":"Names of the reference fields used for evaluation"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"eval_func"}]}],["$","td",null,{"children":["$","code",null,{"children":"Callable"}]}],["$","td",null,{"children":"Function accepting all final + ground fields as named arguments and returning a float score"}]]}]]}]]}]}],"\n",["$","p",null,{"children":["$","strong",null,{"children":"Abstract Example:"}]}],"\n",["$","div",null,{"className":"my-5 relative group","children":[["$","div",null,{"className":"absolute top-3 right-2.5 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-200","children":["$","$L1e",null,{"content":"from optimas.arch.system import CompoundAISystem\n\nsystem = CompoundAISystem(\n components={\n \"router\": ModelRouterComponent(...),\n \"analyst\": AnalystComponent(...),\n \"retriever\": RetrieverComponent(...),\n \"generator\": GeneratorComponent(...),\n },\n final_output_fields=[\"answer\"],\n ground_fields=[\"groundtruth\"],\n eval_func=exact_match,\n max_sample_workers=4, \n max_eval_workers=4\n)\n"}]}],["$","div",null,{"className":"relative","children":["$","pre",null,{"className":"language-python","children":["$","code",null,{"className":"language-python code-highlight","children":[["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token keyword","children":"from"}]," optimas",["$","span",null,{"className":"token punctuation","children":"."}],"arch",["$","span",null,{"className":"token punctuation","children":"."}],"system ",["$","span",null,{"className":"token keyword","children":"import"}]," CompoundAISystem\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":["system ",["$","span",null,{"className":"token operator","children":"="}]," CompoundAISystem",["$","span",null,{"className":"token punctuation","children":"("}],"\n"]}],["$","span",null,{"className":"code-line","children":[" components",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token punctuation","children":"{"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"router\""}],["$","span",null,{"className":"token punctuation","children":":"}]," ModelRouterComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"analyst\""}],["$","span",null,{"className":"token punctuation","children":":"}]," AnalystComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"retriever\""}],["$","span",null,{"className":"token punctuation","children":":"}]," RetrieverComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"generator\""}],["$","span",null,{"className":"token punctuation","children":":"}]," GeneratorComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token punctuation","children":"}"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" final_output_fields",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token punctuation","children":"["}],["$","span",null,{"className":"token string","children":"\"answer\""}],["$","span",null,{"className":"token punctuation","children":"]"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ground_fields",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token punctuation","children":"["}],["$","span",null,{"className":"token string","children":"\"groundtruth\""}],["$","span",null,{"className":"token punctuation","children":"]"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" eval_func",["$","span",null,{"className":"token operator","children":"="}],"exact_match",["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" max_sample_workers",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token number","children":"4"}],["$","span",null,{"className":"token punctuation","children":","}]," \n"]}],["$","span",null,{"className":"code-line","children":[" max_eval_workers",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token number","children":"4"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}]]}]}]}]]}],"\n",["$","h3",null,{"id":"1-provide-components","children":[["$","$Ld",null,{"href":"#1-provide-components","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"(1) Provide Components"]}],"\n",["$","p",null,{"children":"You should provide a dictionary mapping names to component instances. Each component declares its input and output fields. The system automatically infers execution order based on field dependencies."}],"\n",["$","div",null,{"className":"my-5 relative group","children":[["$","div",null,{"className":"absolute top-3 right-2.5 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-200","children":["$","$L1e",null,{"content":"components = {\n \"router\": ModelRouterComponent(), # chooses among models\n \"analyst\": AnalystComponent(), # uses optimizable prompt\n \"retriever\": RetrieverComponent(), # uses optimizable top-k\n \"generator\": GeneratorComponent(), # uses optimizable model parameters\n}\n"}]}],["$","div",null,{"className":"relative","children":["$","pre",null,{"className":"language-python","children":["$","code",null,{"className":"language-python code-highlight","children":[["$","span",null,{"className":"code-line","children":["components ",["$","span",null,{"className":"token operator","children":"="}]," ",["$","span",null,{"className":"token punctuation","children":"{"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"router\""}],["$","span",null,{"className":"token punctuation","children":":"}]," ModelRouterComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}]," ",["$","span",null,{"className":"token comment","children":"# chooses among models"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"analyst\""}],["$","span",null,{"className":"token punctuation","children":":"}]," AnalystComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}]," ",["$","span",null,{"className":"token comment","children":"# uses optimizable prompt"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"retriever\""}],["$","span",null,{"className":"token punctuation","children":":"}]," RetrieverComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}]," ",["$","span",null,{"className":"token comment","children":"# uses optimizable top-k"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token string","children":"\"generator\""}],["$","span",null,{"className":"token punctuation","children":":"}]," GeneratorComponent",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}]," ",["$","span",null,{"className":"token comment","children":"# uses optimizable model parameters"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token punctuation","children":"}"}],"\n"]}]]}]}]}]]}],"\n",["$","h3",null,{"id":"2-specify-evaluation-function","children":[["$","$Ld",null,{"href":"#2-specify-evaluation-function","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"(2) Specify Evaluation Function"]}],"\n",["$","p",null,{"children":["The ",["$","code",null,{"children":"eval_func"}]," receives all ",["$","code",null,{"children":"final_output_fields"}]," and ",["$","code",null,{"children":"ground_fields"}]," as named arguments. These fields must be strings or values convertible to evaluation-compatible types."]}],"\n",["$","div",null,{"className":"my-5 relative group","children":[["$","div",null,{"className":"absolute top-3 right-2.5 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-200","children":["$","$L1e",null,{"content":"final_output_fields = [\"answer\"] # subset of system outputs\nground_fields = [\"groundtruth\"] # reference labels provided in the Example object\n\ndef exact_match(answer, groundtruth):\n return float(answer.strip().lower() == groundtruth.strip().lower())\n"}]}],["$","div",null,{"className":"relative","children":["$","pre",null,{"className":"language-python","children":["$","code",null,{"className":"language-python code-highlight","children":[["$","span",null,{"className":"code-line","children":["final_output_fields ",["$","span",null,{"className":"token operator","children":"="}]," ",["$","span",null,{"className":"token punctuation","children":"["}],["$","span",null,{"className":"token string","children":"\"answer\""}],["$","span",null,{"className":"token punctuation","children":"]"}]," ",["$","span",null,{"className":"token comment","children":"# subset of system outputs"}],"\n"]}],["$","span",null,{"className":"code-line","children":["ground_fields ",["$","span",null,{"className":"token operator","children":"="}]," ",["$","span",null,{"className":"token punctuation","children":"["}],["$","span",null,{"className":"token string","children":"\"groundtruth\""}],["$","span",null,{"className":"token punctuation","children":"]"}]," ",["$","span",null,{"className":"token comment","children":"# reference labels provided in the Example object"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token keyword","children":"def"}]," ",["$","span",null,{"className":"token function","children":"exact_match"}],["$","span",null,{"className":"token punctuation","children":"("}],"answer",["$","span",null,{"className":"token punctuation","children":","}]," groundtruth",["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":":"}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token keyword","children":"return"}]," ",["$","span",null,{"className":"token builtin","children":"float"}],["$","span",null,{"className":"token punctuation","children":"("}],"answer",["$","span",null,{"className":"token punctuation","children":"."}],"strip",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":"."}],"lower",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}]," ",["$","span",null,{"className":"token operator","children":"=="}]," groundtruth",["$","span",null,{"className":"token punctuation","children":"."}],"strip",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":"."}],"lower",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}]]}]}]}]]}],"\n",["$","hr",null,{}],"\n",["$","h2",null,{"id":"examples","children":[["$","$Ld",null,{"href":"#examples","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"Examples"]}],"\n",["$","h3",null,{"id":"forward-pass","children":[["$","$Ld",null,{"href":"#forward-pass","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"Forward Pass"]}],"\n",["$","div",null,{"className":"my-5 relative group","children":[["$","div",null,{"className":"absolute top-3 right-2.5 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-200","children":["$","$L1e",null,{"content":"from optimas.wrappers.example import Example\n\n# Define a single evaluation example\nexample = Example(\n question=\"Summarize the legal implications of the Paris Agreement for EU environmental policy.\",\n gd_answer=\"The Paris Agreement influences EU climate law by mandating national legislation aligned with long-term carbon neutrality.\"\n)\n\n# Run a forward pass through the system\nprediction = system(**example)\n\n# View the structured prediction and trajectory\nprint(prediction)\n# Prediction(\n# answer=\"It is a legal framework that sets out commitments for reducing greenhouse gas emissions and enhancing climate resilience.\",\n# traj={\n# \"router\": {\n# \"input\": {\"question\": \"...\"},\n# \"output\": {\"model_selection\": \"...\"}\n# },\n# \"analyst\": {\n# \"input\": {\"question\": \"...\"},\n# \"output\": {\"summary\": \"...\"}\n# },\n# ...\n# }\n# )\n"}]}],["$","div",null,{"className":"relative","children":["$","pre",null,{"className":"language-python","children":["$","code",null,{"className":"language-python code-highlight","children":[["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token keyword","children":"from"}]," optimas",["$","span",null,{"className":"token punctuation","children":"."}],"wrappers",["$","span",null,{"className":"token punctuation","children":"."}],"example ",["$","span",null,{"className":"token keyword","children":"import"}]," Example\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Define a single evaluation example"}],"\n"]}],["$","span",null,{"className":"code-line","children":["example ",["$","span",null,{"className":"token operator","children":"="}]," Example",["$","span",null,{"className":"token punctuation","children":"("}],"\n"]}],["$","span",null,{"className":"code-line","children":[" question",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token string","children":"\"Summarize the legal implications of the Paris Agreement for EU environmental policy.\""}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" gd_answer",["$","span",null,{"className":"token operator","children":"="}],["$","span",null,{"className":"token string","children":"\"The Paris Agreement influences EU climate law by mandating national legislation aligned with long-term carbon neutrality.\""}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Run a forward pass through the system"}],"\n"]}],["$","span",null,{"className":"code-line","children":["prediction ",["$","span",null,{"className":"token operator","children":"="}]," system",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token operator","children":"**"}],"example",["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# View the structured prediction and trajectory"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token keyword","children":"print"}],["$","span",null,{"className":"token punctuation","children":"("}],"prediction",["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Prediction("}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# answer=\"It is a legal framework that sets out commitments for reducing greenhouse gas emissions and enhancing climate resilience.\","}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# traj={"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"router\": {"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"input\": {\"question\": \"...\"},"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"output\": {\"model_selection\": \"...\"}"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# },"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"analyst\": {"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"input\": {\"question\": \"...\"},"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# \"output\": {\"summary\": \"...\"}"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# },"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# ..."}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# }"}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# )"}],"\n"]}]]}]}]}]]}],"\n",["$","h3",null,{"id":"evaluate","children":[["$","$Ld",null,{"href":"#evaluate","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"Evaluate"]}],"\n",["$","div",null,{"className":"my-5 relative group","children":[["$","div",null,{"className":"absolute top-3 right-2.5 z-10 opacity-0 group-hover:opacity-100 transition-opacity duration-200","children":["$","$L1e",null,{"content":"# Evaluate a single example\nscore = system.evaluate(example, prediction)\n\n# If no prediction if provided, the system will run a forward pass internally\nscore = system.evaluate(example)\n\n# Evaluate a dataset (multithreaded)\ndataset = [\n Example(...),\n Example(...),\n ...\n]\n\n# Uses multithreading with number of workers = system.max_eval_workers\navg_score = system.evaluate_multiple(dataset)\n\n"}]}],["$","div",null,{"className":"relative","children":["$","pre",null,{"className":"language-python","children":["$","code",null,{"className":"language-python code-highlight","children":[["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Evaluate a single example"}],"\n"]}],["$","span",null,{"className":"code-line","children":["score ",["$","span",null,{"className":"token operator","children":"="}]," system",["$","span",null,{"className":"token punctuation","children":"."}],"evaluate",["$","span",null,{"className":"token punctuation","children":"("}],"example",["$","span",null,{"className":"token punctuation","children":","}]," prediction",["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# If no prediction if provided, the system will run a forward pass internally"}],"\n"]}],["$","span",null,{"className":"code-line","children":["score ",["$","span",null,{"className":"token operator","children":"="}]," system",["$","span",null,{"className":"token punctuation","children":"."}],"evaluate",["$","span",null,{"className":"token punctuation","children":"("}],"example",["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Evaluate a dataset (multithreaded)"}],"\n"]}],["$","span",null,{"className":"code-line","children":["dataset ",["$","span",null,{"className":"token operator","children":"="}]," ",["$","span",null,{"className":"token punctuation","children":"["}],"\n"]}],["$","span",null,{"className":"code-line","children":[" Example",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" Example",["$","span",null,{"className":"token punctuation","children":"("}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":")"}],["$","span",null,{"className":"token punctuation","children":","}],"\n"]}],["$","span",null,{"className":"code-line","children":[" ",["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],["$","span",null,{"className":"token punctuation","children":"."}],"\n"]}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token punctuation","children":"]"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}],["$","span",null,{"className":"code-line","children":[["$","span",null,{"className":"token comment","children":"# Uses multithreading with number of workers = system.max_eval_workers"}],"\n"]}],["$","span",null,{"className":"code-line","children":["avg_score ",["$","span",null,{"className":"token operator","children":"="}]," system",["$","span",null,{"className":"token punctuation","children":"."}],"evaluate_multiple",["$","span",null,{"className":"token punctuation","children":"("}],"dataset",["$","span",null,{"className":"token punctuation","children":")"}],"\n"]}],["$","span",null,{"className":"code-line","children":"\n"}]]}]}]}]]}],"\n",["$","hr",null,{}],"\n",["$","h2",null,{"id":"cheat-sheet-core-functionalities","children":[["$","$Ld",null,{"href":"#cheat-sheet-core-functionalities","aria-hidden":"true","tabIndex":"-1","children":["$","span",null,{"className":"icon icon-link"}],"target":"_blank","rel":"noopener noreferrer"}],"Cheat Sheet: Core Functionalities"]}],"\n",["$","div",null,{"className":"relative max-w-full overflow-auto","children":["$","table",null,{"ref":"$undefined","className":"w-full caption-bottom text-sm","children":[["$","thead",null,{"ref":"$undefined","className":"[&_tr]:border-b","children":["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","th",null,{"ref":"$undefined","className":"h-12 !px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0","children":"Functionality"}],["$","th",null,{"ref":"$undefined","className":"h-12 !px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0","children":"Description"}]]}]}],["$","tbody",null,{"ref":"$undefined","className":"[&_tr:last-child]:border-0","children":[["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"system(**inputs)"}]}],["$","td",null,{"children":"Run the full system on a single input"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"system.evaluate(example)"}]}],["$","td",null,{"children":["Evaluate system prediction on a single ",["$","code",null,{"children":"Example"}]]}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"system.evaluate_multiple(dataset)"}]}],["$","td",null,{"children":"Compute average score across a dataset"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"system.context(...)"}]}],["$","td",null,{"children":"Temporarily override component variables/configs"}]]}],["$","tr",null,{"ref":"$undefined","className":"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted","children":[["$","td",null,{"children":["$","code",null,{"children":"system.modules[\"module\"](...)"}]}],["$","td",null,{"children":"Run a specific component in isolation"}]]}]]}]]}]}],"\n",["$","hr",null,{}]]}],["$","div",null,{"className":"grid grid-cols-2 flex-grow sm:py-10 sm:py-7 py-4 pt-5 gap-5","children":[["$","div",null,{"children":["$","$Ld",null,{"className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 no-underline w-full flex flex-col sm:pl-7 pl-3 sm:py-10 py-8 !items-start text-xs sm:text-sm","href":"/docs/getting-started/guide/components","children":[["$","span",null,{"className":"flex items-center text-muted-foreground text-xs","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-left w-[1rem] h-[1rem] mr-1","children":[["$","path","1wnfg3",{"d":"m15 18-6-6 6-6"}],"$undefined"]}],"Previous"]}],["$","span",null,{"className":"mt-1 ml-1","children":"Build Components"}]]}]}],["$","div",null,{"children":["$","$Ld",null,{"className":"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 no-underline w-full flex flex-col sm:pr-7 pr-3 sm:py-10 py-8 !items-end text-xs sm:text-sm","href":"/docs/getting-started/guide/datasets","children":[["$","span",null,{"className":"flex items-center text-muted-foreground text-xs","children":["Next",["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-chevron-right w-[1rem] h-[1rem] ml-1","children":[["$","path","mthhwq",{"d":"m9 18 6-6-6-6"}],"$undefined"]}]]}],["$","span",null,{"className":"mt-1 mr-1","children":"Prepare Datasets"}]]}]}]]}]]}]]}]}],"$L1f"]}] 1a:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Build Systems"}],["$","meta","2",{"name":"description","content":"Combine components into an evaluable, optimizable system."}],["$","meta","3",{"property":"og:title","content":"Build Systems"}],["$","meta","4",{"property":"og:description","content":"Combine components into an evaluable, optimizable system."}],["$","meta","5",{"property":"og:image:type","content":"image/jpeg"}],["$","meta","6",{"property":"og:image:width","content":"1340"}],["$","meta","7",{"property":"og:image:height","content":"720"}],["$","meta","8",{"property":"og:image","content":"https://optimas.stanford.edu/opengraph-image.jpg?c4738cb8ee63c0c8"}],["$","meta","9",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","10",{"name":"twitter:title","content":"Build Systems"}],["$","meta","11",{"name":"twitter:description","content":"Combine components into an evaluable, optimizable system."}],["$","meta","12",{"name":"twitter:image:type","content":"image/jpeg"}],["$","meta","13",{"name":"twitter:image:width","content":"1340"}],["$","meta","14",{"name":"twitter:image:height","content":"720"}],["$","meta","15",{"name":"twitter:image","content":"https://optimas.stanford.edu/opengraph-image.jpg?c4738cb8ee63c0c8"}],["$","link","16",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"48x48"}]] 18:null 20:I[257,["459","static/chunks/459-6a59cf064f43bdab.js","933","static/chunks/933-babf0e5c20edcd6a.js","686","static/chunks/686-b7d2cd287b15961f.js","829","static/chunks/829-a236f9036c7c0b48.js","495","static/chunks/495-5ab92bfcd5f906c2.js","32","static/chunks/32-fc39ad8e07d133c3.js","870","static/chunks/app/docs/%5B%5B...slug%5D%5D/page-30c266826d66b2cc.js"],"default"] 1f:["$","div",null,{"className":"xl:flex toc hidden w-[20rem] py-9 sticky top-16 h-[96.95vh] pl-6","children":["$","div",null,{"className":"flex flex-col gap-3 w-full pl-2","children":[["$","h3",null,{"className":"font-medium text-sm","children":"On this page"}],["$","$L15",null,{"className":"pb-2 pt-0.5 overflow-y-auto","children":["$","$L20",null,{"data":[{"level":2,"text":"Define a System","href":"#define-a-system"},{"level":3,"text":"(1) Provide Components","href":"#1-provide-components"},{"level":3,"text":"(2) Specify Evaluation Function","href":"#2-specify-evaluation-function"},{"level":2,"text":"Examples","href":"#examples"},{"level":3,"text":"Forward Pass","href":"#forward-pass"},{"level":3,"text":"Evaluate","href":"#evaluate"},{"level":2,"text":"Cheat Sheet: Core Functionalities","href":"#cheat-sheet-core-functionalities"}]}]}]]}]}]