MCPcopy Create free account

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

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

↓ 1 callersFunctionreconstruction_error
(X, X_reconstructed)
phases/01-math-foundations/10-dimensionality-reduction/code/dim_reduction.py:227
↓ 1 callersMethodrecord
(self, success: bool)
phases/16-multi-agent-and-swarms/23-failure-modes-mast-groupthink/code/main.py:87
↓ 1 callersMethodrecord
(self, obs: Observation)
phases/19-capstone-projects/29-end-to-end-coding-task-demo/code/main.py:51
↓ 1 callersMethodrecord
(self, repo: str, spent: float, opened_pr: bool)
phases/19-capstone-projects/16-github-issue-to-pr-agent/code/main.py:60
↓ 1 callersMethodrecord
Return True if the action may proceed, False if breaker is open.
phases/15-autonomous-systems/14-kill-switches-canaries/code/main.py:37
↓ 1 callersMethodrecord_match
(self, player_a, player_b, outcome)
phases/10-llms-from-scratch/10-evaluation/code/main.py:77
↓ 1 callersFunctionrecord_override
Append a signed override entry. Refuses without all five fields populated.
phases/14-agent-engineering/38-verification-gates/code/main.py:171
↓ 1 callersFunctionrectified_flow_train_step
(model, x0, optimizer, device)
phases/04-computer-vision/23-diffusion-transformers-rectified-flow/code/main.py:88
↓ 1 callersFunctionredact
Strip secrets before the JSONL append. Read-time redaction is a foot-gun.
phases/14-agent-engineering/37-runtime-feedback-loops/code/main.py:58
↓ 1 callersFunctionredact_pii
(text: str)
phases/13-tools-and-protocols/21-llm-routing-layer/code/main.py:60
↓ 1 callersFunctionreduce_scatter
Reduce-scatter as the first half of ring allreduce. Input is a tensor of length world_size * T. Output is the rank's chunk of length T holdin
phases/19-capstone-projects/76-collective-ops-from-scratch/code/main.py:171
↓ 1 callersFunctionrefine
(topic: str, prev: str, critique: str, history: list[Attempt])
phases/14-agent-engineering/05-self-refine-and-critic/code/main.py:74
↓ 1 callersMethodreflect
(self, tick: int)
phases/16-multi-agent-and-swarms/17-generative-agents-simulation/code/main.py:44
↓ 1 callersMethodreflect
(self, attempt: list[int], delta: int)
phases/14-agent-engineering/03-reflexion-verbal-rl/code/main.py:59
↓ 1 callersFunctionreflection_x
()
phases/01-math-foundations/03-matrix-transformations/code/transformations.py:32
↓ 1 callersFunctionrefund_agent_factory
()
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:46
↓ 1 callersFunctionrefusal_from_score
(top_retrieval_score, threshold=0.3)
phases/05-nlp-foundations-to-advanced/13-question-answering/code/main.py:34
↓ 1 callersMethodregister
(self)
phases/13-tools-and-protocols/18-mcp-auth-production/code/main.py:295
↓ 1 callersMethodregisterAgent
( name: string, handler: (input: AgentMessage[]) => Promise<{ output: AgentMessage[]; traj
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:297
↓ 1 callersFunctionregisterAllTools
()
phases/11-llm-engineering/09-function-calling/code/main.ts:160
↓ 1 callersMethodregisterHandler
(agentName: string, handler: TaskHandler)
phases/16-multi-agent-and-swarms/03-communication-protocols/code/main.ts:155
↓ 1 callersFunctionregister_all_tools
()
phases/11-llm-engineering/09-function-calling/code/function_calling.py:132
↓ 1 callersMethodregister_client
RFC 7591 dynamic client registration (the DCR fallback path).
phases/13-tools-and-protocols/18-mcp-auth-production/code/main.py:146
↓ 1 callersFunctionreinforce_step
(theta, rng, lr=0.1)
phases/09-reinforcement-learning/12-rl-for-games/code/main.py:63
↓ 1 callersFunctionrejection_sample
(target_pdf, proposal_sample, proposal_pdf, M)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:38
↓ 1 callersFunctionrejection_sample_batch
(target_pdf, proposal_sample, proposal_pdf, M, n)
phases/01-math-foundations/16-sampling-methods/code/sampling.py:48
↓ 1 callersFunctionrelative_throughput
Decode is memory-bandwidth-limited. Fewer weight bytes per token = higher throughput. Normalize to BF16 = 1.0.
phases/17-infrastructure-and-production/09-production-quantization/code/main.py:55
↓ 1 callersMethodrelevant
(self, question: str, answer: str)
phases/19-capstone-projects/68-rag-eval-precision-recall/code/main.py:141
↓ 1 callersFunctionreliability_compounding
Show how per-step reliability decays across a trajectory.
phases/15-autonomous-systems/01-long-horizon-agents/code/main.py:91
↓ 1 callersFunctionrelu
(x)
phases/03-deep-learning-core/09-learning-rate-schedules/code/main.py:57
↓ 1 callersFunctionrelu
(z)
site/figures-llms2.js:73
↓ 1 callersFunctionrelu_deriv
(x)
phases/03-deep-learning-core/09-learning-rate-schedules/code/main.py:61
↓ 1 callersFunctionrelu_matrix
(m)
phases/01-math-foundations/02-vectors-matrices-operations/code/matrices.py:165
↓ 1 callersMethodremaining
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:61
↓ 1 callersMethodremaining
(self)
phases/11-llm-engineering/05-context-engineering/code/main.py:44
↓ 1 callersMethodremaining_seconds
(self)
phases/19-capstone-projects/20-agent-harness-loop-contract/code/main.py:80
↓ 1 callersFunctionremove_correlated
(features, threshold=0.9)
phases/02-ml-fundamentals/08-feature-engineering/code/features.py:241
↓ 1 callersMethodremove_from_cart
(self, sku: str)
phases/14-agent-engineering/20-benchmarks-webarena-osworld/code/main.py:32
↓ 1 callersFunctionrender
(history: list[Msg])
phases/16-multi-agent-and-swarms/11-handoffs-and-routines/code/main.py:129
↓ 1 callersFunctionrender
(span: Span, indent: int = 0)
phases/14-agent-engineering/23-otel-genai-conventions/code/main.py:144
↓ 1 callersFunctionrender
(tokens: list[int])
phases/12-multimodal-ai/14-show-o-discrete-diffusion-unified/code/main.py:83
↓ 1 callersMethodrender
(self)
phases/14-agent-engineering/07-memory-virtual-context-memgpt/code/main.py:33
↓ 1 callersFunctionrenderClient
()
phases/19-capstone-projects/08-production-rag-chatbot/code/ts/src/server.ts:20
↓ 1 callersFunctionrenderIndexHtml
(store: JobStore)
phases/19-capstone-projects/12-video-understanding-pipeline/code/ts/src/server.ts:5
↓ 1 callersFunctionrenderTemplate
(template: string, vars: Readonly<Record<string, string>>)
phases/11-llm-engineering/01-prompt-engineering/code/main.ts:127
↓ 1 callersFunctionrender_bibtex
(paper: Paper)
phases/19-capstone-projects/54-paper-writer/code/main.py:166
↓ 1 callersFunctionrender_json
(rows: Sequence[LeaderboardRow])
phases/19-capstone-projects/74-leaderboard-aggregation/code/main.py:254
↓ 1 callersFunctionrender_markdown
(summary: dict)
phases/18-ethics-safety-alignment/27-data-provenance-training-governance/code/main.py:61
↓ 1 callersFunctionrender_next_steps
(target: Path, pack_version: str)
scripts/scaffold_workbench.py:164
↓ 1 callersFunctionrender_report
(results: list[LessonResult], execute: bool)
scripts/lesson_run.py:179
↓ 1 callersFunctionrender_report
(audit: Audit)
scripts/audit_lessons.py:225
↓ 1 callersFunctionrender_report
(report: FinalReport, log: Callable[[str], None] = print)
phases/19-capstone-projects/41-eval-pipeline/code/main.py:681
↓ 1 callersFunctionrender_trace
(trace: Trace, t0: float)
phases/16-multi-agent-and-swarms/05-supervisor-orchestrator-pattern/code/main.py:114
↓ 1 callersFunctionrender_word
Render a word as a 5-row ASCII-art block.
phases/18-ethics-safety-alignment/14-ascii-art-visual-jailbreaks/code/main.py:31
↓ 1 callersFunctionreorderLostInMiddle
(items: T[], scores: number[])
phases/11-llm-engineering/05-context-engineering/code/main.ts:85
↓ 1 callersFunctionrepl
(sandbox: string)
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/repl.ts:37
↓ 1 callersFunctionreplay_and_execute
()
phases/13-tools-and-protocols/03-parallel-and-streaming-tool-calls/code/main.py:103
↓ 1 callersFunctionreport
(row: dict, baseline: float)
phases/17-infrastructure-and-production/16-model-routing/code/main.py:92
↓ 1 callersFunctionreport
(row: dict)
phases/17-infrastructure-and-production/11-multi-region-kv-locality/code/main.py:133
↓ 1 callersFunctionreport
(row: dict)
phases/17-infrastructure-and-production/03-gpu-autoscaling-kubernetes/code/main.py:152
↓ 1 callersFunctionreport
(row: dict)
phases/17-infrastructure-and-production/19-ai-gateways/code/main.py:73
↓ 1 callersFunctionreport
(row: dict, baseline: float)
phases/17-infrastructure-and-production/18-vllm-production-stack-lmcache/code/main.py:99
↓ 1 callersFunctionreport
(row: dict)
phases/17-infrastructure-and-production/13-llm-observability/code/main.py:65
↓ 1 callersFunctionreport
(d: Deployment)
phases/15-autonomous-systems/22-cais-caisi-societal-risk/code/main.py:72
↓ 1 callersMethodreport
()
phases/11-llm-engineering/05-context-engineering/code/main.ts:65
↓ 1 callersFunctionreportRollups
(rollups: ModelRollup[])
phases/19-capstone-projects/11-llm-observability-dashboard/code/ts/src/index.ts:66
↓ 1 callersFunctionreportRow
(row: SimRow, baseline: number)
phases/17-infrastructure-and-production/16-model-routing/code/main.ts:324
↓ 1 callersFunctionreportRow
(r: SimRow)
phases/17-infrastructure-and-production/19-ai-gateways/code/main.ts:361
↓ 1 callersFunctionreportRow
(r: SimResult)
phases/17-infrastructure-and-production/13-llm-observability/code/main.ts:296
↓ 1 callersFunctionreport_latency
(label: str, traces: list[RequestTrace])
phases/17-infrastructure-and-production/08-inference-metrics-goodput/code/main.py:65
↓ 1 callersFunctionrequest_response
(input_text: str)
phases/14-agent-engineering/29-production-runtimes/code/main.py:24
↓ 1 callersFunctionrerank
Blend the cross-encoder score with a content-overlap signal. A small cross-encoder (this lesson) is noisy on out-of-training-set queries. A p
phases/19-capstone-projects/69-end-to-end-rag-system/code/main.py:397
↓ 1 callersFunctionrerank
(query: str, candidates: list[tuple[Chunk, float]], top_k: int = 5)
phases/19-capstone-projects/02-rag-over-codebase/code/main.py:167
↓ 1 callersFunctionresearchAgentFlow
()
phases/13-tools-and-protocols/19-a2a-protocol/code/main.ts:147
↓ 1 callersFunctionresearch_agent_flow
()
phases/13-tools-and-protocols/19-a2a-protocol/code/main.py:115
↓ 1 callersFunctionresearch_arxiv_search
(args: dict)
phases/13-tools-and-protocols/23-capstone-tool-ecosystem/code/main.py:68
↓ 1 callersFunctionresearch_generate_report
(args: dict, trace_id: str, parent: str)
phases/13-tools-and-protocols/23-capstone-tool-ecosystem/code/main.py:74
↓ 1 callersFunctionreset
()
phases/09-reinforcement-learning/06-policy-gradients-reinforce/code/main.py:13
↓ 1 callersFunctionreset
()
phases/09-reinforcement-learning/03-monte-carlo-methods/code/main.py:11
↓ 1 callersFunctionreset
()
phases/09-reinforcement-learning/05-dqn/code/main.py:11
↓ 1 callersFunctionreset
()
phases/09-reinforcement-learning/07-actor-critic-a2c-a3c/code/main.py:13
↓ 1 callersFunctionreset_log
(path: str)
phases/15-autonomous-systems/12-durable-execution/code/main.py:105
↓ 1 callersMethodreset_short_term
(self)
phases/14-agent-engineering/15-crewai-role-based-crews/code/main.py:196
↓ 1 callersFunctionresidual
(q: List[float], p: List[float])
phases/10-llms-from-scratch/15-speculative-decoding-eagle3/code/main.py:33
↓ 1 callersFunctionresize_compare
(arr, scale=3)
phases/04-computer-vision/01-image-fundamentals/code/main.py:94
↓ 1 callersFunctionresolve_references
(value: Any, evidence: dict[str, str])
phases/14-agent-engineering/02-rewoo-plan-and-execute/code/main.py:50
↓ 1 callersFunctionresources_read
(params: dict)
phases/13-tools-and-protocols/14-mcp-apps/code/main.py:108
↓ 1 callersMethodrespond
(_history: Turn[])
phases/14-agent-engineering/01-the-agent-loop/code/main.ts:95
↓ 1 callersMethodrespond
(self, history: list[Turn])
phases/14-agent-engineering/01-the-agent-loop/code/main.py:89
↓ 1 callersFunctionretentionDemo
()
phases/17-infrastructure-and-production/13-llm-observability/code/main.ts:328
↓ 1 callersFunctionretrieve
(query: str, role: str, jurisdiction: str, corpus: list[Chunk], k: int = 5)
phases/19-capstone-projects/08-production-rag-chatbot/code/main.py:80
↓ 1 callersFunctionretrieve
(query: Query, pages: list[Page], k: int = 3)
phases/12-multimodal-ai/23-colpali-vision-native-rag/code/main.py:70
↓ 1 callersFunctionretrieveRecall
( chunks: readonly string[], query: string, goldSubstrings: readonly string[], topK = 3, )
phases/05-nlp-foundations-to-advanced/23-chunking-strategies-rag/code/main.ts:144
↓ 1 callersFunctionretrieve_recall
(chunks, query, gold_substrings, top_k=3)
phases/05-nlp-foundations-to-advanced/23-chunking-strategies-rag/code/main.py:95
↓ 1 callersFunctionretrieve_top_k
(stream: list[Memory], query: str, tick: int, k: int = 3)
phases/16-multi-agent-and-swarms/17-generative-agents-simulation/code/main.py:66
↓ 1 callersFunctionretry_chain
Walk parent_command_id pointers to reconstruct a retry chain.
phases/14-agent-engineering/37-runtime-feedback-loops/code/main.py:192
↓ 1 callersFunctionreturns_to_go
(traj, gamma)
phases/09-reinforcement-learning/06-policy-gradients-reinforce/code/main.py:74
↓ 1 callersFunctionreview
(inputs: ReviewerInputs)
phases/14-agent-engineering/39-reviewer-agent/code/main.py:91
↓ 1 callersFunctionreviewer_check
Reviewer stub. Catches bugs ~85% of the time; 15% false-approve rate.
phases/19-capstone-projects/10-multi-agent-software-team/code/main.py:89
↓ 1 callersFunctionrevise
Replace harmful tokens with safe alternatives per the mapping.
phases/18-ethics-safety-alignment/05-constitutional-ai-rlaif/code/main.py:69
← previousnext →4,901–5,000 of 8,347, ranked by callers