Jupyter notebook

From microsoft/ai-agents-for-beginners · View interactive version

Jupyter notebook is an AI agent skill from the GitHub repository microsoft/ai-agents-for-beginners. ਜਦੋਂ ਉਪਭੋਗਤਾ ਤਜਰਬਿਆਂ, ਖੋਜਾਂ, ਜਾਂ ਟਿਊਟੋਰੀਅਲਾਂ ਲਈ Jupyter ਨੋਟਬੁੱਕ (`.ipynb`) ਬਣਾਉਣ, ਸਕੈਫੋਲਡ ਕਰਨ, ਜਾਂ ਸੋਧ ਕਰਨ ਨੂੰ ਕਹੇ, ਇਸਦਾ ਉਪਯੋਗ ਕਰੋ; ਬੰਡਲ ਕੀਤੇ ਟੈਮਪਲੇਟਾਂ ਨੂੰ ਤਰਜੀਹ ਦਿਓ ਅਤੇ ਇੱਕ ਸਾਫ਼ ਸ਼ੁਰੂਆਤੀ ਨੋਟਬੁੱਕ ਤਿਆਰ ਕਰਨ ਲਈ ਸਹਾਇਕ ਸਕ੍ਰਿਪਟ `new_notebook.py` ਚਲਾਓ.

How to use this skill

Skill file

Jupyter Notebook Skill

ਦੋ ਪ੍ਰਮੁੱਖ ਮੋਡਾਂ ਲਈ ਸਾਫ਼, ਦੁਹਰਾਏ ਜਾਣ ਯੋਗ Jupyter ਨੋਟਬੁੱਕ ਬਣਾਓ:

ਸੰਰਚਨਾ ਵਿੱਚ ਇਕਸਾਰਤਾ ਅਤੇ ਘੱਟ JSON ਗਲਤੀਆਂ ਲਈ ਬੰਡਲ ਕੀਤੀਆਂ ਟੈਂਪਲੇਟ ਅਤੇ ਹੈਲਪਰ ਸਕ੍ਰਿਪਟ ਦੀ ਪਸੰਦ ਕਰੋ।

When to use

Decision tree

Skill path (set once)

export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export JUPYTER_NOTEBOOK_CLI="$CODEX_HOME/skills/jupyter-notebook/scripts/new_notebook.py"

User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).

Workflow

  1. Lock the intent.

ਨੋਟਬੁੱਕ ਕਿਸਮ ਦੀ ਪਛਾਣ ਕਰੋ: experiment ਜਾਂ tutorial।

ਉਦੇਸ਼, ਦਰਸ਼ਕ, ਅਤੇ "ਮੁਕੰਮਲ" ਹੋਣ ਦਾ ਮਾਪ ਕੀ ਹੈ ਇਹ ਦਰਜ ਕਰੋ।

  1. Scaffold from the template.

ਹੱਥੋਂ ਹਥਿਆਰਬੰਦ কੱਚਾ ਨੋਟਬੁੱਕ JSON ਲਿਖਣ ਤੋਂ ਬਚਣ ਲਈ ਹੈਲਪਰ ਸਕ੍ਰਿਪਟ ਦੀ ਵਰਤੋਂ ਕਰੋ।

uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind experiment \
  --title "Compare prompt variants" \
  --out output/jupyter-notebook/compare-prompt-variants.ipynb
uv run --python 3.12 python "$JUPYTER_NOTEBOOK_CLI" \
  --kind tutorial \
  --title "Intro to embeddings" \
  --out output/jupyter-notebook/intro-to-embeddings.ipynb
  1. Fill the notebook with small, runnable steps.

ਹਰ ਕੋਡ ਸੈੱਲ ਨੂੰ ਇੱਕ ਕਦਮ 'ਤੇ ਕੇਂਦ੍ਰਿਤ ਰੱਖੋ।

ਛੋਟੇ ਮਾਰਕਡਾਉਨ ਸੈੱਲ ਜੋ ਉਦੇਸ਼ ਅਤੇ ਉਮੀਦ ਕੀਤੀ ਨਤੀਜੇ ਨੂੰ ਸਮਝਾਉਂਦੇ ਹੋ ਸ਼ਾਮਲ ਕਰੋ।

ਜਦੋਂ ਛੋਟਾ ਸਾਰ ਕੰਮ ਕਰਦਾ ਹੈ ਤਾਂ ਵੱਡੇ, ਸ਼ੋਰ ਵਾਲੇ ਆਉਟਪੁੱਟੋਂ ਤੋਂ ਬਚੋ।

  1. Apply the right pattern.

ਪ੍ਰਯੋਗਾਂ ਲਈ, references/experiment-patterns.md ਦੀ ਪਾਲਣਾ ਕਰੋ।

ਟਿਊਟੋਰੀਅਲਾਂ ਲਈ, references/tutorial-patterns.md ਦੀ ਪਾਲਣਾ ਕਰੋ।

  1. Edit safely when working with existing notebooks.

ਨੋਟਬੁੱਕ ਦੀ ਸੰਰਚਨਾ ਨੂੰ ਬਰਕਰਾਰ ਰੱਖੋ; ਸੈੱਲਾਂ ਨੂੰ ਦੁਬਾਰਾ ਕ੍ਰਮਬੱਧ ਕਰਨ ਤੋਂ ਬਚੋ ਜਦ ਤੱਕ ਕਿ ਇਹ ਉਪਰ ਤੋਂ ਹੇਠਾਂ ਦੀ ਕਹਾਣੀ ਨੂੰ ਸੁਧਾਰ ਨਾ ਦੇਵੇ।

ਪੂਰੇ ਰੀਰਾਈਟਸ ਦੇ ਬਦਲੇ ਟਰਗੇਟ ਕੀਤੀਆਂ ਸੋਧਾਂ ਨੂੰ ਤਰਜੀਹ ਦਿਓ।

ਜੇ ਤੁਹਾਨੂੰ ਕੱਚਾ JSON ਸੋਧਣਾ ਪੈਂਦਾ ਹੈ, ਤਾਂ ਪਹਿਲਾਂ references/notebook-structure.md ਦੀ ਸਮੀਖਿਆ ਕਰੋ।

  1. Validate the result.

ਜਦੋਂ ਵਾਤਾਵਰਣ ਦੀ ਆਗਿਆ ਹੋਵੇ ਤਾਂ ਨੋਟਬੁੱਕ ਨੂੰ ਉਪਰ ਤੋਂ ਹੇਠਾਂ ਚਲਾਓ।

ਜੇ ਐਕਜ਼ਿਕਿਊਸ਼ਨ ਸੰਭਵ ਨਹੀਂ ਹੈ, ਤਾਂ ਇਸ ਨੂੰ ਸਪੱਸ਼ਟ ਤੌਰ 'ਤੇ ਦੱਸੋ ਅਤੇ ਲੋਕਲ ਰੂਪ ਵਿੱਚ ਕਿਵੇਂ ਵੈਰੀਫਾਈ ਕਰਨਾ ਹੈ ਇਹ ਦਰਜ ਕਰੋ।

references/quality-checklist.md ਵਿੱਚ ਦਿੱਤੇ ਆਖਰੀ ਪਾਸ ਚੈਕਲਿਸਟ ਦੀ ਵਰਤੋਂ ਕਰੋ।

Templates and helper script

Script path:

Temp and output conventions

Dependencies (install only when needed)

ਡਿਪੈਂਡੈਂਸੀ ਮੈਨੇਜਮੈਂਟ ਲਈ uv ਨੂੰ ਤਰਜੀਹ ਦਿਓ।

Optional Python packages for local notebook execution:

uv pip install jupyterlab ipykernel

The bundled scaffold script uses only the Python standard library and does not require extra dependencies.

Environment

ਕੋਈ ਲਾਜ਼ਮੀ ਐਨਵਾਇਰਨਮੈਂਟ ਵੇਰੀਏਬਲ ਨਹੀਂ ਹਨ।

Reference map


<!-- CO-OP TRANSLATOR DISCLAIMER START -->

ਡਿਸਕਲੇਮਰ:

ਇਸ ਦਸਤਾਵੇਜ਼ ਦਾ ਅਨੁਵਾਦ AI ਅਨੁਵਾਦ ਸੇਵਾ Co-op Translator (https://github.com/Azure/co-op-translator) ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਕੀਤਾ ਗਿਆ ਹੈ। ਜਿਵੇਂ ਕਿ ਅਸੀਂ ਸ਼ੁੱਧਤਾ ਲਈ ਯਤਨ ਕਰਦੇ ਹਾਂ, ਕਿਰਪਾ ਧਿਆਨ ਰੱਖੋ ਕਿ ਸਵੈਚਾਲਿਤ ਅਨੁਵਾਦਾਂ ਵਿੱਚ ਗਲਤੀਆਂ ਜਾਂ ਅਸਥਿਰਤਾਵਾਂ ਹੋ ਸਕਦੀਆਂ ਹਨ। ਮੂਲ ਦਸਤਾਵੇਜ਼ ਨੂੰ, ਉਸ ਦੀ ਮੂਲ ਭਾਸ਼ਾ ਵਿੱਚ, ਅਧਿਕਾਰਿਕ ਸਰੋਤ ਮੰਨਿਆ ਜਾਣਾ ਚਾਹੀਦਾ ਹੈ। ਅਹਿਮ ਜਾਣਕਾਰੀ ਲਈ, ਪੇਸ਼ੇਵਰ ਮਨੁੱਖੀ ਅਨੁਵਾਦ ਦੀ ਸਿਫਾਰਿਸ਼ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਅਸੀਂ ਇਸ ਅਨੁਵਾਦ ਦੀ ਵਰਤੋਂ ਕਾਰਨ ਪੈਦਾ ਹੋਣ ਵਾਲੀਆਂ ਕਿਸੇ ਵੀ ਗਲਤਫਹਮੀਆਂ ਜਾਂ ਗਲਤ ਵਿਆਖਿਆਵਾਂ ਲਈ ਜ਼ਿੰਮੇਵਾਰ ਨਹੀਂ ਹਾਂ।

<!-- CO-OP TRANSLATOR DISCLAIMER END -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.