MCPcopy Create free account

hub / github.com/rohitg00/ai-engineering-from-scratch / functions

Functions8,347 in github.com/rohitg00/ai-engineering-from-scratch

↓ 2 callersFunctionretrieve
RAG step: returns recent emails including the attacker email.
phases/18-ethics-safety-alignment/25-echoleak-cves-for-ai/code/main.py:42
↓ 2 callersFunctionreturns_from
(trajectory, gamma)
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:42
↓ 2 callersMethodrewrite
(items: TodoItem[])
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/plan.ts:12
↓ 2 callersFunctionridge_regression
(A, b, lam)
phases/01-math-foundations/17-linear-systems/code/linear_systems.py:99
↓ 2 callersFunctionring
(cx, cy, n, drawHub)
site/figures-agents-alignment.js:160
↓ 2 callersFunctionrnd
()
site/figures-math.js:341
↓ 2 callersFunctionrollout
(policy, rng, max_steps=200)
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:29
↓ 2 callersFunctionrollout
(policy, rng, max_steps=200)
phases/09-reinforcement-learning/01-mdps-states-actions-rewards/code/main.py:41
↓ 2 callersFunctionrotate_checkpoints
Delete oldest checkpoint directories so only the most recent keep_last remain.
phases/19-capstone-projects/80-checkpoint-sharded-resume/code/main.py:212
↓ 2 callersFunctionrotation_3d_x
(theta)
phases/01-math-foundations/03-matrix-transformations/code/transformations.py:14
↓ 2 callersFunctionrotation_3d_y
(theta)
phases/01-math-foundations/03-matrix-transformations/code/transformations.py:19
↓ 2 callersFunctionroute_model
(query, tier="pro")
phases/11-llm-engineering/11-caching-cost/code/caching_cost.py:320
↓ 2 callersMethodrow
(self, i: int)
phases/07-transformers-deep-dive/03-multi-head-attention/code/main.py:32
↓ 2 callersFunctionrun
(cycles: int, cfg: Config)
phases/15-autonomous-systems/07-recursive-self-improvement/code/main.py:29
↓ 2 callersMethodrun
(self)
phases/19-capstone-projects/52-experiment-runner/code/main.py:125
↓ 2 callersMethodrun
(opts: RunOptions)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.ts:105
↓ 2 callersMethodrun
(self, session_id: str, initial_state: State, resume_from: str | None = None, state_ov
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.py:97
↓ 2 callersFunctionrunFunctionCallingLoop
(userMessage: string)
phases/11-llm-engineering/09-function-calling/code/main.ts:315
↓ 2 callersFunctionrunPromptTest
(prompt: BuiltPrompt, models: readonly string[] = Object.keys(MODEL_CONFIGS))
phases/11-llm-engineering/01-prompt-engineering/code/main.ts:326
↓ 2 callersFunctionrun_adaptive
(learner_id: str, inherent_ability: float, cmap: dict[str, Concept], n_turns: int, rng: rando
phases/19-capstone-projects/17-personal-ai-tutor/code/main.py:129
↓ 2 callersMethodrun_agent
(self, session_id: str, prompt: str, tool_calls: list[tuple[str, dict[str, Any]]],
phases/14-agent-engineering/17-claude-agent-sdk/code/main.py:106
↓ 2 callersFunctionrun_agent_with_checkpoint
Run a tiny 5-step agent; optionally crash at a given step.
phases/16-multi-agent-and-swarms/22-production-scaling-queues-checkpoints/code/main.py:51
↓ 2 callersFunctionrun_check
(name, check_fn, detail_fn=None)
phases/00-setup-and-tooling/01-dev-environment/code/verify.py:25
↓ 2 callersFunctionrun_debate
(agents: list[DebateAgent], rounds: int, label: str)
phases/16-multi-agent-and-swarms/07-society-of-mind-debate/code/main.py:51
↓ 2 callersFunctionrun_demo
()
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:684
↓ 2 callersFunctionrun_demo
Self-terminating demo. Prints a JSON trace and exits zero.
phases/19-capstone-projects/25-verification-gates-observation-budget/code/main.py:432
↓ 2 callersFunctionrun_demo
()
phases/19-capstone-projects/28-observability-otel-traces/code/main.py:391
↓ 2 callersFunctionrun_demo
Self-terminating demo. Returns 0 on success.
phases/19-capstone-projects/26-sandbox-runner-denylist/code/main.py:427
↓ 2 callersFunctionrun_demo
()
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:831
↓ 2 callersFunctionrun_demo
()
phases/19-capstone-projects/27-eval-harness-fixture-tasks/code/main.py:457
↓ 2 callersFunctionrun_e2e
(world_size: int = WORLD_SIZE, steps: int = STEPS)
phases/19-capstone-projects/81-end-to-end-distributed-train/code/main.py:360
↓ 2 callersFunctionrun_epoch
(tokens, experts, W_router, top_k, bias)
phases/07-transformers-deep-dive/11-mixture-of-experts/code/main.py:75
↓ 2 callersFunctionrun_eval
(test_cases, use_prior)
phases/05-nlp-foundations-to-advanced/25-entity-linking/code/main.py:64
↓ 2 callersFunctionrun_eval
(p: Pipeline)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:670
↓ 2 callersFunctionrun_eval_suite
(test_suite, model_name, prompt_version, criteria=None)
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:284
↓ 2 callersFunctionrun_function_calling_loop
(user_message, max_iterations=5)
phases/11-llm-engineering/09-function-calling/code/function_calling.py:305
↓ 2 callersFunctionrun_groupchat
( team: dict[str, Agent], selector: Callable[[list[Msg], dict[str, Agent]], Optional[str]], max_ro
phases/16-multi-agent-and-swarms/10-group-chat-speaker-selection/code/main.py:85
↓ 2 callersFunctionrun_loop
(topic: str, use_critic: bool, max_iters: int = 4)
phases/14-agent-engineering/05-self-refine-and-critic/code/main.py:78
↓ 2 callersFunctionrun_loop
( generations: int, pop: int, use_holdout: bool, seed: int | None = None, )
phases/15-autonomous-systems/03-alphaevolve-evolutionary-coding/code/main.py:128
↓ 2 callersFunctionrun_model
(model_name, input_text)
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:224
↓ 2 callersFunctionrun_pipeline
(user_wish: str, executor, label: str)
phases/16-multi-agent-and-swarms/08-role-specialization/code/main.py:92
↓ 2 callersFunctionrun_pipeline
Spawn a 2-rank pipeline; return per-rank losses (only rank 1 reports) and norms.
phases/19-capstone-projects/79-pipeline-parallel/code/main.py:163
↓ 2 callersFunctionrun_prompt_test
(prompt, models=None)
phases/11-llm-engineering/01-prompt-engineering/code/prompt_engineering.py:295
↓ 2 callersFunctionrun_protocol
(name: str, backdoor_rate: float, h_budget: float, n: int, t_skill: float = 0.7, collusion: f
phases/18-ethics-safety-alignment/10-ai-control-subversion/code/main.py:60
↓ 2 callersFunctionrun_reflexion
(max_trials: int, use_memory: bool)
phases/14-agent-engineering/03-reflexion-verbal-rl/code/main.py:76
↓ 2 callersFunctionrun_regime
(regime: str)
phases/15-autonomous-systems/06-automated-alignment-research/code/main.py:76
↓ 2 callersFunctionrun_resume_demo
( *, total_steps: int = 30, interrupt_at: int = 12, in_dim: int = 16, hidden: int = 24,
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:366
↓ 2 callersFunctionrun_scenario
(label: str, tokens_per_day: int, predictions_per_day: int)
phases/17-infrastructure-and-production/02-inference-platform-economics/code/main.py:62
↓ 2 callersFunctionrun_session
(frames: list[Frame], use_tool: bool = True, barge_in_at_ms: int | None = None)
phases/19-capstone-projects/03-realtime-voice-assistant/code/main.py:123
↓ 2 callersFunctionrun_star
(agents: list[SimAgent], correct: str, rng: random.Random)
phases/16-multi-agent-and-swarms/15-voting-debate-topology/code/main.py:45
↓ 2 callersFunctionrun_star
(rounds: int, initial: Model)
phases/15-autonomous-systems/02-star-family-reasoning/code/main.py:92
↓ 2 callersFunctionrun_synthetic_loop
Run a fixed sequence of tool calls through the chain. This is the harness skeleton in miniature. A real harness would consult the model for t
phases/19-capstone-projects/25-verification-gates-observation-budget/code/main.py:332
↓ 2 callersFunctionrun_task
(system: SystemSim, task_id: str, seen: bool, rng: random.Random)
phases/16-multi-agent-and-swarms/24-evaluation-coordination-benchmarks/code/main.py:42
↓ 2 callersFunctionrun_team
(issue: str, n_coders: int = 4, rng: random.Random | None = None)
phases/19-capstone-projects/10-multi-agent-software-team/code/main.py:113
↓ 2 callersFunctionrun_trajectory
(traj: list[Action], kill_switch: dict)
phases/15-autonomous-systems/14-kill-switches-canaries/code/main.py:71
↓ 2 callersFunctions
(w)
phases/18-ethics-safety-alignment/20-bias-representational-harm/code/main.py:50
↓ 2 callersFunctionsample
(probs, rng)
phases/05-nlp-foundations-to-advanced/20-structured-outputs-constrained-decoding/code/main.py:41
↓ 2 callersFunctionsample
(probs, rng)
phases/09-reinforcement-learning/12-rl-for-games/code/main.py:25
↓ 2 callersFunctionsample
(probs, rng)
phases/09-reinforcement-learning/08-ppo/code/main.py:49
↓ 2 callersFunctionsample
(req: SampleRequest, budget: SamplingBudget)
phases/13-tools-and-protocols/11-mcp-sampling/code/main.py:79
↓ 2 callersFunctionsample_exponential_inverse_cdf
(lam)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:11
↓ 2 callersFunctionsample_feature
()
phases/18-ethics-safety-alignment/02-reward-hacking-goodhart/code/main.py:42
↓ 2 callersFunctionsample_from
(p, rng)
phases/08-generative-ai/11-audio-generation/code/main.py:35
↓ 2 callersFunctionsample_from_distribution
(probs, rng)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:59
↓ 2 callersFunctionsample_mixture
(n, d, rng)
phases/08-generative-ai/02-autoencoders-vae/code/main.py:141
↓ 2 callersFunctionsample_pair
(rng)
phases/09-reinforcement-learning/09-reward-modeling-rlhf/code/main.py:27
↓ 2 callersFunctionsample_pair_batch
(batch=32)
phases/04-computer-vision/18-open-vocab-clip/code/main.py:60
↓ 2 callersFunctionsample_param
(spec, rng)
phases/02-ml-fundamentals/12-hyperparameter-tuning/code/tuning.py:144
↓ 2 callersFunctionsample_real
(n, rng)
phases/08-generative-ai/03-gans-generator-discriminator/code/main.py:56
↓ 2 callersFunctionsample_temperature
(logits, t, rng)
phases/07-transformers-deep-dive/07-gpt-causal-language-modeling/code/main.py:54
↓ 2 callersMethodsave
(sessionId: string, stepName: string, state: State)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.ts:71
↓ 2 callersMethodsave
(self, session_id: str, step_name: str, state: State)
phases/14-agent-engineering/13-langgraph-stateful-graphs/code/main.py:71
↓ 2 callersFunctionsave_approved
(state: dict)
phases/13-tools-and-protocols/15-mcp-security-tool-poisoning/code/main.py:67
↓ 2 callersFunctionscaled_dot_product_attention
(Q: Matrix, K: Matrix, V: Matrix)
phases/07-transformers-deep-dive/03-multi-head-attention/code/main.py:80
↓ 2 callersFunctionscan_registry
(registry: dict, approve_new: bool = False)
phases/13-tools-and-protocols/15-mcp-security-tool-poisoning/code/main.py:71
↓ 2 callersFunctionscatter_flat_to_params
Copy a flat fp32 vector back into the module's fp32 parameters.
phases/19-capstone-projects/78-zero-parameter-sharding/code/main.py:64
↓ 2 callersFunctionscope_check
(contract: ScopeContract, run: RunSummary)
phases/14-agent-engineering/36-scope-contracts/code/main.py:114
↓ 2 callersFunctionscore
(rules: list[Rule], checker: RuleChecker, trace: TurnTrace)
phases/14-agent-engineering/33-instructions-as-executable-constraints/code/main.py:119
↓ 2 callersFunctionscore
(p)
site/figures-dl.js:23
↓ 2 callersMethodscore
(self)
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/main.py:89
↓ 2 callersMethodscore
(self, X, y)
phases/02-ml-fundamentals/13-ml-pipelines/code/pipeline.py:138
↓ 2 callersFunctionscore_relevance
(query, documents)
phases/11-llm-engineering/05-context-engineering/code/main.py:82
↓ 2 callersFunctionscore_with_llm_judge
(input_text, model_output, reference_output=None, criteria=None)
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:82
↓ 2 callersFunctionscripted_llm_judge
(session_spans: list[SpanEvent])
phases/14-agent-engineering/24-agent-observability-platforms/code/main.py:46
↓ 2 callersFunctionscripted_router
Stands in for an LLM that reads the user message and the current agent's system prompt, then either emits text or calls a tool (which may return
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:85
↓ 2 callersMethodscrub
(self, text: str)
phases/17-infrastructure-and-production/25-security-secrets-audit/code/main.py:35
↓ 2 callersFunctionsearch
(query)
site/cmdpalette.js:158
↓ 2 callersMethodsearch
(self, query: str, k: int)
phases/19-capstone-projects/64-chunking-strategies-advanced/code/main.py:254
↓ 2 callersMethodsearch_vec
(self, qv: list[float], k: int)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:191
↓ 2 callersFunctionseed_everything
(seed: int)
phases/19-capstone-projects/47-checkpoint-save-resume/code/main.py:46
↓ 2 callersFunctionselect_prompt
(template_name, user_id, variables)
phases/11-llm-engineering/13-production-app/code/production_app.py:152
↓ 2 callersFunctionselect_tools
(query, token_budget=2000)
phases/11-llm-engineering/05-context-engineering/code/main.py:227
↓ 2 callersFunctionself_consistency_solve
(question, examples, client, model, n_samples=5)
phases/11-llm-engineering/02-few-shot-cot/code/advanced_prompting.py:191
↓ 2 callersFunctionsensitivity_experiment
(batch_size=2, seq_len=16, d_model=64, num_bits=8)
phases/10-llms-from-scratch/11-quantization/code/main.py:217
↓ 2 callersMethodserialize
(self)
phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:157
↓ 2 callersFunctionserve
(host: str, port: int)
phases/13-tools-and-protocols/09-mcp-transports/code/main.py:172
↓ 2 callersFunctionshard_for_rank
(x: torch.Tensor, rank: int, world_size: int)
phases/19-capstone-projects/48-distributed-fsdp-ddp/code/main.py:94
↓ 2 callersFunctionshow_model_info
(model, name="Model")
phases/03-deep-learning-core/11-intro-to-pytorch/code/pytorch_intro.py:237
↓ 2 callersFunctionsigmoid
(x)
phases/05-nlp-foundations-to-advanced/03-word-embeddings-word2vec/code/main.py:32
↓ 2 callersFunctionsigmoid
(x)
phases/10-llms-from-scratch/07-rlhf/code/main.py:86
← previousnext →2,201–2,300 of 8,347, ranked by callers