MCPcopy Create free account

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

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

↓ 1 callersFunctionrevise
(response: str, critique_result: dict)
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:40
↓ 1 callersMethodrevise
Weighted average of own + others, weighted by confidence.
phases/16-multi-agent-and-swarms/07-society-of-mind-debate/code/main.py:28
↓ 1 callersFunctionreward_format
(response: str)
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:91
↓ 1 callersFunctionreward_math
(prompt: str, response: str)
phases/10-llms-from-scratch/09-constitutional-ai-self-improvement/code/main.py:76
↓ 1 callersMethodrewrite
(self, query: str)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:282
↓ 1 callersMethodrewrite
(self, query: str)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:291
↓ 1 callersMethodrewrite
(self, query: str)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:302
↓ 1 callersMethodrewrite
(self, query: str)
phases/19-capstone-projects/67-query-rewriting-hyde/code/main.py:312
↓ 1 callersMethodrewrite
(self, new: str)
phases/14-agent-engineering/08-memory-blocks-sleep-time-compute/code/main.py:39
↓ 1 callersMethodrewrite_decompose
(self, query: str)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:268
↓ 1 callersMethodrewrite_hyde
(self, query: str)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:257
↓ 1 callersMethodrewrite_multiquery
(self, query: str)
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:260
↓ 1 callersFunctionrfe
(X, y, n_features_to_select=5, lr=0.1, epochs=100)
phases/02-ml-fundamentals/18-feature-selection/code/feature_selection.py:91
↓ 1 callersFunctionrgb_to_grayscale
(rgb)
phases/04-computer-vision/01-image-fundamentals/code/main.py:50
↓ 1 callersFunctionrgb_to_hsv
(rgb)
phases/04-computer-vision/01-image-fundamentals/code/main.py:55
↓ 1 callersFunctionring_allreduce
Ring allreduce in two passes (reduce-scatter then allgather). Splits the tensor into world_size equal chunks (padding with zeros so the chunk
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:87
↓ 1 callersFunctionrle_decode
(rle_str, shape)
phases/04-computer-vision/24-sam3-open-vocab-segmentation/code/main.py:45
↓ 1 callersFunctionrlhf_loop
(w, updates=300, beta=0.1, lr=0.05, eps=0.2, rng=None)
phases/09-reinforcement-learning/09-reward-modeling-rlhf/code/main.py:90
↓ 1 callersFunctionrm_accuracy
(w, n_pairs=200, rng=None)
phases/09-reinforcement-learning/09-reward-modeling-rlhf/code/main.py:50
↓ 1 callersFunctionrms_dbfs
(chunk)
phases/06-speech-and-audio/11-real-time-audio-processing/code/main.py:18
↓ 1 callersFunctionrmse
(y_true, y_pred)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:172
↓ 1 callersFunctionrnd
()
site/figures-genai-rl.js:25
↓ 1 callersFunctionrnn_style
Sequential recurrence: h_t depends on h_{t-1}. Cannot parallelize.
phases/07-transformers-deep-dive/01-why-transformers/code/main.py:11
↓ 1 callersFunctionroc_curve
(y_true, y_scores)
phases/02-ml-fundamentals/09-model-evaluation/code/evaluation.py:129
↓ 1 callersFunctionroi_align_single
(feature, box, output_size=7, spatial_scale=1 / 16.0)
phases/04-computer-vision/08-instance-segmentation-mask-rcnn/code/main.py:6
↓ 1 callersMethodrollback
(baselineDigest?: string)
phases/17-infrastructure-and-production/20-shadow-canary-progressive/code/main.ts:208
↓ 1 callersFunctionrollback_transfer
(txid: str, from_acct: str, to_acct: str, amount: int, prior_last_transfer_id: str | Non
phases/15-autonomous-systems/16-checkpoints-rollback/code/main.py:30
↓ 1 callersFunctionrollout
(theta, rng, max_steps=100)
phases/09-reinforcement-learning/06-policy-gradients-reinforce/code/main.py:59
↓ 1 callersFunctionrollout
(theta, w, rng, max_steps=100)
phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/code/main.py:67
↓ 1 callersFunctionroot_cause
Walk outward from the alerted object, collect telemetry, and propose ranked hypotheses.
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/main.py:98
↓ 1 callersFunctionroots_of_unity
(N)
phases/01-math-foundations/19-complex-numbers/code/complex_numbers.py:108
↓ 1 callersFunctionrouge_l_score
(reference, hypothesis)
phases/11-llm-engineering/10-evaluation/code/eval_framework.py:146
↓ 1 callersFunctionrouge_n
(hyp, ref, n=1)
phases/05-nlp-foundations-to-advanced/12-text-summarization/code/main.py:50
↓ 1 callersFunctionround_trip
Reconstruct original by replacing sentinels in source with corresponding target spans.
phases/07-transformers-deep-dive/08-t5-bart-encoder-decoder/code/main.py:74
↓ 1 callersFunctionround_trip_demo
()
phases/12-multimodal-ai/21-embodied-vlas-openvla-pi0-groot/code/main.py:82
↓ 1 callersFunctionroute
(input_text: str, classifier: Callable[[str], str], handlers: dict[str, Callable[[str], str]])
phases/14-agent-engineering/12-anthropic-workflow-patterns/code/main.py:45
↓ 1 callersFunctionroute
Return (top-k expert indices, gate weights over those experts). Bias affects selection (argmax) but NOT gate weights — the auxiliary-loss-fre
phases/07-transformers-deep-dive/11-mixture-of-experts/code/main.py:35
↓ 1 callersFunctionroute
Classify task as `understand` or `generate`.
phases/12-multimodal-ai/15-janus-pro-decoupled-encoders/code/main.py:50
↓ 1 callersFunctionrouteOf
(t, E, k)
site/figures-llms-systems.js:134
↓ 1 callersMethodrouteTo
(agent: Agent, msg: Message)
phases/19-capstone-projects/10-multi-agent-software-team/code/ts/src/coordinator.ts:22
↓ 1 callersFunctionroute_inputs
Classify each input and assign a tokenizer path.
phases/12-multimodal-ai/16-mio-any-to-any-streaming/code/main.py:55
↓ 1 callersFunctionrouterDemo
()
phases/17-infrastructure-and-production/16-model-routing/code/main.ts:336
↓ 1 callersFunctionrouter_params
(hidden: int, n_experts: int)
phases/10-llms-from-scratch/20-deepseek-v3-walkthrough/code/main.py:76
↓ 1 callersFunctionrrf
(dense: list[tuple[Chunk, float]], sparse: list[tuple[Chunk, float]], k_rrf: int = 60)
phases/19-capstone-projects/02-rag-over-codebase/code/main.py:149
↓ 1 callersFunctionrrf_fuse
(rankings, k=60)
phases/05-nlp-foundations-to-advanced/22-embedding-models-deep-dive/code/main.py:59
↓ 1 callersFunctionrubber_stamp_approve
(store: Store, k: str)
phases/15-autonomous-systems/15-propose-then-commit/code/main.py:100
↓ 1 callersFunctionrule_based_ner
(tokens)
phases/05-nlp-foundations-to-advanced/06-named-entity-recognition/code/main.py:20
↓ 1 callersFunctionrule_based_respond
(user_input)
phases/05-nlp-foundations-to-advanced/17-chatbots-rule-to-neural/code/main.py:20
↓ 1 callersFunctionrun
(args: argparse.Namespace)
scripts/link_check.py:278
↓ 1 callersFunctionrun
(prompt: str)
phases/18-ethics-safety-alignment/29-moderation-systems-openai-perspective-llamaguard/code/main.py:73
↓ 1 callersFunctionrun
(label: str, weak_acc: float)
phases/18-ethics-safety-alignment/11-scalable-oversight-weak-to-strong/code/main.py:67
↓ 1 callersFunctionrun
()
phases/00-setup-and-tooling/01-dev-environment/code/verify.ts:75
↓ 1 callersFunctionrun
()
phases/11-llm-engineering/16-langgraph-state-machines/code/main.py:116
↓ 1 callersFunctionrun
()
site/figures-dl.js:191
↓ 1 callersMethodrun
( agentName: string, input: AgentMessage[], sessionId?: string )
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:307
↓ 1 callersMethodrun
(self, query: str)
phases/16-multi-agent-and-swarms/05-supervisor-orchestrator-pattern/code/main.py:87
↓ 1 callersMethodrun
(self, prompt: str)
phases/14-agent-engineering/18-agno-and-mastra-runtimes/code/main.py:17
↓ 1 callersMethodrun
(self, prompt: str, tool_calls: list[tuple[str, dict[str, Any]]] )
phases/14-agent-engineering/18-agno-and-mastra-runtimes/code/main.py:57
↓ 1 callersMethodrun
(self, payload: Any)
phases/14-agent-engineering/18-agno-and-mastra-runtimes/code/main.py:75
↓ 1 callersMethodrun
(self, contradictions: list[tuple[str, str]])
phases/14-agent-engineering/08-memory-blocks-sleep-time-compute/code/main.py:140
↓ 1 callersMethodrun
(userMessage: string)
phases/14-agent-engineering/01-the-agent-loop/code/main.ts:112
↓ 1 callersMethodrun
(self, user_message: str)
phases/14-agent-engineering/01-the-agent-loop/code/main.py:104
↓ 1 callersMethodrun
(self, call: ToolCall)
phases/14-agent-engineering/27-prompt-injection-defense/code/main.py:78
↓ 1 callersMethodrun
(self, max_turns: int = 10)
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:91
↓ 1 callersMethodrun
(self, max_turns: int = 10)
phases/15-autonomous-systems/09-coding-agent-landscape/code/main.py:131
↓ 1 callersFunctionrunBudgetDemo
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:170
↓ 1 callersFunctionrunConversationDemo
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:201
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/12-video-understanding-pipeline/code/ts/src/index.ts:12
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/08-production-rag-chatbot/code/ts/src/index.ts:50
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/06-devops-troubleshooting-agent/code/ts/src/index.ts:57
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/04-multimodal-document-qa/code/ts/src/index.ts:45
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/index.ts:13
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/13-mcp-server-with-registry/code/ts/src/index.ts:53
↓ 1 callersFunctionrunDemo
()
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/ts/src/index.ts:35
↓ 1 callersFunctionrunDemoTicks
(rounds: number)
phases/19-capstone-projects/09-code-migration-agent/code/ts/src/index.ts:31
↓ 1 callersFunctionrunExtractionDemo
()
phases/11-llm-engineering/03-structured-outputs/code/main.ts:245
↓ 1 callersFunctionrunJSONSchemaDemo
()
phases/11-llm-engineering/03-structured-outputs/code/main.ts:240
↓ 1 callersFunctionrunLoop
(userMsg: string)
phases/13-tools-and-protocols/01-the-tool-interface/code/main.ts:205
↓ 1 callersFunctionrunRelevanceDemo
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:223
↓ 1 callersFunctionrunReorderDemo
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:181
↓ 1 callersFunctionrunSchemaDemo
()
phases/11-llm-engineering/03-structured-outputs/code/main.ts:224
↓ 1 callersFunctionrunServer
(port: number)
phases/19-capstone-projects/12-video-understanding-pipeline/code/ts/src/index.ts:57
↓ 1 callersFunctionrunServer
(port: number)
phases/19-capstone-projects/17-personal-ai-tutor/code/ts/src/index.ts:95
↓ 1 callersFunctionrunServer
(port: number, secret: string)
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/ts/src/index.ts:125
↓ 1 callersFunctionrun_agent
(task: str, sandbox: str)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/main.py:172
↓ 1 callersFunctionrun_agent
(run: SandboxRun, difficulty: float, rng: random.Random, turn_cap: int = 20, dollar_cap: float =
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/main.py:124
↓ 1 callersFunctionrun_agent
(page: dict, defense: str)
phases/15-autonomous-systems/11-browser-agents/code/main.py:86
↓ 1 callersFunctionrun_amro_s
(n_tasks: int = 200, seed: int = 0)
phases/16-multi-agent-and-swarms/19-swarm-optimization-pso-aco/code/main.py:116
↓ 1 callersFunctionrun_baseline
Non-adaptive concept selection (round-robin). Mastery is still updated via BKT so both arms share the same learner model; only the policy / co
phases/19-capstone-projects/17-personal-ai-tutor/code/main.py:158
↓ 1 callersFunctionrun_bench
(system: SystemSim, n_seen: int, n_held: int, seed: int = 0)
phases/16-multi-agent-and-swarms/24-evaluation-coordination-benchmarks/code/main.py:62
↓ 1 callersFunctionrun_benchmark
()
phases/12-multimodal-ai/25-multimodal-agents-computer-use/code/main.py:105
↓ 1 callersFunctionrun_budget_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:302
↓ 1 callersFunctionrun_chain
(agents: list[SimAgent], correct: str, rng: random.Random)
phases/16-multi-agent-and-swarms/15-voting-debate-topology/code/main.py:54
↓ 1 callersFunctionrun_checks
(task_id: str)
phases/14-agent-engineering/42-agent-workbench-capstone/outputs/agent-workbench-pack/scripts/verify_agent.py:65
↓ 1 callersFunctionrun_client
()
phases/16-multi-agent-and-swarms/12-a2a-protocol/code/main.py:133
↓ 1 callersFunctionrun_comparison
(questions, expected_answers, examples, client, model)
phases/11-llm-engineering/02-few-shot-cot/code/advanced_prompting.py:367
↓ 1 callersFunctionrun_config
( effective_batch: int, accum_steps: int, *, in_dim: int, hidden: int, out_dim: int,
phases/19-capstone-projects/46-gradient-accumulation/code/main.py:151
↓ 1 callersFunctionrun_constrained_decoding_demo
()
phases/11-llm-engineering/03-structured-outputs/code/main.py:287
↓ 1 callersFunctionrun_conversation_demo
()
phases/11-llm-engineering/05-context-engineering/code/main.py:344
↓ 1 callersFunctionrun_debate
(debaters: list[Debater], question: str, rounds: int, topology: str)
phases/14-agent-engineering/25-multi-agent-debate/code/main.py:60
← previousnext →5,001–5,100 of 8,347, ranked by callers