Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.
Use the qualia package to record values your code computes as evidence, and to read those values back in later tasks. It works in Python, R, and Julia, in notebook kernels and in scripts an agent runs.A task is one step of the research plan, and a task can list required variables, the named results it must produce. A captured value becomes a runtime-captured claim: a fact in the knowledge system that links back to the cell or script line that produced it. See Tasks for how agents plan tasks.
How capture works
Qualia records a variable’s value only by reading it out of running code. Neither you nor an agent can type a value in as variable evidence. That way, every captured value traces back to the code that computed it.
An agent creates a task with required variables, such as best_model and accuracy.
Code in a notebook cell or script assigns those names.
Qualia reads the values from the running kernel or script and records them as claims.
A later task reads the values with qualia.get() instead of recomputing them.
Capture a required variable in a notebook
In a notebook, you don’t call anything. When a cell finishes, Qualia captures every global variable whose name matches a required variable on an in-progress task in the same chat.For example, if a task requires best_model and accuracy, running this cell captures both:
best_model = "random_forest"accuracy = 0.94
The qualia package is already loaded in every notebook kernel, so you don’t need to import it.
Submit a value explicitly
To capture a value right away, for example from inside a function, call submit_variable from the code that produced it. The value fills the matching required variable on each in-progress task in the chat.
If Qualia can’t record a name, it prints the reason, such as an unsupported type or a slot that is already filled.
Record extra evidence
To keep a value that no task asked for, use add_evidence. It records a claim without filling a required variable. Qualia looks the name up in the calling code, so the variable must exist when you call it.
class_counts = [120, 80, 45]await qualia.add_evidence( "class_counts", description="Rows per class in the training set", recall_priority="high",)
recall_priority controls how readily later agents see the claim: "low" (the default), "medium", or "high". Only "high" claims appear to agents on every turn; agents find lower ones by searching. See recall priority.
Capture from a script
Scripts use the same package, with two differences. A script has no cell boundary, so nothing is captured automatically, and the script must import the client itself.The Python capture methods are async. A notebook cell can await them directly, but a script must run them inside an event loop because top-level await is a syntax error there.
Don’t drop the await in Python, because without it the call never runs and nothing is captured.
In Julia scripts, use the @add_evidence macro:
using Qualiaclass_counts = [120, 80, 45]Qualia.@add_evidence class_counts description="Rows per class"
A script claim cites the command that ran the script and, where available, the line that produced the value. If you later edit that line, the claim’s source shows it changed.
Read captured values
In a downstream task, read values captured by earlier tasks:
Python
R
Julia
# pandas DataFrame indexed by (notebook_id, variable_name)df = qualia.get(variable_names=["accuracy", "best_model"])
To read the values one task produced, for example after a kernel restart, filter by task ID:
result = await qualia.get_evidence(task_id="[TASK_ID]", variable_names=["accuracy"])rows = result["rows"]
Each row holds the task ID, variable name, value, and value type.
Save a figure from a script
To save a chart from a script along with the values it plots, use save_figure instead of the library’s own save. A figure saved this way supports data inspection once it is captured, such as reading points and toggling series.
Extra arguments, such as dpi or bbox_inches, pass through to the library’s save. The call returns the path it wrote.
Save inside your workspace, and prefer SVG because it scales to any size and keeps text as text.
If you use the library’s own save, an agent can still capture the figure, but only as a picture with no values behind it.
For Plotly, Altair, and ggplot2 figures, Qualia also keeps an interactive version of the chart.
Plotly image saves need the kaleido package, and Altair image saves need vl-convert-python.
To add a script’s figure to the knowledge graph, ask the agent to capture it. The agent records the image together with the script that saved it.
Supported values
Qualia captures:
Primitive values: numbers, strings, and booleans. NumPy scalars, such as the result of argmax, count as numbers.
Lists whose items all share one primitive type, such as [0.91, 0.94].
Qualia rejects dicts, DataFrames, arrays, and mixed lists, so capture separate scalar variables instead. Evidence values over 1 MB are also rejected; save large results to a file and capture a summary, such as a path or a metric.
Export a notebook that runs without Qualia
On the desktop app, right-click a notebook and choose Open with Default App. Qualia saves a copy to Downloads/Qualia Exports with each qualia.get() call, or its R and Julia equivalent, replaced by the captured values. The copy runs in other tools, such as JupyterLab or VS Code.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qualia Docs","colors":{"primary":"#66349a","light":"#c9a2ef","dark":"#3d1c66"},"logo":{"light":"https://mintcdn.com/quadrillionlabs/ecricIR1wgO8Wd_u/logo/light.png?fit=max\u0026auto=format\u0026n=ecricIR1wgO8Wd_u\u0026q=85\u0026s=d1e9f264c9988da30c5876c1b0d873d2","dark":"https://mintcdn.com/quadrillionlabs/ecricIR1wgO8Wd_u/logo/dark.png?fit=max\u0026auto=format\u0026n=ecricIR1wgO8Wd_u\u0026q=85\u0026s=84d0fc471f841af2b69e386ea7e11e8f","href":"https://quadrillion.ai"},"favicon":"https://mintcdn.com/quadrillionlabs/yXqvwJ6wmP2cXgxj/favicon.png?fit=max\u0026auto=format\u0026n=yXqvwJ6wmP2cXgxj\u0026q=85\u0026s=48f248cd220b38cba78f4c35cacb945c","appearance":{"default":"light"},"background":{"decoration":"gradient","color":{"light":"#fdf8ff","dark":"#17102a"}},"navbar":{"links":[{"href":"https://quadrillion.ai","label":"Website"}],"primary":{"type":"button","label":"Download","href":"https://quadrillion.ai/download"}},"footer":{"socials":{"website":"https://quadrillion.ai","github":"https://github.com/quadrillion-labs"}},"seo":{"metatags":{"canonical":"https://docs.quadrillion.ai"}},"fonts":{"heading":{"family":"Newsreader","weight":400},"body":{"family":"Instrument Sans"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"https://quadrillion.ai/changelog"},{"anchor":"Status","icon":"signal","href":"https://quadrillion.ai/status"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"quadrillionlabs","hasAudioNarration":false,"actualSubdomain":"quadrillionlabs","customDomains":["docs.quadrillion.ai"],"gitSource":{"type":"github","owner":"quadrillion-labs","repo":"quadrillion","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aff73afb695702e2f1ea4c4","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Customization \u0026 Settings","count":13},{"language":"default","tag":"Interface","count":5},{"language":"default","tag":"Core Features","count":5},{"language":"default","tag":"Tools","count":5},{"language":"default","tag":"Welcome","count":4},{"language":"default","tag":"Research Workflow","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"global.css","content":":root{--q-paper: #fdf8ff;--q-ink: #1a1425;--q-ink-soft: #4a4159;--q-fog: #7b7289;--q-hairline: #e7e3ee;--q-iris: #66349a;--q-lilac: #c9a2ef;--q-radius-pill: 999px;--q-radius-card: 22px;--q-ease: cubic-bezier(0.333, 0.667, 0.667, 1)}.dark{--q-ink: #ffffff;--q-ink-soft: rgb(255 255 255 / 72%);--q-fog: rgb(255 255 255 / 52%);--q-hairline: rgb(255 255 255 / 12%)}h1,h2,h3{font-optical-sizing:auto;letter-spacing:-0.028em;text-wrap:balance}h1{line-height:1.04;letter-spacing:-0.032em}h2{line-height:1.12}h3{line-height:1.2}h4,h5,h6{font-family:\"Instrument Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;font-weight:600;letter-spacing:0}#content-area h1,#content-area h2,#content-area h3{font-weight:400}#content-area [class*=\"card\"] :is(h2,h3,h4,h5,h6),a.card :is(h2,h3,h4,h5,h6),#content-area h2.not-prose,#content-area h3.not-prose{font-family:\"Instrument Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;font-weight:600;letter-spacing:0}p{line-height:1.78}#content-area p,#content-area li{max-width:68ch}#content-area .eyebrow,#content-area [class*=\"eyebrow\"]{font-family:\"Spline Sans Mono\", ui-monospace, SFMono-Regular, Menlo, monospace;font-size:12.5px;font-weight:500;letter-spacing:0.14em;text-transform:uppercase;color:var(--q-fog)}#content-area a:not([class*=\"button\"]):not([class*=\"card\"]){text-decoration-thickness:1px;text-underline-offset:3px}#navbar-transition{background:rgb(253 248 255 / 24%);backdrop-filter:blur(26px) saturate(185%);-webkit-backdrop-filter:blur(26px) saturate(185%);border-bottom:1px solid rgb(26 20 37 / 6%)}.dark #navbar-transition{background:rgb(23 16 42 / 34%);border-bottom-color:rgb(255 255 255 / 10%)}#navbar a:not(:has(>span[class*=\"bg-primary\"])):not(:has(img)):not(:has(svg[class*=\"logo\"])){padding:9px 15px;border-radius:var(--q-radius-pill);font-size:15px;font-weight:500;color:var(--q-ink-soft);transition:background 0.19s var(--q-ease), box-shadow 0.19s var(--q-ease), color 0.19s var(--q-ease)}#navbar a:not(:has(>span[class*=\"bg-primary\"])):not(:has(img)):hover{color:var(--q-iris);background:rgb(255 255 255 / 42%);box-shadow:inset 0 0 0 1px rgb(255 255 255 / 28%);backdrop-filter:blur(20px) saturate(170%);-webkit-backdrop-filter:blur(20px) saturate(170%);transition-duration:0.13s}.dark #navbar a:not(:has(>span[class*=\"bg-primary\"])):not(:has(img)):hover{color:#ffffff;background:rgb(255 255 255 / 14%);box-shadow:inset 0 0 0 1px rgb(255 255 255 / 16%)}#navbar a:has(>span[class*=\"bg-primary\"]){padding:9px 17px;font-size:15px;font-weight:500}#navbar a>span[class*=\"bg-primary\"]{background:var(--q-iris);border-radius:var(--q-radius-pill);transition:background 0.19s var(--q-ease)}#navbar a:hover>span[class*=\"bg-primary\"]{background:#3d1c66;transition-duration:0.13s}#navbar a:has(>span[class*=\"bg-primary\"]) svg{width:0;margin-left:0;opacity:0;transition:width 0.2s var(--q-ease), margin-left 0.2s var(--q-ease), opacity 0.16s ease-in-out}#navbar a:has(>span[class*=\"bg-primary\"]):hover svg{width:12px;margin-left:3px;opacity:1}#navbar button[class*=\"rounded-lg\"]:not([class*=\"search\"]):hover{background:rgb(255 255 255 / 42%);box-shadow:inset 0 0 0 1px rgb(255 255 255 / 28%)}.dark #navbar button[class*=\"rounded-lg\"]:not([class*=\"search\"]):hover{background:rgb(255 255 255 / 14%);box-shadow:inset 0 0 0 1px rgb(255 255 255 / 16%)}#navbar a[class*=\"rounded\"],#navbar button,button[class*=\"rounded\"],a[class*=\"rounded-full\"],#search-bar-entry,[class*=\"searchbar\"]{border-radius:var(--q-radius-pill)}a.card{overflow:visible}#content-area [class*=\"card\"],a.card{background:transparent;border:0;box-shadow:none;padding:0 28px 6px 0;transition:color 0.14s var(--q-ease)}#content-area [class*=\"card\"]:hover,a.card:hover{background:transparent;box-shadow:none;border:0}a.card:hover :is(h2,h3,h4,h5,h6){color:var(--q-iris)}.dark a.card:hover :is(h2,h3,h4,h5,h6){color:var(--q-lilac)}#content-area .card>div[class*=\"px-\"]{padding-left:0;padding-right:0;padding-top:0}#content-area [class*=\"grid\"]:has(>a.card),#content-area [class*=\"grid\"]:has(>[class*=\"card\"]){gap:34px 48px}#sidebar a[class*=\"bg-primary\"],#sidebar li>a[aria-current=\"page\"]{border-radius:11px;background:rgb(102 52 154 / 10%);color:var(--q-iris);font-weight:500}.dark #sidebar li>a[aria-current=\"page\"]{background:rgb(255 255 255 / 12%);color:#ffffff}#sidebar a:hover{border-radius:11px}#content-area pre,#content-area [class*=\"codeblock\"]{border-radius:16px}#content-area :not(pre)>code{border-radius:6px;font-family:\"Spline Sans Mono\", ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.92em}a:focus-visible,button:focus-visible{outline:2px solid var(--q-iris);outline-offset:3px}.dark a:focus-visible,.dark button:focus-visible{outline-color:var(--q-lilac)}@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.001ms!important;animation-iteration-count:1!important;transition-duration:0.001ms!important;scroll-behavior:auto!important}}"}]}
{"page":{"pagePath":"q-vars","slug":"/q-vars","pageMetadata":{"title":"Task variables (qualia)","description":"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.","href":"/q-vars"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Mermaid,Tab,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Use the `,_jsx(_components.code,{children:`qualia`}),` package to record values your code computes as evidence, and to read those values back in later tasks. It works in Python, R, and Julia, in notebook kernels and in scripts an agent runs.`]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.strong,{children:`task`}),` is one step of the research plan, and a task can list `,_jsx(_components.strong,{children:`required variables`}),`, the named results it must produce. A captured value becomes a `,_jsx(_components.strong,{children:`runtime-captured claim`}),`: a fact in the `,_jsx(_components.a,{href:`/knowledge`,children:`knowledge system`}),` that links back to the cell or script line that produced it. See `,_jsx(_components.a,{href:`/tasks`,children:`Tasks`}),` for how agents plan tasks.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-capture-works`,children:`How capture works`}),`\n`,_jsx(_components.p,{children:`Qualia records a variable’s value only by reading it out of running code. Neither you nor an agent can type a value in as variable evidence. That way, every captured value traces back to the code that computed it.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`An agent creates a task with required variables, such as `,_jsx(_components.code,{children:`best_model`}),` and `,_jsx(_components.code,{children:`accuracy`}),`.`]}),`\n`,_jsx(_components.li,{children:`Code in a notebook cell or script assigns those names.`}),`\n`,_jsx(_components.li,{children:`Qualia reads the values from the running kernel or script and records them as claims.`}),`\n`,_jsxs(_components.li,{children:[`A later task reads the values with `,_jsx(_components.code,{children:`qualia.get()`}),` instead of recomputing them.`]}),`\n`]}),`\n`,_jsx(Mermaid,{chart:`flowchart LR\n task1[\"Task 1: Train model\"]\n capture[\"Capture: accuracy = 0.94\"]\n task2[\"Task 2: Summarize results\"]\n read[\"Read: qualia.get(variable_names=['accuracy'])\"]\n\n task1 --> capture\n capture --> task2\n task2 --> read`}),`\n`,_jsx(Heading,{level:`2`,id:`capture-a-required-variable-in-a-notebook`,children:`Capture a required variable in a notebook`}),`\n`,_jsx(_components.p,{children:`In a notebook, you don’t call anything. When a cell finishes, Qualia captures every global variable whose name matches a required variable on an in-progress task in the same chat.`}),`\n`,_jsxs(_components.p,{children:[`For example, if a task requires `,_jsx(_components.code,{children:`best_model`}),` and `,_jsx(_components.code,{children:`accuracy`}),`, running this cell captures both:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`best_model `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"random_forest\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`accuracy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.94`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`qualia`}),` package is already loaded in every notebook kernel, so you don’t need to import it.`]}),`\n`,_jsx(Heading,{level:`2`,id:`submit-a-value-explicitly`,children:`Submit a value explicitly`}),`\n`,_jsxs(_components.p,{children:[`To capture a value right away, for example from inside a function, call `,_jsx(_components.code,{children:`submit_variable`}),` from the code that produced it. The value fills the matching required variable on each in-progress task in the chat.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`accuracy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.94`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia.submit_variable(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variable_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`accuracy)`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If Qualia can’t record a name, it prints the reason, such as an unsupported type or a slot that is already filled.`}),`\n`,_jsx(Heading,{level:`2`,id:`record-extra-evidence`,children:`Record extra evidence`}),`\n`,_jsxs(_components.p,{children:[`To keep a value that no task asked for, use `,_jsx(_components.code,{children:`add_evidence`}),`. It records a claim without filling a required variable. Qualia looks the name up in the calling code, so the variable must exist when you call it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`class_counts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia.add_evidence(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"class_counts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rows per class in the training set\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` recall_priority`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`recall_priority`}),` controls how readily later agents see the claim: `,_jsx(_components.code,{children:`\"low\"`}),` (the default), `,_jsx(_components.code,{children:`\"medium\"`}),`, or `,_jsx(_components.code,{children:`\"high\"`}),`. Only `,_jsx(_components.code,{children:`\"high\"`}),` claims appear to agents on every turn; agents find lower ones by searching. See `,_jsx(_components.a,{href:`/knowledge#recall-priority`,children:`recall priority`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`capture-from-a-script`,children:`Capture from a script`}),`\n`,_jsx(_components.p,{children:`Scripts use the same package, with two differences. A script has no cell boundary, so nothing is captured automatically, and the script must import the client itself.`}),`\n`,_jsxs(_components.p,{children:[`The Python capture methods are async. A notebook cell can `,_jsx(_components.code,{children:`await`}),` them directly, but a script must run them inside an event loop because top-level `,_jsx(_components.code,{children:`await`}),` is a syntax error there.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Python`,id:`python`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` scores `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.91`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.94`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.93`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` accuracy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` sum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(scores) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(scores)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia.submit_variable(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variable_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`accuracy)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})})}),_jsx(Tab,{title:`R`,id:`r`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`r`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`r`,children:_jsxs(_components.code,{language:`r`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Sys.getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUALIA_R_SOURCE_PATH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`scores`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c-`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.91`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.94`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.93`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`accuracy`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c-`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` mean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`scores`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` accuracy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Julia`,id:`julia`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`julia`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`julia`,children:_jsxs(_components.code,{language:`julia`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Qualia`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`scores `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.91`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.94`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.93`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`accuracy `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` sum`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(scores) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(scores)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Qualia`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`@submit_variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` accuracy`})]}),`\n`]})})})})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Don’t drop the `,_jsx(_components.code,{children:`await`}),` in Python, because without it the call never runs and nothing is captured.`]})}),`\n`,_jsxs(_components.p,{children:[`In Julia scripts, use the `,_jsx(_components.code,{children:`@add_evidence`}),` macro:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`julia`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`julia`,children:_jsxs(_components.code,{language:`julia`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Qualia`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`class_counts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`45`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Qualia`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`@add_evidence`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` class_counts description`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rows per class\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A script claim cites the command that ran the script and, where available, the line that produced the value. If you later edit that line, the claim’s source shows it changed.`}),`\n`,_jsx(Heading,{level:`2`,id:`read-captured-values`,children:`Read captured values`}),`\n`,_jsx(_components.p,{children:`In a downstream task, read values captured by earlier tasks:`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Python`,id:`python-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# pandas DataFrame indexed by (notebook_id, variable_name)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`df `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia.get(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variable_names`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"best_model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})}),_jsx(Tab,{title:`R`,id:`r-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`r`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`r`,children:_jsxs(_components.code,{language:`r`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`df`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c-`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` qualia_get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variable_names`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"best_model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})})}),_jsx(Tab,{title:`Julia`,id:`julia-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`julia`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`julia`,children:_jsxs(_components.code,{language:`julia`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rows `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Qualia`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`get_evidence`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(variable_names `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"best_model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rows`})]}),`\n`]})})})})]}),`\n`,_jsx(_components.p,{children:`To read the values one task produced, for example after a kernel restart, filter by task ID:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia.get_evidence(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`task_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[TASK_ID]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`variable_names`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accuracy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rows `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Each row holds the task ID, variable name, value, and value type.`}),`\n`,_jsx(Heading,{level:`2`,id:`save-a-figure-from-a-script`,children:`Save a figure from a script`}),`\n`,_jsxs(_components.p,{children:[`To save a chart from a script along with the values it plots, use `,_jsx(_components.code,{children:`save_figure`}),` instead of the library’s own save. A figure saved this way supports data inspection once it is captured, such as reading points and toggling series.`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Python`,id:`python-3`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` matplotlib.pyplot `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` plt`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` qualia`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`folds `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rmse `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.39`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.41`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.38`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`fig, ax `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` plt.subplots()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ax.plot(folds, rmse)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`qualia.save_figure(fig, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"figures/rmse_by_fold.svg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),_jsx(Tab,{title:`R`,id:`r-3`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`r`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`r`,children:_jsxs(_components.code,{language:`r`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`library`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`ggplot2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Sys.getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUALIA_R_SOURCE_PATH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`df`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c-`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` data.frame`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`fold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rmse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.42`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.39`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.41`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.38`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c-`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ggplot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`df`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` aes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`fold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` rmse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` geom_line`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`qualia_save_figure`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"figures/rmse_by_fold.svg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Julia`,id:`julia-3`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`julia`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`julia`,children:_jsxs(_components.code,{language:`julia`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Plots`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Qualia`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`plt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` plot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.39`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.41`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.38`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.40`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Qualia`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`save_figure`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(plt, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"figures/rmse_by_fold.svg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Extra arguments, such as `,_jsx(_components.code,{children:`dpi`}),` or `,_jsx(_components.code,{children:`bbox_inches`}),`, pass through to the library’s save. The call returns the path it wrote.`]}),`\n`,_jsx(_components.li,{children:`Save inside your workspace, and prefer SVG because it scales to any size and keeps text as text.`}),`\n`,_jsx(_components.li,{children:`If you use the library’s own save, an agent can still capture the figure, but only as a picture with no values behind it.`}),`\n`,_jsx(_components.li,{children:`For Plotly, Altair, and ggplot2 figures, Qualia also keeps an interactive version of the chart.`}),`\n`,_jsxs(_components.li,{children:[`Plotly image saves need the `,_jsx(_components.code,{children:`kaleido`}),` package, and Altair image saves need `,_jsx(_components.code,{children:`vl-convert-python`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`To add a script’s figure to the knowledge graph, ask the agent to capture it. The agent records the image together with the script that saved it.`}),`\n`,_jsx(Heading,{level:`2`,id:`supported-values`,children:`Supported values`}),`\n`,_jsx(_components.p,{children:`Qualia captures:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Primitive values`}),`: numbers, strings, and booleans. NumPy scalars, such as the result of `,_jsx(_components.code,{children:`argmax`}),`, count as numbers.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lists`}),` whose items all share one primitive type, such as `,_jsx(_components.code,{children:`[0.91, 0.94]`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Qualia rejects dicts, DataFrames, arrays, and mixed lists, so capture separate scalar variables instead. Evidence values over 1 MB are also rejected; save large results to a file and capture a summary, such as a path or a metric.`}),`\n`,_jsx(Heading,{level:`2`,id:`export-a-notebook-that-runs-without-qualia`,children:`Export a notebook that runs without Qualia`}),`\n`,_jsxs(_components.p,{children:[`On the desktop app, right-click a notebook and choose `,_jsx(_components.strong,{children:`Open with Default App`}),`. Qualia saves a copy to `,_jsx(_components.code,{children:`Downloads/Qualia Exports`}),` with each `,_jsx(_components.code,{children:`qualia.get()`}),` call, or its R and Julia equivalent, replaced by the captured values. The copy runs in other tools, such as JupyterLab or VS Code.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Task variables (qualia)","description":"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.","href":"/q-vars"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How capture works","slug":"how-capture-works","depth":2,"children":[]},{"title":"Capture a required variable in a notebook","slug":"capture-a-required-variable-in-a-notebook","depth":2,"children":[]},{"title":"Submit a value explicitly","slug":"submit-a-value-explicitly","depth":2,"children":[]},{"title":"Record extra evidence","slug":"record-extra-evidence","depth":2,"children":[]},{"title":"Capture from a script","slug":"capture-from-a-script","depth":2,"children":[]},{"title":"Read captured values","slug":"read-captured-values","depth":2,"children":[]},{"title":"Save a figure from a script","slug":"save-a-figure-from-a-script","depth":2,"children":[]},{"title":"Supported values","slug":"supported-values","depth":2,"children":[]},{"title":"Export a notebook that runs without Qualia","slug":"export-a-notebook-that-runs-without-qualia","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"quadrillionlabs","siteName":"Qualia Docs","title":"Task variables (qualia) - Qualia Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T20:08:23.036Z","originalFileLocation":"q-vars.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qualia Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Task variables (qualia) - Qualia Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qualia Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.quadrillion.ai/q-vars\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://quadrillionlabs.mintlify.site/_mintlify/api/og/v2?division=Research+Workflow\u0026amp;title=Task+variables+%28qualia%29\u0026amp;description=Capture+values+from+notebooks+and+scripts+as+evidence%2C+and+read+them+in+later+tasks+with+the+qualia+package.\u0026amp;theme=2749e54f51a77761154ec148\u0026amp;signature=c05870148bf1bae2023f2d513c4a3060211445a0ab22aedad15f806bbe04e7b7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Task variables (qualia) - Qualia Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://quadrillionlabs.mintlify.site/_mintlify/api/og/v2?division=Research+Workflow\u0026amp;title=Task+variables+%28qualia%29\u0026amp;description=Capture+values+from+notebooks+and+scripts+as+evidence%2C+and+read+them+in+later+tasks+with+the+qualia+package.\u0026amp;theme=2749e54f51a77761154ec148\u0026amp;signature=c05870148bf1bae2023f2d513c4a3060211445a0ab22aedad15f806bbe04e7b7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/quadrillionlabs/EuXpjel07APyks2w/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qualia Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#66349a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.quadrillion.ai/q-vars\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/q-vars.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.quadrillion.ai/#organization\",\"name\":\"Qualia Docs\",\"url\":\"https://docs.quadrillion.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/quadrillionlabs/ecricIR1wgO8Wd_u/logo/light.png?fit=max\u0026auto=format\u0026n=ecricIR1wgO8Wd_u\u0026q=85\u0026s=d1e9f264c9988da30c5876c1b0d873d2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.quadrillion.ai#website\",\"name\":\"Qualia Docs\",\"url\":\"https://docs.quadrillion.ai\",\"publisher\":{\"@id\":\"https://docs.quadrillion.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.quadrillion.ai/q-vars#webpage\",\"url\":\"https://docs.quadrillion.ai/q-vars\",\"name\":\"Task variables (qualia)\",\"description\":\"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\",\"dateModified\":\"2026-11-06T20:08:23.036Z\",\"isPartOf\":{\"@id\":\"https://docs.quadrillion.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.quadrillion.ai/q-vars#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.quadrillion.ai/q-vars#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Research Workflow\",\"item\":\"https://docs.quadrillion.ai/agents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Task variables (qualia)\",\"item\":\"https://docs.quadrillion.ai/q-vars\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.quadrillion.ai/q-vars#article\",\"headline\":\"Task variables (qualia)\",\"name\":\"Task variables (qualia)\",\"description\":\"Capture values from notebooks and scripts as evidence, and read them in later tasks with the qualia package.\",\"url\":\"https://docs.quadrillion.ai/q-vars\",\"mainEntityOfPage\":{\"@id\":\"https://docs.quadrillion.ai/q-vars#webpage\"},\"dateModified\":\"2026-11-06T20:08:23.036Z\",\"publisher\":{\"@id\":\"https://docs.quadrillion.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.quadrillion.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qualia Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qualia Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/q-vars.md","siteName":"Qualia Docs","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"https://quadrillion.ai/changelog"},{"anchor":"Status","icon":"signal","href":"https://quadrillion.ai/status"}]},"groups":[{"group":"Welcome","pages":[{"title":"Overview","href":"/index"},{"title":"Getting Started","href":"/getting-started"},{"title":"Your account and organization","href":"/account-and-organization"},{"title":"Tutorial","href":"/tutorial"}]},{"group":"Core Features","pages":[{"title":"Chat \u0026 AI","href":"/chat-and-ai"},{"title":"Notebooks","href":"/notebooks"},{"title":"Ideas and tasks","href":"/tasks"},{"title":"Knowledge","href":"/knowledge"},{"title":"Shared Workspaces","href":"/shared-workspaces"}]},{"group":"Research Workflow","pages":[{"title":"Agents","href":"/agents"},{"title":"Autonomous Mode","href":"/autonomous-mode"},{"title":"Hillclimb from Claude Code or Codex","description":"Delegate a bounded research run to Qualia Cloud and bring the best candidate back to your project.","href":"/hillclimb"},{"title":"Task variables (qualia)","href":"/q-vars"}]},{"group":"Tools","pages":[{"title":"Terminal","description":"Run shell commands in your workspace from a terminal tab inside Qualia.","href":"/terminal"},{"title":"Writeups","href":"/writeups"},{"title":"Dashboards","href":"/dashboards"},{"title":"CSV Editor","href":"/csv-editor"},{"title":"Vega Chart Viewer","href":"/vega-viewer"}]},{"group":"Customization \u0026 Settings","pages":[{"title":"Settings Overview","href":"/settings/overview"},{"title":"General Settings","href":"/settings/general"},{"title":"Sign-in and API keys","href":"/settings/api-keys"},{"title":"Editor Settings","href":"/settings/editor"},{"title":"Agent Settings","href":"/settings/ai"},{"title":"Appearance Settings","href":"/settings/appearance"},{"title":"Slack Integration","href":"/settings/slack"},{"title":"Databricks Integration","href":"/settings/databricks"},{"title":"Snowflake Integration","href":"/settings/snowflake"},{"title":"Rules","href":"/rules"},{"title":"Skills","href":"/skills"},{"title":"Hooks","href":"/hooks"},{"title":"MCP Integrations","href":"/mcp-integrations"}]},{"group":"Interface","pages":[{"title":"File Explorer","href":"/file-explorer"},{"title":"Application Menu","href":"/app-menu"},{"title":"Search","href":"/search"},{"title":"Tab Management","href":"/tabs"},{"title":"Kernel Toolbar","href":"/kernel-toolbar"}]}]},"basePath":"","title":"Task variables (qualia) - Qualia Docs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}